Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Microsoft Outlook

A tool for sending and managing emails through Outlook.

  • Knowledge base source

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

Outlook (OAuth2)

OAuth sign-in

Outlook (App Registration)

Credentials

Outlook (OAuth2)

Connect to Microsoft Outlook to access emails, calendar events, and contacts. Supports reading emails, managing calendar, and analyzing email content.

Set up in Microsoft Outlook

  1. Sign in with your Microsoft account.

  2. Review and authorize the requested email and calendar permissions.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select Outlook (OAuth2).

  2. Select Connect, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.

Provider documentation: Setup reference.

Outlook (App Registration)

Connect to Microsoft Outlook using App Registration with client credentials. This method is suitable for server-to-server scenarios and accessing shared mailboxes.

Set up in Microsoft Outlook

  1. In the Azure portal, go to Microsoft Entra ID → App registrations → New registration and register an application.

  2. Under API permissions, add the Microsoft Graph application permissions the app needs (for example Mail.Send, Mail.Read, Calendars.ReadWrite) and grant admin consent.

  3. Under Certificates & secrets → New client secret, create a secret and copy its value immediately (it is shown only once).

  4. Copy the Application (client) ID and Directory (tenant) ID from the app overview.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select Outlook (App Registration).

  2. Enter the credentials and connection details in the fields below.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

Connection fields

StackAI field
Required
What to enter

Client ID

Yes

The client ID of your app registration.

Client Secret

Yes

The client secret of your app registration.

Tenant ID

Yes

The tenant ID of your app registration.

User Principal Name

Yes

The email address of the mailbox you would like to use.

Provider documentation: Setup reference.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Detailed setup guides

Use an action

  1. Add the required Microsoft Outlook action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

Send Email

Send an email (or reply / forward) using the Outlook API

Required permissions: https://graph.microsoft.com/User.Read, https://graph.microsoft.com/Mail.Send, https://graph.microsoft.com/Mail.ReadWrite, https://graph.microsoft.com/Mail.Send.Shared, https://graph.microsoft.com/Mail.ReadWrite.Shared.

Inputs

Field
Type
Required
Description

Recipient Email(s)

string

No

Specify the recipient email address or addresses, separated by commas. If replying to an existing message (message_id provided), leave this blank and the reply will go to the original sender. If forwarding a message, include the new recipient's email address here.

CC Recipients

string

No

Comma-separated list of email addresses to CC (Carbon Copy). These recipients will receive a copy and be visible to all recipients.

BCC Recipients

string

No

Comma-separated list of email addresses to BCC (Blind Carbon Copy). These recipients will receive a copy but will NOT be visible to other recipients.

Reply To

string

No

Comma-separated list of email addresses that replies should go to, instead of the sending mailbox. Sets the email's Reply-To header. If blank, replies go to the sender.

Email Subject

string

No

Subject line of the email. If replying to a message (message_id is provided), leave this blank and the subject will be the original subject of the message you are replying to.

Email Body

string

Yes

Content/body of the email (HTML supported).

Attachments

string

No

Comma-separated list of URLs with files to attach.

Message ID

string

No

If provided, this action will send a reply to the specified message. Recipients and subject are auto-set based on the original message you are replying to.

Save as Draft

boolean

No

Whether to save the email as a draft instead of sending it.

Allowed Emails

string

No

Comma-separated list of allowed email addresses. Use '*@company.com' for a domain wildcard, or '*@*.company.com' to include subdomains. If blank, all emails are allowed.

Mailbox (optional)

string

No

Email address of a shared mailbox to send as or on behalf of. Leave blank to send as yourself. Sending requires Send As or Send on Behalf permission on the mailbox, which is separate from the Full Access needed to read it.

Outputs

Field
Type
Description

Result

string

Summary of the email sending operation.

Send and Wait for Response

Send an email with approval/choice buttons and wait for the recipient to respond.

Permission alternatives

The connection must grant one of these sets of permissions:

  • https://graph.microsoft.com/Mail.Send

Inputs

Field
Type
Required
Description

To (recipient email)

string

Yes

Email address of the recipient who will respond.

Email Subject

string

Yes

Subject line of the email.

Message

textarea

Yes

The message content explaining what needs to be reviewed or approved.

Message format

select (string)

No

Choose 'Plain text' for a simple message or 'Rich text (HTML)' to use links, bold text, lists and tables in the body. The response buttons are added automatically in both modes. Rich text is sent with its own styling intact, including style rules and images, so treat the body as trusted content: only scripts and non-image data links are stripped. Available values: Plain text, Rich text (HTML). Default: text/plain.

