> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Outlook

> Connect to Microsoft Outlook via MS Graph API to read and send emails directly from your FlowX.AI processes, using Azure AD authentication for native Outlook integration.

## Overview

Microsoft Outlook is a data source type in Integration Designer that provides native Outlook connectivity through the Microsoft Graph API. Unlike the [Email Trigger](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/email-trigger.md) (IMAP) and [Email Sender](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/email-sender.md) (SMTP) data sources, Microsoft Outlook uses Azure AD authentication and the MS Graph API for a unified read and send experience.

Use cases include:

* **Email-triggered workflows**: Automatically start processes when emails arrive in an Outlook mailbox
* **Customer communication**: Send emails and replies directly from business processes
* **Document processing**: Trigger workflows when emails with attachments are received
* **Unified inbox management**: Read and send from the same data source configuration

> [!NOTE]
>
> Microsoft Outlook supports three scope modes:
>
> * **Read Emails** — monitor a mailbox and trigger processes
> * **Send Emails** — send emails from processes via notification templates
> * **Read & Send Emails** — both capabilities in a single data source

### When to use Microsoft Outlook vs Email Trigger / Email Sender

FlowX.AI offers two ways to connect to email: **Microsoft Outlook** (MS Graph API) and **Email Trigger** / **Email Sender** (IMAP/SMTP). Choose based on your mail provider and requirements.

| | Microsoft Outlook | Email Trigger + Email Sender |
| - | - | - |
| **Protocol** | MS Graph API | IMAP (read) + SMTP (send) |
| **Authentication** | Azure AD (client credentials) | Username + password / app password |
| **Read + Send** | Single data source (Read & Send scope) | Two separate data sources |
| **Reply threading** | Native — uses MS Graph message ID to maintain conversation threads | Manual — requires `Message-ID` header forwarding |
| **Provider support** | Microsoft 365 / Outlook only | Any IMAP/SMTP-compatible mail server |
| **Best for** | Organizations using Microsoft 365 | Gmail, self-hosted mail servers, or mixed environments |

> [!TIP]
>
> If your organization uses Microsoft 365, the Outlook data source is the recommended approach. It simplifies configuration by combining read and send into a single data source with Azure AD authentication.

***

## How it works

**1. Register an Azure AD app**

Create an app registration in Azure AD with the required MS Graph permissions for your scope.

**2. Create a Microsoft Outlook data source**

Configure the connection in Integration Designer with your Azure AD credentials and select the desired scope.

**3. Connect to processes**

For **Read** scope: link to a Message Start Event node and activate from Manage Triggers.
For **Send** scope: link to a notification template and use the Send Notification action.

**4. Process emails**

FlowX.AI monitors the mailbox (Read) or sends emails (Send) through the MS Graph API.

***

## Creating a Microsoft Outlook data source

![Add Data Source - Microsoft Outlook](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.5/ds_outlook_form.png)

### Prerequisites

Before configuring a Microsoft Outlook data source, ensure you have:

* Access to Integration Designer with appropriate permissions
* An Azure AD app registration with the required MS Graph API permissions:

| Scope | Required permissions (any one) |
| - | - |
| **Read Emails** | `Mail.Read`, `Mail.ReadBasic`, or `Mail.ReadWrite` |
| **Send Emails** | `Mail.Send` or `Mail.ReadWrite` |
| **Read & Send Emails** | One read permission + one send permission |

