Skip to main content
Microsoft Outlook logo

Overview

Add Microsoft Outlook to any ModuleX agent or workflow. Send, draft, search, and organize email; manage contacts, folders, and categories in Microsoft Outlook via Microsoft Graph (graph.microsoft.com/v1.0). Uses delegated permissions on behalf of an authenticated Microsoft 365 user.
Categories: Communication · Email · Productivity · Communication · Microsoft · Auth: OAuth2 · Actions: 20

Authentication

OAuth2 Authentication

Connect with your Microsoft account using OAuth 2.0 against the Microsoft identity platform.
1

Step 1

Register an application at https://entra.microsoft.com (Azure AD > App registrations)
2

Step 2

Under ‘Authentication’, add the redirect URI: https://api.modulex.dev/credentials/oauth2/callback
3

Step 3

Under ‘API permissions’, add Microsoft Graph delegated permissions: Mail.ReadWrite, Mail.Send, MailboxSettings.Read, Contacts.ReadWrite, User.Read, User.ReadBasic.All, offline_access
4

Step 4

Under ‘Certificates & secrets’, create a new client secret
5

Step 5

Copy the Application (client) ID and the client secret into ModuleX

Required Credentials

OAuth Configuration

  • Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
  • Token URL: https://login.microsoftonline.com/common/oauth2/v2.0/token
  • Scopes: offline_access, User.Read, User.ReadBasic.All, Mail.ReadWrite, Mail.Send, MailboxSettings.Read, Contacts.ReadWrite

Available Actions

Parameters

string
required
The identifier of the message to update.
string
required
The name of the label/category to add.
string
The User ID of a shared mailbox. If not provided, defaults to the authenticated user’s mailbox.

Response

Parameters

array
required
Array of recipient email addresses.
string
required
Subject of the approval email.
string
required
URL the recipient clicks to approve / resume the workflow.
string
required
URL the recipient clicks to cancel the workflow.
string
The User ID of a shared mailbox. If not provided, defaults to the authenticated user’s mailbox.

Response

Parameters

string
Given name of the contact.
string
Surname of the contact.
array
Email addresses for the contact (list of strings).
array
Array of phone numbers (list of strings).
object
Additional contact details to merge into the request body. See https://docs.microsoft.com/en-us/graph/api/resources/contact

Response

Parameters

array
Array of TO recipient email addresses (list of strings).
array
Array of CC recipient email addresses (list of strings).
array
Array of BCC recipient email addresses (list of strings).
string
Subject of the email.
string
Content type of the body. Valid values: text, html. (Default: text)
string
Body content of the email in text or HTML.
array
Array of file URLs to fetch and attach to the message (list of strings).
object
Additional Message resource fields merged into the request. See https://docs.microsoft.com/en-us/graph/api/resources/message
string
The User ID of a shared mailbox. If not provided, defaults to the authenticated user’s mailbox.

Response

Parameters

string
required
The identifier of the message to reply to.
string
Content of the reply in text format.
array
Array of TO recipient email addresses to override on the draft (list of strings).
array
Array of CC recipient email addresses (list of strings).
array
Array of BCC recipient email addresses (list of strings).
string
Subject override for the reply.
array
Array of file URLs to attach to the reply (list of strings).
object
Additional Message resource fields merged into the message body.
string
The User ID of a shared mailbox.

Response

Parameters

string
required
The identifier of the message containing the attachment.
string
required
The identifier of the attachment to download.
string
The User ID of a shared mailbox.

Response

Parameters

string
required
Provide email address, given name, surname, or display name (case sensitive).
integer
The maximum number of results to return. (Default: 100)

Response

Parameters

Search query. Can use property syntax like “to:example@example.com” or “subject:example”. Not for use with filter or order_by.
string
OData $filter expression, e.g. contains(subject, ‘meet for lunch?’). Not for use with search.
string
OData $orderby expression, e.g. receivedDateTime desc. Not for use with search.
integer
Maximum number of messages to return. (Default: 100)
boolean
If true, expands attachments on each returned message. (Default: false)
string
Comma-separated message property names to return (e.g. id,subject,from,receivedDateTime). Shrinks payload size.
string
The User ID of a shared mailbox.

Response

Parameters

string
required
The user ID owning the shared folder.
string
required
The ID of the shared folder to search.
string
Search query. Not for use with filter or order_by.
string
OData $filter expression.
string
OData $orderby expression.
integer
Maximum number of messages to return. (Default: 100)

Response

Response

Parameters

string
required
The Microsoft Graph message ID.
boolean
If true, expands attachments on the returned message. (Default: false)
string
The User ID of a shared mailbox.

Response

Parameters

string
If provided, only contacts with the given email address will be retrieved.
integer
Maximum number of contacts to return. (Default: 100)

Response

Parameters

integer
Maximum number of folders to return. (Default: 100)
boolean
If true, recursively include subfolders. (Default: false)
boolean
If true, include hidden folders. (Default: false)

Response

Parameters

integer
Maximum number of messages to return. (Default: 100)
string
The User ID of a shared mailbox.

Response

Parameters

string
The User ID of a shared mailbox.

Response

Parameters

string
required
The identifier of the message to move.
string
required
The identifier of the destination folder.
string
The User ID of a shared mailbox.

Response

Parameters

string
required
The identifier of the message to update.
string
required
The name of the label/category to remove.
string
The User ID of a shared mailbox.

Response

Parameters

string
required
The identifier of the message to reply to.
string
Content of the reply in text format.
array
Optional override for TO recipients (list of strings).
array
CC recipient email addresses (list of strings).
array
BCC recipient email addresses (list of strings).
string
Optional subject override.
array
Array of file URLs to attach (list of strings).
object
Additional Message resource fields merged into the reply body.
string
The User ID of a shared mailbox.

Response

Parameters

array
TO recipient email addresses (list of strings).
array
CC recipient email addresses (list of strings).
array
BCC recipient email addresses (list of strings).
string
Subject of the email.
string
Content type of the body. Valid values: text, html. (Default: text)
string
Body content of the email.
array
Array of file URLs to fetch and attach (list of strings).
object
Additional Message resource fields merged into the request.
string
The User ID of a shared mailbox.

Response

Parameters

string
required
The ID of the contact to update.
string
Given name of the contact.
string
Surname of the contact.
array
Replacement email addresses for the contact (list of strings).
array
Replacement phone numbers (list of strings).
object
Additional contact fields merged into the request body.

Response

Limits & Quotas

  • Microsoft Graph throttles per-app and per-mailbox. Mail endpoints allow approximately 10,000 requests per 10 minutes per app per mailbox; consult Microsoft’s throttling guidance for exact tiers.
  • Search uses Microsoft Graph KQL semantics; combining search with filter or order_by is rejected by Microsoft Graph and short-circuited locally with a success=False error.
  • Attachments are accepted as URLs only; the integration fetches each URL and base64-encodes the bytes for Microsoft Graph’s fileAttachment payload. download_attachment returns base64-encoded bytes rather than writing files to disk.
  • The approve_workflow action does not internally suspend a workflow; the caller must supply both resume_url and cancel_url. The action only sends the approval email.
  • Error model: non-2xx responses are caught and returned as success=False + error; the calling agent can retry or surface the error.

Gmail

AgentMail

Mailgun