Response Type

select (string)

No

The type of response expected: approval buttons or custom choices. Available values: Approval (Approve/Reject), Multiple Choice. Default: approval.

Choices

array

No

List of choices when response_type is 'choice'. Max 5 options.

Approve Button Text

string

No

Custom text for the approve button (default: 'Approve').

Reject Button Text

string

No

Custom text for the reject button (default: 'Reject').

Outputs

Field
Type
Description

Recipient

string

The email address the message was sent to.

Response Type

string

The type of response expected.

Resume Output

dict

The recipient's response data when workflow resumes.

Resume Token

string

Token to resume the workflow after user response.

Reply to Email

Reply to an email conversation using the Outlook API

Required permissions: https://graph.microsoft.com/User.Read, https://graph.microsoft.com/Mail.Send, https://graph.microsoft.com/Mail.ReadWrite, https://graph.microsoft.com/Mail.Send.Shared, https://graph.microsoft.com/Mail.ReadWrite.Shared.

Inputs

Field
Type
Required
Description

Message ID

string

Yes

The message to reply to. Use the Message ID from the 'On Email Received' trigger to answer in the same conversation.

Reply Body

string

Yes

Content of the reply (HTML supported).

Reply to All

boolean

No

Reply to everyone on the original message instead of the sender only.

Additional CC

string

No

Comma-separated addresses to add in CC, kept on top of anyone the reply already goes to.

Attachments

string

No

Comma-separated list of URLs with files to attach.

Save as Draft

boolean

No

Save the reply as a draft instead of sending it.

Mailbox (optional)

string

No

Mailbox that holds the message, when it is not your own. Must match the mailbox the trigger is watching. Replying from a shared mailbox needs Send As or Send on Behalf permission on it, which is separate from the Full Access needed to read it.

Allowed Emails

string

No

If set, the reply is only sent when the original sender is on this comma-separated list. Leave empty to allow any sender.

Outputs

Field
Type
Description

Reply Message ID

string

The Microsoft Graph message ID of the reply. Feed it to Set Email Category or Reply to Email to act on the reply itself rather than on the original.

Reply Mailbox

string

The mailbox holding the reply. Feed it to the Mailbox field of the next Outlook node, because Exchange can file a shared mailbox's sent copy in your own mailbox instead. Empty means your own mailbox.

Result

string

Summary of the reply operation.

Search Emails

Search emails using the Outlook API

Required permissions: https://graph.microsoft.com/Mail.Read.

Inputs

Field
Type
Required
Description

Query

string

No

Search or filter expression. In Search mode, use free text or KQL (e.g., from:user@example.com) to perform a fuzzy search. In Filter mode, use OData $filter syntax (e.g., from/emailAddress/address eq 'user@example.com') to find exact matches. Leave blank to return recent emails (optionally narrowed by Categories).

Query Mode

select (string)

No

How to query the mailbox. 'Search' uses full-text search with KQL syntax. 'Filter' uses OData $filter for exact, structured queries. Use Search to find messages by keywords or text in email content. Use Filter to search results by message fields like sender, date, or status. Available values: Search, Filter (OData). Default: search.

Categories

multiple_select (string)

No

Filter results to emails with these category tags. Pick them from the list, or switch the field to text and type them comma-separated (e.g. 'Trade break, Ops') to use categories the picker doesn't offer, which happens when a category was created in someone else's mailbox. Spacing around the commas is ignored, but each name must otherwise match the tag on the email, including capitalization. Use with Category Match to require all of them or any one. Ignored when Category Match is Uncategorized. Leave empty to ignore category tags. When combined with a text query, categories narrow that query's results (up to Max Results); use categories alone to fetch all tagged emails. Options load from the selected connection. Default: [].

Category Match

select (string)

No

When filtering by Categories, require emails to have ALL selected categories or ANY one of them. With Categories empty, Any finds emails carrying any category tag at all. Choose Uncategorized to find emails with no category tags; it ignores Categories. Available values: All (has every selected category), Any (has at least one, or any tag if none selected), Uncategorized (has no category tags). Default: all.

Mailbox (optional)

string

No

Email address of a shared mailbox to search. Leave blank to search your own mailbox. You must have Full Access to the mailbox you enter.

Max Results

integer

No

The maximum number of results to return. Minimum: 1. Maximum: 501. Default: 25.

From Date

datetime

No

Only include emails received on or after this, uses your browser's timezone. Text accepts 2026-08-01 or 2026-08-01T09:30:00Z.

To Date

datetime

No

