Skip to main content
View plugin source · Plugin ID · Plugin API The mail plugin brings messages from one folder into Quivr for search and alerts.
The Microsoft 365 mail plugin brings messages from one folder into Quivr for search and alerts.The Microsoft 365 mail plugin brings messages from one folder into Quivr for search and alerts.

What it does

Collect messages and attachments from one folder in a Microsoft 365 mailbox, including a shared mailbox. Use a separate source instance for each folder you want to collect.

Before you start

  • Ask a tenant admin for the directory ID and a Microsoft Entra app registration with app-only Mail.Read access to the target mailbox. Follow the Microsoft 365 setup guide to scope access in Exchange Online.
  • Get the application client ID and either a client secret or a certificate and its RSA private key. Register the public certificate on the Entra app.
  • Have a collection (a Corpus in the API) and an API key with connectors:read, connectors:write, content:read and search:query for it.
  • Set credential_key in your Quivr deployment so it can store the application credential.

Enable it

1

Find the mail source

Look for m365_mail in GET /v0/connector-kinds. If it is missing, pin the plugin. Local development points to a simulated Graph API.
2

Create an instance

Follow Collect from a source with kind m365_mail. Set tenant_id and mailbox in config. Use the mailbox’s address or object ID. In the same request, supply client_id with either client_secret or both certificate_pem and private_key_pem in credential.secret. Rotate the credential before it expires.

Use it

Collect a mailbox folder

Leave config.folder unset to collect the inbox, or set it to a well-known folder name or Graph folder ID. Collection starts with mail received from the first poll by default. To include recent mail, set config.backfill_since to an RFC 3339 timestamp within the seven days before that poll. After Quivr indexes the messages from a successful run, search the collection for words from a message’s subject or body.

Settings

What it produces

Each message becomes a record with its subject, body, and details such as sender and received date. Quivr stores the original HTML body when present and keeps supported attachments with the message. The subject and body are searchable. Moving or deleting a message leaves the collected record in Quivr.

Limits and troubleshooting

Object storage prefix for files delivered to a bucket.