Configuring a Microsoft 365 Outlook web trigger in an automation

Configure a Microsoft 365 Outlook web trigger to trigger an action whenever an event occurs in the Microsoft 365 Outlook inbox. This example shows how to create a Task Bot with a Microsoft 365 Outlook web trigger to display the the body of the email in a message box when the Microsoft 365 Outlook inbox receives the email.

The Microsoft 365 Outlook web trigger monitors the Microsoft 365 Outlook inbox for new emails. When an email arrives, the trigger initiates the Message Box action to display the body of the email.

Prerequisites

Ensure that the following prerequisites are met:
  • Prerequisites mentioned in Microsoft 365 Outlook web trigger prerequisites section.
  • Active OAuth connection for Microsoft 365 Outlook account.
  • A valid Microsoft Azure certificate stored in the Credential Vault.
  • Record variable named OutlookTriggerData.

Procedure

  1. Perform the following steps to create a Task Bot
    1. On the left pane, click Automation.
    2. Click Create > Task Bot.
      The Create Task Bot wizard appears.
    3. Enter an appropriate name for the bot in the Name field.
      All the bots are stored in <\Bots> folder by default.
    4. Optional: Add a description for the bot in the Description field.
    5. Optional: Click Choose and follow the prompts to save the bot in a different folder.
    6. Click Create & Edit.
      The bot is created and the Bot editor page appears.
  2. Perform the following steps to add and configure the Microsoft 365 Outlook web trigger.
    1. Click Triggers > Microsoft 365 Outlook, and then double-click or drag Web trigger to add the web trigger to Triggers section.
    2. Select When new email arrives from the Listen to event drop-down menu.
    3. Enter the Microsoft 365 Outlook email address in the Email address field.
    4. Enter inbox in Monitor mailbox folder.
    5. Click Pick to choose the preconfigured OAuth connection from the Pick an OAuth connection modal.
    6. Select Certificate > Credentials > Choose and follow the prompts in the Pick a credential modal to select the Microsoft Azure certificate that is already available in the Credential Vault.
    7. Select OutlookTriggerData from the from the Response drop-down.
  3. Perform the following steps to add and configure the Message Box action.
    1. Click Actions > Message Box, and then double-click or drag Message Box action to add it to the Actions section.
    2. Enter an appropriate title for the message box in Enter the message box window title.
    3. Enter $OutlookTriggerData{bodyPreview}$ in Enter the message to display.
      The bodyPreview key from the trigger response data contains the body of the received email as the corresponding value.
  4. Click Save to save the automation.
When you click Run > Run with triggers, the system activates the trigger and the trigger starts listening for When new email arrives event in the <inbox> folder of the monitored Microsoft 365 Outlook account. When a new email arrives, the trigger starts the Message Box action. The message box displays the body of the received email.