Only include emails received on or before this, uses your browser's timezone. Text accepts 2026-08-31 or 2026-08-31T17:00:00Z.

Daily Start Time

string

No

Only include emails received at or after this time, on every day searched. Accepts 9:00 AM or 14:30.

Daily End Time

string

No

Only include emails received at or before this time, on every day searched. Accepts 5:00 PM or 17:00.

Daily Time Zone

select (string)

No

Timezone for Daily Start Time and Daily End Time. Does not affect From Date or To Date. Available values: PACIFIC TIME, MOUNTAIN TIME, CENTRAL TIME, EASTERN TIME, ATLANTIC TIME, UTC, LONDON, PARIS, BERLIN, MOSCOW, DUBAI, INDIA, SINGAPORE, TOKYO, SYDNEY, AUCKLAND. Default: America/New_York.

Include Attachments

boolean

No

Whether to include attachments in the search results. Default: true.

Parse Attachments

boolean

No

Whether to parse attachments in the search results. Default: true.

OCR Attachments

boolean

No

Whether to OCR attachments. Default: false.

Outputs

Field
Type
Description

Emails

object_array

The list of emails found in the search.

Create Event

Create a new event in Outlook

Required permissions: https://graph.microsoft.com/Calendars.ReadWrite.

Inputs

Field
Type
Required
Description

Subject

string

Yes

The subject of the event to create.

Start Time

datetime

Yes

The start time of the event in ISO 8601 format (without timezone). Example: 2025-08-08T19:00:00.

End Time

datetime

Yes

The end time of the event in ISO 8601 format (without timezone). Example: 2025-08-08T20:00:00.

Timezone

select (string)

No

The timezone for the event start and end times.The default timezone is UTC. Available values: PACIFIC TIME, MOUNTAIN TIME, CENTRAL TIME, EASTERN TIME, ATLANTIC TIME, UTC, LONDON, PARIS, BERLIN, MOSCOW, DUBAI, INDIA, SINGAPORE, TOKYO, SYDNEY, AUCKLAND. Default: UTC.

Description

string

No

Description or details about the event.

Location

string

No

Location where the event will take place.

Attendees

array

No

List of attendee email addresses.

Calendar ID

select (string)

No

The calendar to create the event in. Options load from the selected connection. Default: default.

Show As

select (string)

No

The availability status of the event to create. Available values: Busy, Free, Tentative, Out-Of-Office, Working Elsewhere. Default: busy.

Online Meeting

boolean

No

Whether to create the event as an online Teams meeting. Default: false.

Outputs

Field
Type
Description

Event ID

string

The ID of the created event.

Event Link

string

The link to the created event.

Online Meeting Join URL

string

When an online Teams meeting was requested, the URL to join the meeting. Otherwise not set.

Get Events

Retrieve calendar events within a date range

Required permissions: https://graph.microsoft.com/Calendars.Read.

Inputs

Field
Type
Required
Description

Start Date

date

Yes

The start date to retrieve events from (date picker).

End Date

date

Yes

The end date to retrieve events until (date picker).

Timezone

select (string)

No

The timezone for interpreting the start and end dates. Available values: PACIFIC TIME, MOUNTAIN TIME, CENTRAL TIME, EASTERN TIME, ATLANTIC TIME, UTC, LONDON, PARIS, BERLIN, MOSCOW, DUBAI, INDIA, SINGAPORE, TOKYO, SYDNEY, AUCKLAND. Default: America/New_York.

Calendar

select (string)

No

The calendar to retrieve events from. Options load from the selected connection. Default: default.

Outputs

Field
Type
Description

Events

array

List of calendar events in the specified date range.

List Calendars

List all Outlook calendars for the connected account

Required permissions: https://graph.microsoft.com/Calendars.Read.

Inputs

No input fields are required in this catalog entry.

Outputs

Field
Type
Description

Calendars

dict_array

List of Outlook calendars for the connected account.

Set Email Category

Set a category on an Outlook email message

Required permissions: https://graph.microsoft.com/Mail.ReadWrite.

Inputs

Field
Type
Required
Description

Category

select (string)

Yes

Select the category to apply to the email message, or switch the field to text and type the name. Options load from the selected connection.

Message ID

string

Yes

The message ID of the email message to categorize. Comes from an Outlook node that outputs one, such as the 'On Email Received' trigger or 'Reply to Email'.

Mailbox (optional)

string

No

Mailbox that holds the message, when it is not your own. You need Full Access to it. When the message id comes from Reply to Email, wire that node's Reply Mailbox here, since Exchange decides which mailbox keeps the sent copy.

Outputs

Field
Type
Description

