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
- Documentation
- Outlook (Microsoft 365) docs
- 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.
{
"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.
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.
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: {}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.
{
"body": "Sorry about the lamp, Jana. A replacement ships today."
}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.
{
"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": []
}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.
{
"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"
}
]
}{
"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.
{
"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": []
}{
"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.
{
"trigger": "cron",
"schedule": "0 8 * * 1",
"triggered_at": "2026-10-12T08:00:00.000Z",
"prompt": "Write the weekly support report"
}{
"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
More connectors
AWS SQS
Drain SQS queues with an agent. Each message is deleted once its runs complete, and failed ones return after the visibility timeout.
Inbound · Outbound
Email (SMTP/IMAP)
Read an inbox to trigger an agent. Reply with a drafted message over SMTP. Attachments included.
Inbound · Outbound
Google Pub/Sub
Run an agent on every message a Pub/Sub push subscription delivers, checked with Google's signed token, and publish results to a topic.
Inbound · Outbound
Google Sheets
Run an agent on every new row in a spreadsheet and append its results as rows. connic signs in with your own service account.
Inbound · Outbound
Stripe
Run an agent on invoice.payment_failed, customer.subscription.updated or any other Stripe event. connic verifies webhook signatures.
Inbound
Telnyx Voice
Answer and place calls on your Telnyx number with a voice agent. connic sets up Call Control and streams the conversation.
Sync · Outbound