Skip to main content
connic

Outlook (Microsoft 365)

Run an agent on every new email in a Microsoft 365 mailbox, attachments included, and reply in the same thread from that mailbox.

Modes
Inbound, Outbound
Set up in
Dashboard or connectors/*.yaml
Publisher
By connic

Every new email starts a run

connic follows one folder through Microsoft Graph and gives each new message to every linked agent, in the same fields as the Email connector.

Parsed fields
Sender, subject, Message-ID, text and HTML bodies and attachments arrive as separate fields. An agent built for the Email connector reads them unchanged.
Any folder
Watch the Inbox or any folder, including subfolders such as Inbox/Support. Shared mailboxes work too.
Read flags
connic marks each message as read once every linked agent received it, so Outlook shows what the agent picked up. Turn it off to leave the flags alone.
outlook-payload.json
{
  "from": "Jana Weber <jana@example.com>",
  "from_address": "jana@example.com",
  "to": "Contoso Support <support@contoso.com>",
  "subject": "Order ord_8812 arrived damaged",
  "date": "Tue, 13 Oct 2026 07:12:04 +0000",
  "message_id": "<AM9PR02MB7731.eurprd02.prod.outlook.com>",
  "body_text": "Hi, the lamp in my order arrived broken.",
  "body_html": "<html><body><p>Hi, the lamp in my order arrived broken.</p></body></html>",
  "has_attachments": true,
  "attachments": [
    {
      "filename": "lamp.jpg",
      "content_type": "image/jpeg",
      "size_bytes": 182044,
      "content": "/9j/4AAQSkZJRgABAQ...",
      "encoding": "base64"
    }
  ],
  "_outlook": {
    "connector_id": "550e8400-e29b-41d4-a716-446655440000",
    "mailbox": "support@contoso.com",
    "folder": "Inbox",
    "message_id": "AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A...",
    "timestamp": "2026-10-13T07:12:31.204518"
  }
}

Your own app, only the mailboxes you choose

connic signs in as an app registered in your Entra ID tenant. You decide which permissions it has and which mailboxes it can open.

No mailbox password
The tenant ID, client ID and client secret of your app live in an encrypted Connection. Delete the secret in Entra ID, and connic can't sign in again.
Two mail permissions
Mail.ReadWrite reads new email and marks it as read. Mail.Send sends replies and notifications.
Scoped to your mailboxes
RBAC for Applications in Exchange Online limits the app to the mailboxes connic should use, such as one support address.
Exchange Online PowerShell
New-ServicePrincipal -AppId $clientId -ObjectId $objectId -DisplayName "connic"

New-ManagementScope -Name "connic mailboxes" `
  -RecipientRestrictionFilter "PrimarySmtpAddress -eq 'support@contoso.com'"

New-ManagementRoleAssignment -App $clientId `
  -Role "Application Mail.ReadWrite" -CustomResourceScope "connic mailboxes"
New-ManagementRoleAssignment -App $clientId `
  -Role "Application Mail.Send" -CustomResourceScope "connic mailboxes"

Keep the mailbox next to your agents

Declare the connector in connectors/. The app's credentials live in a Connection that the file names, so secrets stay out of your code and each environment can watch its own mailbox.

connectors/support-inbox.yaml
type: outlook
mode: inbound
name: Support inbox
connection: contoso-m365
config:
  mailbox: support@contoso.com
  folder: Inbox/Support
agents:
  - support-triage
environments:
  Staging:
    config:
      mailbox: support-test@contoso.com
  Production: {}
create: connectors/support-inbox.yaml (outlook)

Replies stay in the thread

An outbound Outlook connector turns the agent's output into an email from the same mailbox. For a run that an incoming email started, that email is a reply in the original conversation.

Real replies
The reply goes to the sender in the same conversation and lands in the mailbox's Sent Items, like one your team wrote.
Text or JSON
Plain output becomes the body. JSON can set to, cc, bcc, subject, html_body and reply_to. Send after every run, as a tool the model calls, or from middleware.
New emails too
With to in the output or default recipients on the connector, the agent sends a new email instead, such as a summary to your team.
output.json
{
  "body": "Sorry about the lamp, Jana. A replacement ships today."
}
Sent Items
From: Contoso Support <support@contoso.com>
To: Jana Weber <jana@example.com>
Subject: RE: Order ord_8812 arrived damaged

Sorry about the lamp, Jana. A replacement ships today.

Where Outlook fits

Pick a setup to see what arrives, which agent runs and what goes out.

Customers write to your support mailbox, and the agent answers in the same thread.

Support mailbox
Inbound Outlook
support-triage
Reply in the thread
outlook-payload.json
{
  "from_address": "sam@example.com",
  "subject": "Change delivery address for ord_9035",
  "body_text": "Please ship it to my office instead.",
  "has_attachments": false,
  "attachments": []
}
Sent Items
From: Contoso Support <support@contoso.com>
To: sam@example.com
Subject: RE: Change delivery address for ord_9035

Done. Order ord_9035 now ships to your office.

Suppliers email PDF invoices, and accounts payable gets the extracted totals by email.

Supplier invoices
Inbound Outlook
invoice-extractor
Summary to accounts payable
outlook-payload.json
{
  "from_address": "billing@supplier.example",
  "subject": "Invoice INV-2041",
  "has_attachments": true,
  "attachments": [
    {
      "filename": "INV-2041.pdf",
      "content_type": "application/pdf",
      "size_bytes": 48213,
      "content": "JVBERi0xLjcKJeLjz9MK...",
      "encoding": "base64"
    }
  ]
}
output.json
{
  "to": "ap@contoso.com",
  "subject": "INV-2041: 3 items, EUR 1,284.50",
  "body": "Due Nov 12. Line items and VAT add up to the total."
}

The agent handles routine requests and calls an email tool to hand the rest to your team.

Shared mailbox
Inbound Outlook
support-agent
Handoff to your team
outlook-payload.json
{
  "from_address": "lea@example.com",
  "subject": "Refund for a cancelled booking",
  "body_text": "I cancelled booking B-5521 within 24 hours.",
  "has_attachments": false,
  "attachments": []
}
tool-call.json
{
  "to": "support-leads@contoso.com",
  "subject": "Refund decision needed: booking B-5521",
  "body": "Lea cancelled within 24 hours and asks for a full refund."
}

A schedule starts the agent every Monday, and the report goes out from your Microsoft 365 mailbox.

Mondays at 08:00
Cron Scheduler
weekly-report
Report by email
cron-payload.json
{
  "trigger": "cron",
  "schedule": "0 8 * * 1",
  "triggered_at": "2026-10-12T08:00:00.000Z",
  "prompt": "Write the weekly support report"
}
output.json
{
  "to": ["lead@contoso.com", "ops@contoso.com"],
  "subject": "Support report, week 41",
  "body": "412 tickets, median first reply 38 minutes.",
  "html_body": "<h2>Week 41</h2><p>412 tickets, median first..."
}

Outlook (Microsoft 365) FAQ

No. connic signs in to Microsoft Graph as your own Entra ID app with its client secret. No user account or mailbox password is involved.

Yes. Assign the mail permissions with RBAC for Applications in Exchange Online, scoped to the mailboxes connic should use, and remove the tenant-wide permissions from the app in Entra ID. The docs list the commands.

No. It starts with the email that arrives after its first check, so linking an agent to a full inbox doesn't start a run for every old message.

Yes. When an inbound Outlook connector started the run, the outbound connector on the same mailbox replies to that email in the same conversation, unless the output sets its own recipients.

No. The connector works with Microsoft 365 work and school mailboxes, including shared mailboxes. For other mailboxes, use the Email connector over IMAP and SMTP.