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.
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
Step 4
Under ‘Certificates & secrets’, create a new client secret
Step 5
Copy the Application (client) ID and the client secret into ModuleX
Required Credentials
Field Description Required Format Client ID Microsoft Entra Application (client) ID for the Microsoft Graph app. Yes 00000000-0000-0000-0000-000000000000Client Secret Microsoft Entra client secret for the Microsoft Graph app. Yes -
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
add_label_to_email — Adds a label/category to an email in Microsoft Outlook.
Parameters The identifier of the message to update.
The name of the label/category to add.
The User ID of a shared mailbox. If not provided, defaults to the authenticated user’s mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Id"
},
"subject" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Subject"
},
"categories" : {
"items" : {
"type" : "string"
},
"title" : "Categories" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "AddLabelToEmailOutput" ,
"type" : "object"
}
approve_workflow — Send an email containing approve/cancel URLs to a recipient so they can resume or cancel a workflow externally. The caller (workflow engine) is responsible for generating the resume/cancel URLs and passing them in.
Parameters Array of recipient email addresses.
Subject of the approval email.
URL the recipient clicks to approve / resume the workflow.
URL the recipient clicks to cancel the workflow.
The User ID of a shared mailbox. If not provided, defaults to the authenticated user’s mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"sent" : {
"anyOf" : [
{
"type" : "boolean"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sent"
}
},
"required" : [
"success"
],
"title" : "ApproveWorkflowOutput" ,
"type" : "object"
}
create_contact — Add a contact to the root Contacts folder.
create_draft_email — Create a draft email.
Parameters Array of TO recipient email addresses (list of strings).
Array of CC recipient email addresses (list of strings).
Array of BCC recipient email addresses (list of strings).
Content type of the body. Valid values: text, html. (Default: text)
Body content of the email in text or HTML.
Array of file URLs to fetch and attach to the message (list of strings).
The User ID of a shared mailbox. If not provided, defaults to the authenticated user’s mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Id"
},
"subject" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Subject"
},
"isDraft" : {
"anyOf" : [
{
"type" : "boolean"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Isdraft"
},
"webLink" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Weblink"
}
},
"required" : [
"success"
],
"title" : "CreateDraftEmailOutput" ,
"type" : "object"
}
create_draft_reply — Create a draft reply to an email.
Parameters The identifier of the message to reply to.
Content of the reply in text format.
Array of TO recipient email addresses to override on the draft (list of strings).
Array of CC recipient email addresses (list of strings).
Array of BCC recipient email addresses (list of strings).
Subject override for the reply.
Array of file URLs to attach to the reply (list of strings).
Additional Message resource fields merged into the message body.
The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Id"
},
"subject" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Subject"
},
"isDraft" : {
"anyOf" : [
{
"type" : "boolean"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Isdraft"
}
},
"required" : [
"success"
],
"title" : "CreateDraftReplyOutput" ,
"type" : "object"
}
download_attachment — Downloads an attachment from a message and returns it as base64-encoded content with metadata.
Parameters The identifier of the message containing the attachment.
The identifier of the attachment to download.
The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"name" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Name"
},
"content_type" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Content Type"
},
"size" : {
"anyOf" : [
{
"type" : "integer"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Size"
},
"content_bytes_base64" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Content Bytes Base64"
}
},
"required" : [
"success"
],
"title" : "DownloadAttachmentOutput" ,
"type" : "object"
}
find_contacts — Finds contacts with the given search string.
find_email — Search for an email in Microsoft Outlook. $search cannot be combined with $filter or $orderby.
Parameters Search query. Can use property syntax like “to:example@example.com ” or “subject:example”. Not for use with filter or order_by. OData $filter expression, e.g. contains(subject, ‘meet for lunch?’). Not for use with search.
OData $orderby expression, e.g. receivedDateTime desc. Not for use with search.
Maximum number of messages to return. (Default: 100)
If true, expands attachments on each returned message. (Default: false)
Comma-separated message property names to return (e.g. id,subject,from,receivedDateTime). Shrinks payload size.
The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"count" : {
"default" : 0 ,
"title" : "Count" ,
"type" : "integer"
},
"messages" : {
"items" : {
"additionalProperties" : true ,
"type" : "object"
},
"title" : "Messages" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "FindEmailOutput" ,
"type" : "object"
}
find_shared_folder_email — Search for an email in a shared folder.
Parameters The user ID owning the shared folder.
The ID of the shared folder to search.
Search query. Not for use with filter or order_by.
OData $filter expression.
OData $orderby expression.
Maximum number of messages to return. (Default: 100)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"count" : {
"default" : 0 ,
"title" : "Count" ,
"type" : "integer"
},
"messages" : {
"items" : {
"additionalProperties" : true ,
"type" : "object"
},
"title" : "Messages" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "FindSharedFolderEmailOutput" ,
"type" : "object"
}
get_current_user — Returns the authenticated Microsoft user's ID, display name, email, and principal name via Microsoft Graph. Call this first when the user says 'my emails', 'my inbox', or needs identity context.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Id"
},
"displayName" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Displayname"
},
"mail" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Mail"
},
"userPrincipalName" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Userprincipalname"
}
},
"required" : [
"success"
],
"title" : "GetCurrentUserOutput" ,
"type" : "object"
}
get_message — Retrieve a single email message by its Microsoft Graph message ID.
Parameters The Microsoft Graph message ID.
If true, expands attachments on the returned message. (Default: false)
The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"message" : {
"anyOf" : [
{
"additionalProperties" : true ,
"type" : "object"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Message"
}
},
"required" : [
"success"
],
"title" : "GetMessageOutput" ,
"type" : "object"
}
list_contacts — Get a contact collection from the default contacts folder.
list_folders — Retrieves a list of mail folders in Microsoft Outlook.
Parameters Maximum number of folders to return. (Default: 100)
If true, recursively include subfolders. (Default: false)
If true, include hidden folders. (Default: false)
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"count" : {
"default" : 0 ,
"title" : "Count" ,
"type" : "integer"
},
"folders" : {
"items" : {
"additionalProperties" : true ,
"type" : "object"
},
"title" : "Folders" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "ListFoldersOutput" ,
"type" : "object"
}
list_important_mail — Get the most important mail from the user's Inbox (filters by high importance or flagged status).
Parameters Maximum number of messages to return. (Default: 100)
The User ID of a shared mailbox.
Response {
"$defs" : {
"ImportantMailItem" : {
"additionalProperties" : false ,
"properties" : {
"id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Id"
},
"subject" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Subject"
},
"sender" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sender"
},
"receivedDateTime" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Receiveddatetime"
}
},
"title" : "ImportantMailItem" ,
"type" : "object"
}
},
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"count" : {
"default" : 0 ,
"title" : "Count" ,
"type" : "integer"
},
"data" : {
"items" : {
"$ref" : "#/$defs/ImportantMailItem"
},
"title" : "Data" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "ListImportantMailOutput" ,
"type" : "object"
}
list_labels — Get all the labels/categories that have been defined for a user.
Parameters The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"count" : {
"default" : 0 ,
"title" : "Count" ,
"type" : "integer"
},
"labels" : {
"items" : {
"additionalProperties" : true ,
"type" : "object"
},
"title" : "Labels" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "ListLabelsOutput" ,
"type" : "object"
}
move_email_to_folder — Moves an email to the specified folder.
Parameters The identifier of the message to move.
The identifier of the destination folder.
The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Id"
},
"parentFolderId" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Parentfolderid"
}
},
"required" : [
"success"
],
"title" : "MoveEmailToFolderOutput" ,
"type" : "object"
}
remove_label_from_email — Removes a label/category from an email.
Parameters The identifier of the message to update.
The name of the label/category to remove.
The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"id" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Id"
},
"categories" : {
"items" : {
"type" : "string"
},
"title" : "Categories" ,
"type" : "array"
}
},
"required" : [
"success"
],
"title" : "RemoveLabelFromEmailOutput" ,
"type" : "object"
}
reply_to_email — Reply to an email.
Parameters The identifier of the message to reply to.
Content of the reply in text format.
Optional override for TO recipients (list of strings).
CC recipient email addresses (list of strings).
BCC recipient email addresses (list of strings).
Optional subject override.
Array of file URLs to attach (list of strings).
Additional Message resource fields merged into the reply body.
The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"sent" : {
"anyOf" : [
{
"type" : "boolean"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sent"
}
},
"required" : [
"success"
],
"title" : "ReplyToEmailOutput" ,
"type" : "object"
}
send_email — Send an email to one or multiple recipients.
Parameters TO recipient email addresses (list of strings).
CC recipient email addresses (list of strings).
BCC recipient email addresses (list of strings).
Content type of the body. Valid values: text, html. (Default: text)
Body content of the email.
Array of file URLs to fetch and attach (list of strings).
Additional Message resource fields merged into the request.
The User ID of a shared mailbox.
Response {
"additionalProperties" : false ,
"properties" : {
"success" : {
"title" : "Success" ,
"type" : "boolean"
},
"error" : {
"anyOf" : [
{
"type" : "string"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Error"
},
"sent" : {
"anyOf" : [
{
"type" : "boolean"
},
{
"type" : "null"
}
],
"default" : null ,
"title" : "Sent"
}
},
"required" : [
"success"
],
"title" : "SendEmailOutput" ,
"type" : "object"
}
update_contact — Update an existing contact.
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.
Links