Result

string

Summary of the category assignment operation.

Remove Email Category

Remove a category from an Outlook email message

Required permissions: https://graph.microsoft.com/Mail.ReadWrite.

Inputs

Field
Type
Required
Description

Category

select (string)

Yes

Select the category to remove from the email message, or switch the field to text and type the name. Options load from the selected connection.

Message ID

string

Yes

The message ID of the email message to update. This is an output of the 'On Email Received' trigger.

Mailbox (optional)

string

No

Mailbox that holds the message, when it is not your own. Must match the mailbox the trigger is watching. You need Full Access to it.

Outputs

Field
Type
Description

Result

string

Summary of the category removal operation.

Move Email

Move an Outlook email to another folder

Required permissions: https://graph.microsoft.com/Mail.ReadWrite.

Inputs

Field
Type
Required
Description

Message ID

string

Yes

The message ID of the email to move. Comes from an Outlook node that outputs one, such as the 'On Email Received' trigger or 'Search Emails'.

Destination Folder

select (string)

Yes

Folder to move the email into. Pick one from the list, or switch the field to text and type a folder ID, a well-known name such as 'archive', a top-level folder name such as 'Receipts', or a path such as 'Inbox/Clients/Acme'. Options load from the selected connection.

Mailbox (optional)

string

No

Mailbox that holds the message, when it is not your own. You need Full Access to it. The folder list and path lookup use this mailbox too.

Outputs

Field
Type
Description

New Message ID

string

ID of the email in its new folder. Outlook gives a moved email a new ID, so use this one in any later step.

Destination Folder ID

string

ID of the folder the email now lives in.

Result

string

Summary of the move operation.

Mark Email as Read

Mark an Outlook email as read or unread

Required permissions: https://graph.microsoft.com/Mail.ReadWrite.

Inputs

Field
Type
Required
Description

Message ID

string

Yes

The message ID of the email to update. Comes from an Outlook node that outputs one, such as the 'On Email Received' trigger or 'Search Emails'.

Mark as Read

boolean

No

On marks the email as read. Turn off to mark it as unread. Default: true.

Mailbox (optional)

string

No

Mailbox that holds the message, when it is not your own. You need Full Access to it.

Outputs

Field
Type
Description

Message ID

string

ID of the updated email.

Is Read

boolean

Whether the email is now marked as read.

Result

string

Summary of the update.

List Mail Folders

List the subfolders of an Outlook mail folder

Required permissions: https://graph.microsoft.com/Mail.Read.

Inputs

Field
Type
Required
Description

Parent Folder (optional)

select (string)

No

Folder whose subfolders to list. Defaults to Inbox. Pick one from the list, or switch the field to text and type a folder ID, a well-known name such as 'msgfolderroot' for the top level, a top-level folder name, or a path such as 'Inbox/Clients'. Options load from the selected connection.

Mailbox (optional)

string

No

Mailbox to list folders from, when it is not your own. You need Full Access to it.

Outputs

Field
Type
Description

Folders

dict_array

Subfolders of the parent folder, each with its ID, display name, and number of subfolders.

Parent Folder ID

string

ID or well-known name of the folder that was listed.

Export Email as PDF

Export an Outlook email as a PDF, exactly as it looks when printed from Outlook, including inline images

Required permissions: https://graph.microsoft.com/Mail.Read.

Inputs

Field
Type
Required
Description

Message ID

string

Yes

The message ID of the email to export. This is an output of the 'On Email Received' trigger.

Mailbox (optional)

string

No

Mailbox that holds the message, when it is not your own. Must match the mailbox the trigger is watching. You need Full Access to it.

File Name (optional)

string

No

Name of the PDF file, with or without .pdf. Defaults to the email subject.

Outputs

Field
Type
Description

File URL

string

Download URL of the generated PDF.

File Name

string

Name of the generated PDF file.

Triggers

A trigger starts a workflow when its configured event occurs. Configure the event and filters before enabling the trigger.

On Email Received

Trigger a workflow execution every time an email is received in the selected inbox.

Required permissions: https://graph.microsoft.com/Mail.Read, https://graph.microsoft.com/MailboxSettings.Read.

Configuration

Field
Type
Required
Description

Inbox Folder

file_picker

No

Mail folder to watch for new emails. Only emails received directly in this folder trigger the workflow - messages arriving in any nested subfolder are not included. To watch multiple folders, add a separate trigger for each.

Sender Email

string

No

The email address of the sender to get emails from.

Recipient (To or Cc)

string

No