* Azure AD credentials: **Tenant ID**, **Client ID**, and a **Client Secret** (or, starting with 5.9.1, a **certificate** — see [Step 2](#step-2-configure-authentication))

> [!WARNING]
>
> MS Graph permissions must be configured as **Application permissions** (not Delegated) in your Azure AD app registration, since the connection uses client credentials flow.

### Step 1: Access Integration Designer

1. Navigate to **FlowX Designer** → **Your workspace** → **Projects** → **Your project** → **Integrations** → **Data Sources**
2. Click the **+** button to open the **Add Data Source** dialog
3. Select **Microsoft Outlook** as the data source type

### Step 2: Configure authentication

**Tenant ID** `string` *required*

The Azure AD tenant ID for your organization.

> [!TIP]
>
> This field accepts configuration parameters. Use `${configParam}` syntax to reference environment-specific values.

**Client ID** `string` *required*

The application (client) ID from your Azure AD app registration.

> [!TIP]
>
> This field accepts configuration parameters for environment-specific credentials.

**Client Secret** `string` *required*

The client secret generated in your Azure AD app registration.

> [!TIP]
>
> Store sensitive credentials in configuration parameters and reference them here using `${configParam}` syntax.

**Use certificate** `boolean`

**Available starting with FlowX.AI 5.9.1.** Authenticate to Microsoft Graph with a certificate instead of a client secret. When you turn this **ON**, the **Client Secret** above is ignored and the certificate is used to authenticate. Configure:

* **Certificate type** — how the certificate is provided: **Base64** (paste the encoded certificate content) or **Path** (a path to the certificate file reachable by the integration).
* **Format** — the certificate format: **PEM** or **PKCS12**.
* **Password** — the certificate password. Required only when the format is **PKCS12**.

> [!TIP]
>
> This field accepts configuration parameters. Store the certificate content or path and the password in configuration parameters and reference them with `${configParam}` syntax.

### Step 3: Test the connection

Click the **Test Connection** button to verify your Azure AD credentials:

| Result | Message | Action |
| - | - | - |
| ✅ Success | "Established connection" | Proceed to configure scope |
| ❌ Error | "Failed to establish connection" | Check Azure AD credentials and permissions |

> [!NOTE]
>
> The data source can be created even if the test connection fails. If the test fails on creation, you will be redirected to the **Authorization** tab with a failed connection message instead of the **Settings** page.

### Step 4: Configure scope and email

**Scope** `select` *required*

The email capabilities for this data source:

| Option | Description |
| - | - |
| **Read Emails** | Monitor a mailbox and trigger processes when emails arrive |
| **Send Emails** | Send emails from processes via notification templates |
| **Read & Send Emails** | Both read and send capabilities |

**Email Address** `string` *required*

The email address of the mailbox to monitor or send from.

**Validation:** Must be a valid email format.

> [!TIP]
>
> This field accepts configuration parameters for environment-specific values.

### Step 5: Name and description

**Name** `string` *required*

A unique, descriptive name for the Microsoft Outlook data source.

**Validation rules:**

* Required field
* Must be unique within the project
* Only letters, numbers, and these characters allowed: `[]`, `()`, `.`, `_`, `-`
* Minimum 3 characters, maximum 50 characters

**Description** `string`

Optional description explaining the purpose of this data source.

Click **Create** to save the data source.

***

## Settings page

After creating the data source, configure monitoring and validation settings in the **Settings** tab. The available settings depend on the selected scope.

![Microsoft Outlook - Settings tab](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.6/ms_outlook_settings.png)

### Read scope settings

For data sources with **Read Emails** or **Read & Send Emails** scope:

#### Filtering criteria

**Email Address** `string`

The email address that will be monitored. Editable after creation.

> [!TIP]
>
> This field accepts configuration parameters.

**Mailbox Folder** `string`

The mailbox folder to monitor for incoming emails.

**Default:** `Inbox`

Supported well-known folder names:

* `Inbox`, `Sent`, `Drafts`, `Deleted`, `Junk`, `Archive`, `Outbox`

> [!TIP]
>
> This field accepts configuration parameters for environment-specific folder names.

**Scope** `string`

Displays the scope selected during creation. This field is read-only.

#### Attachment validations

Toggle **ON** the **Add validations to Attachments** option to configure validation rules for incoming email attachments.

![Microsoft Outlook - Attachment validations](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.6/ms_outlook_validations.png)

> [!NOTE]
>
> If any validation fails, the email will not be processed and a warning will appear in the **Failed Triggers** section in Runtime.

**Allowed File Types** `array`

Restrict which attachment file types are accepted:

Earlier releases selected allowed types from the file type categories below.

| Type | Extensions |
| - | - |
| PDF | `.pdf` |
| DOCUMENT | `.doc`, `.docx`, `.txt` |
| IMAGE | `.png`, `.jpg`, `.jpeg`, `.tif`, `.tiff`, `.gif` |
| EXCEL | `.xls`, `.xlsx`, `.csv` |
| ZIP | `.zip` |

> [!NOTE]
>
> Leave empty to accept all file types.

> [!NOTE]
>
> **Individual file extensions**
>
> **Allowed File Types** selects individual file extensions instead of these categories. The categories no longer exist in the runtime, so the table above serves only as a reference for what each one used to cover.
>
> Selected extensions are stored as bare uppercase values without a leading dot (`PDF`, `DOCX`). Input is tolerant of case and of a leading dot, and existing data sources are migrated automatically, with each stored category expanded into the individual extensions it covered.

**Maximum File Size** `number`

Maximum allowed size per attachment file.

**Maximum:** 25 MB

**Maximum File Count** `number`

Maximum number of attachments allowed per email.

> [!TIP]
>
> All fields in the Settings section accept configuration parameters, enabling environment-specific configurations.

### Send scope settings

For data sources with **Send Emails** scope only, the Settings tab shows a simplified view:

**Email Address** `string`

The email address used as the sender ("From" address) for outgoing emails.

**Scope** `string`

Displays the scope selected during creation. This field is read-only.

> [!NOTE]
>
> Send-only data sources do not display the **Mailbox Folder** or **Attachment Validations** fields, since those apply only to the Read scope. Sent emails are automatically saved to the Sent Items folder.

***

## Authorization page

![Microsoft Outlook - Authorization tab](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.6/ms_outlook_auth.png)

The **Authorization** tab displays the Azure AD credentials and allows you to update them or re-test the connection:

**Tenant ID** `string` *required*

Azure AD tenant ID.

**Client ID** `string` *required*

Azure AD application (client) ID.

**Client Secret** `string` *required*

Azure AD client secret.

**Use certificate** `boolean`

**Available starting with FlowX.AI 5.9.1.** Use a certificate instead of the client secret. When turned **ON**, the **Client Secret** is ignored. Set the **Certificate type** (**Base64** or **Path**), the **Format** (**PEM** or **PKCS12**), and, for PKCS12, the certificate **Password**. See [Step 2: Configure authentication](#step-2-configure-authentication) for details.

Click **Test Connection** to verify the credentials. The test validates both the authentication and the required MS Graph permissions for the configured scope.

***

## Connecting to processes

### Reading emails (process trigger)

To trigger processes when emails arrive:

**1. Configure the Message Start Event**

Open your process definition and add a **Message Start Event** (Start Catch Message) node.

**2. Select Microsoft Outlook as trigger type**

In the node configuration, set **Trigger Type** to **Microsoft Outlook**. Then select the Microsoft Outlook data source (only data sources with **Read** or **Read & Send** scope are shown).

**3. Activate the trigger**

Navigate to **Runtime Settings** → **Manage Triggers** and activate the trigger.

![Message Start Event - Microsoft Outlook trigger](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.6/email_trigger.png)

> [!WARNING]
>
> The trigger must be activated from **Manage Triggers** in Runtime Settings before email monitoring begins.

> [!NOTE]
>
> The Microsoft Outlook data source polls for new emails every **30 seconds** by default, using the same polling scheduler as the Email Trigger (configurable via `EMAIL_GATEWAY_IMAP_POLLING_INTERVAL`). Each polling cycle processes up to **50 messages** (configurable via `EMAIL_GATEWAY_MS_GRAPH_MAX_MESSAGES_PER_POLL`). Emails with the same timestamp as the last processed email are deduplicated automatically using their internet message ID.

### Sending emails (notification template)

To send emails from processes:

**1. Link to a notification template**

Open a notification template and set **Email Server** to **Predefined Email Connection**. Select the Microsoft Outlook data source (only data sources with **Send** or **Read & Send** scope are shown).

**2. Add a Send Notification action**

Add a [Send Notification](https://docs.flowx.ai/6.x/docs/building-blocks/actions/send-notification-action.md) action to a process node and select the notification template.

![Notification template - Outlook data source](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.6/template.png)

### Replying to received emails

Microsoft Outlook supports replying to emails received via the Read scope, maintaining the original conversation thread in the recipient's inbox.

**1. Configure the Send Notification action**

Add a [Send Notification](https://docs.flowx.ai/6.x/docs/building-blocks/actions/send-notification-action.md) action to a process node. In the action configuration, turn on the **Reply to received emails** toggle.

**2. Set the Reply to Email Header**

Specify the process key that holds the original email's header parameters (e.g., `emailMessage.headerParams`). This is required when the reply toggle is on.

**3. Configure recipients (optional)**

By default, the reply is sent to the original sender. You can override this by adding explicit **Receivers**, **CC**, or **BCC** addresses. Duplicate recipients are automatically removed.

> [!NOTE]
>
> The reply mechanism uses the `x-ms-graph-message-id` header from the original email to thread the reply correctly. If this header is not available, the system falls back to the standard `Message-ID` header and looks up the original message via the MS Graph API. Sent replies are automatically saved to the Sent Items folder.

***

## Email data schema

When an email triggers a process, the following data structure is available in your process variables:

```json theme={"dark"}
{
  "emailMessage": {
    "subject": "Support Request #12345",
    "dateTime": "2026-01-15T10:30:00Z",
    "sender": "customer@example.com",
    "body": "Email body content...",
    "fileAttachments": [
      {
        "filePath": "email-attachments/proc-123/invoice.pdf",
        "downloadPath": "internal/files/uuid-456/download"
      }
    ],
    "headerParams": {
      "Message-ID": "<abc123@example.com>",
      "x-ms-graph-message-id": "AAMk..."
    }
  }
}
```

### Schema fields

| Field | Type | Description |
| - | - | - |
| `subject` | string | Email subject line |
| `dateTime` | string (ISO 8601) | Timestamp when email was received |
| `sender` | string | Sender's email address |
| `body` | string | Email body content |
| `fileAttachments` | array | List of attachment metadata objects |
| `fileAttachments[].filePath` | string | Storage path in Document Plugin |
| `fileAttachments[].downloadPath` | string | API path to download the file |
| `headerParams.Message-ID` | string | Standard email message identifier |
| `headerParams.x-ms-graph-message-id` | string | MS Graph message ID (used for replies) |

***

## Managing triggers at runtime

### Manage Triggers

Navigate to **Runtime** → **Runtime Settings** → **Manage Triggers** to view and control Microsoft Outlook email triggers.

![Manage Triggers - Microsoft Outlook](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.6/triggers.png)

| Column | Description |
| - | - |
| **State** | Current status: `Active` or `Deactivated` |
| **Trigger Type** | "Email Trigger" for Microsoft Outlook email triggers |
| **Event Name** | The Microsoft Outlook data source name |
| **Location** | `Local`, or the library project the trigger comes from |

### Activation requirements

For a Microsoft Outlook trigger to appear in Manage Triggers:

1. Microsoft Outlook data source must be created with **Read** or **Read & Send** scope
2. Data source must be linked to a Message Start Event node
3. The process must be part of a build in the **Active Policy**

### Failed Triggers

When emails fail validation or processing errors occur, they appear in the **Failed Triggers** section under **Runtime Settings**.

Failed triggers display the timestamp, trigger name, cause type, context (e.g., sender address), and detailed error messages. Click a row to open the details page with full diagnostic information.

#### Common failure causes

> [tab] File type not permitted
>
> **Message:** "The file `{filename}` could not be uploaded because it is not on the list of permitted file types."
>
> **Resolution:** Update the **Allowed File Types** in the data source Settings tab, or ask the sender to use an accepted format.

> [tab] File size exceeded
>
> **Message:** "`{filename}` is too large. Maximum allowed: 25 MB"
>
> **Resolution:** The attachment exceeds the configured maximum file size. Ask the sender to reduce the file size.

> [tab] File count exceeded
>
> **Message:** "File limit exceeded. For this trigger there is a limit of `{limit}` per email."
>
> **Resolution:** The email has more attachments than allowed. Ask the sender to split attachments across multiple emails.

> [tab] Authentication failure
>
> **Message:** "MS Graph connection failed: \[error details]"
>
> **Resolution:** Azure AD credentials may have expired or been revoked. The system retries once on 401/403 errors by refreshing the cached client. If the retry also fails, go to the **Authorization** tab, verify the Tenant ID, Client ID, and Client Secret, and click **Test Connection**. Regenerate the client secret in Azure AD if it has expired.

> [tab] Missing permissions
>
> **Message:** "MS Graph application is missing required permissions: \[list]. Please add these as Application permissions in Azure AD and grant admin consent."
>
> **Resolution:** The Azure AD app registration is missing one or more required MS Graph permissions. Add the listed permissions as **Application permissions** (not Delegated) in the Azure portal and ensure **admin consent** has been granted.

***

## Use case: document processing with auto-reply

This example walks through a complete email-triggered workflow: an email with an attachment arrives, the process extracts and classifies the document, then replies to the sender with a confirmation.

**1. Create a Microsoft Outlook data source**

Configure a data source with **Read & Send Emails** scope, pointed at your intake mailbox (e.g., `documents@company.com`). Set attachment validations to accept PDF and DOCUMENT types with a 25 MB size limit.

**2. Design the process**

Create a process with a **Message Start Event** node configured to trigger from the Outlook data source. The email data is available in process variables under `emailMessage`.

**3. Access email data in downstream nodes**

Use the email schema fields in Script or Business Rule nodes to route the process:

```javascript theme={"dark"}
// Access email fields in a Script node
var subject = input.get("emailMessage").get("subject");
var sender = input.get("emailMessage").get("sender");
var attachments = input.get("emailMessage").get("fileAttachments");

// Route based on subject keywords
if (subject.contains("invoice")) {
    output.put("documentType", "INVOICE");
} else {
    output.put("documentType", "GENERAL");
}
```

**4. Process the attachment**

Use the `fileAttachments[].downloadPath` to retrieve the file from the Document Plugin for classification, data extraction, or storage.

**5. Reply to the sender**

Add a **Send Notification** action with the **Reply to received emails** toggle turned on. Set the reply header to `emailMessage.headerParams`. The reply is threaded under the original email in the sender's inbox.

**6. Activate the trigger**

Navigate to **Runtime Settings** → **Manage Triggers** and activate the trigger to begin monitoring.

***

## Best practices

> [card] Use configuration parameters
>
> Store Azure AD credentials (Tenant ID, Client ID, Client Secret) in configuration parameters for secure, environment-specific management.

> [card] Set appropriate validations
>
> Configure file type, size, and count limits for Read scope to prevent processing of unwanted or oversized attachments.

> [card] Monitor failed triggers
>
> Regularly review the Failed Triggers section to identify issues with email processing or connection problems.

> [card] Use least-privilege permissions
>
> Grant only the minimum required MS Graph permissions for your scope. Use `Mail.Read` instead of `Mail.ReadWrite` if you only need read access.

***

## Troubleshooting

> [accordion] Connection test fails
>
> Common causes:
>
> * **Invalid credentials**: Verify Tenant ID, Client ID, and Client Secret in Azure AD
> * **Missing permissions**: Ensure the app registration has the required MS Graph application permissions
> * **Permissions not consented**: Admin consent may be required for application permissions
> * **Expired client secret**: Generate a new client secret in Azure AD

> [accordion] Emails not triggering processes
>
> Check:
>
> 1. Does the data source have **Read** or **Read & Send** scope?
> 2. Is the trigger **Active** in Manage Triggers?
> 3. Is the correct mailbox folder configured?
> 4. Do incoming emails pass attachment validation rules?
> 5. Review Failed Triggers for error details

> [accordion] Emails not sending
>
> Check:
>
> 1. Does the data source have **Send** or **Read & Send** scope?
> 2. Is the data source linked to a notification template?
> 3. Is the notification template's **Email Server** set to **Predefined Email Connection**?
> 4. Does the Azure AD app have `Mail.Send` permission?
> 5. Review process instance logs for error details

> [accordion] Permission errors
>
> Required MS Graph **application permissions** by scope:
>
> | Scope | Required permission |
> | - | - |
> | Read | `Mail.Read`, `Mail.ReadBasic`, or `Mail.ReadWrite` |
> | Send | `Mail.Send` or `Mail.ReadWrite` |
>
> Ensure:
>
> * Permissions are set as **Application** (not Delegated)
> * **Admin consent** has been granted
> * The app registration is in the correct Azure AD tenant

***

## Related resources

> [card] [Email Trigger](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/email-trigger.md)
>
> Configure IMAP connections to trigger processes from incoming emails

> [card] [Email Sender](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/email-sender.md)
>
> Configure SMTP connections to send emails from processes

> [card] [Send Notification Action](https://docs.flowx.ai/6.x/docs/building-blocks/actions/send-notification-action.md)
>
> Send emails and reply to received emails from process nodes

> [card] [Message Start Event](https://docs.flowx.ai/6.x/docs/building-blocks/node/message-events/message-catch-start-event.md)
>
> Configure message-based and email-based process triggers

> [card] [Integration Designer](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/integration-designer.md)
>
> Learn about other data source types and workflow creation

> [card] [Configuration Parameters](https://docs.flowx.ai/6.x/docs/platform-deep-dive/core-extensions/configuration-parameters.md)
>
> Use environment variables for flexible configurations


## Related topics

- [Message Start Event](https://docs.flowx.ai/6.x/docs/building-blocks/node/message-events/message-catch-start-event.md)
- [FlowX.AI 5.5.0 Release Notes](https://docs.flowx.ai/release-notes/v5.x/v5.5.0-february-2026/v5.5.0-february-2026.md)
- [Email Trigger](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/email-trigger.md)
- [FlowX.AI 5.9.0 Release Notes](https://docs.flowx.ai/release-notes/v5.x/v5.9.0-june-2026/v5.9.0-june-2026.md)
- [Email Sender](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/email-sender.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.