Only trigger on emails where one of these addresses is in the To or Cc field. Comma-separate multiple addresses, e.g. a distribution list. Leave blank to trigger on every email.

Subject includes

string

No

Match emails where the subject contains any of the comma-separated values.

Categories

multiple_select (string)

No

Only trigger on emails tagged with these Outlook categories. A category must already be on the email when it arrives, so this works with an Outlook rule that tags mail on delivery, not with tagging done by hand afterwards. Leave empty and keep Category Match on All to trigger on every email. Options load from the selected connection.

Category Match

select (string)

No

When filtering by Categories, require emails to have ALL selected categories or ANY one of them. With Categories empty, Any fires on emails carrying any category tag at all. Choose Uncategorized to fire only on emails with no category tags; it ignores Categories. Available values: All (has every selected category), Any (has at least one, or any tag if none selected), Uncategorized (has no category tags).

Event inputs

Field
Type
Required
Description

Sender

string

Yes

The email address of the sender of the email.

Subject

string

Yes

The subject of the email.

Body

string

Yes

The body of the email.

Message ID

string

No

The Microsoft Graph message ID of the received email. Provide this to reply to the original message in Send Email.

Attachments

files

No

Email attachments (raw binary content).

Attachment URLs

string

No

Comma-separated list of email attachment download URLs stored in the data pool.

To Recipients

string

No

Comma-separated list of addresses in the email's To field.

Cc Recipients

string

No

Comma-separated list of addresses in the email's Cc field.

Outputs

Field
Type
Description

Sender

string

The email address of the sender of the email.

Subject

string

The subject of the email.

Body

string

The body of the email.

Message ID

string

The Microsoft Graph message ID of the email. Use this to reply in Send Email.

Attachments

files

Email attachments stored in the data pool.

Attachment URLs

string

Comma-separated list of email attachment download URLs stored in the data pool.

To Recipients

string

Comma-separated list of addresses in the email's To field.

Cc Recipients

string

Comma-separated list of addresses in the email's Cc field.

On Email Received (Polling)

Trigger a workflow execution when a new email is received using polling.

Required permissions: https://graph.microsoft.com/Mail.Read.

Configuration

Field
Type
Required
Description

Folder

select (string)

No

Folder to watch in the selected mailbox. Defaults to Inbox. The list reflects the selected mailbox. Options load from the selected connection.

Sender Email

string

No

The email address of the sender to get emails from.

Recipient (To or Cc)

string

No

Only trigger on emails where one of these addresses is in the To or Cc field. Comma-separate multiple addresses, e.g. a distribution list. Leave blank to trigger on every email.

Subject includes

string

No

Match emails where the subject contains any of the comma-separated values.

Categories

multiple_select (string)

No

Only trigger on emails tagged with these Outlook categories. A category must already be on the email when it arrives, so this works with an Outlook rule that tags mail on delivery, not with tagging done by hand afterwards. The list reflects the selected mailbox. Leave empty and keep Category Match on All to trigger on every email. Options load from the selected connection.

Category Match

select (string)

No

When filtering by Categories, require emails to have ALL selected categories or ANY one of them. With Categories empty, Any fires on emails carrying any category tag at all. Choose Uncategorized to fire only on emails with no category tags; it ignores Categories. Available values: All (has every selected category), Any (has at least one, or any tag if none selected), Uncategorized (has no category tags).

Mailbox (optional)

string

No

Shared mailbox address to watch. Leave blank to watch your own inbox. You must have Full Access to the mailbox you enter.

Event inputs

Field
Type
Required
Description

Sender

string

Yes

The email address of the sender of the email.

Subject

string

Yes

The subject of the email.

Body

string

Yes

The body of the email.

Message ID

string

No

The Microsoft Graph message ID of the received email. Provide this to reply to the original message in Send Email.

Attachments

files

No

Email attachments (raw binary content).

Attachment URLs

string

No

Comma-separated list of email attachment download URLs stored in the data pool.

To Recipients

string

No

Comma-separated list of addresses in the email's To field.

Cc Recipients

string

No

Comma-separated list of addresses in the email's Cc field.

Outputs

Field
Type
Description

Sender

string

The email address of the sender of the email.

Subject

string

The subject of the email.

Body

string

The body of the email.

Message ID

string

The Microsoft Graph message ID of the email. Use this to reply in Send Email.

Attachments

files

Email attachments stored in the data pool.

Attachment URLs

string

Comma-separated list of email attachment download URLs stored in the data pool.

To Recipients

string

Comma-separated list of addresses in the email's To field.

Cc Recipients

string

Comma-separated list of addresses in the email's Cc field.

Important behavior

If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?