Add Microsoft 365 Outlook trigger

Use email as a trigger to start a bot when you receive an email in Microsoft 365 Outlook that is using the OAuth2 authentication.

Prerequisites

Ensure that the following per-requisites are completed:
This procedure is for a sample scenario where you want to trigger a bot when you receive a Microsoft 365 Outlook email that meets one the following conditions:
  • Email is from sales@example.com.
  • The subject line contains the phrase Monthly sales report.
  • The email contains an attachment.

Procedure

  1. Log in to the Control Room as a Bot Creator.
  2. On the left pane, click Automation.
    A list of available bots and forms are displayed.
  3. Click Create new > Task Bot.
  4. In the Create a bot page, enter Sales Report in the Name field.
    All the bots are stored in the \Bots folder location.
  5. Optional: Click Browse to change the default location.
  6. Click Create & edit.
  7. In the bot editor page, click Triggers > Microsoft 365 Outlook and double-click or drag Email.
  8. Click the Azure Cloud drop-down menu and select Azure Global.
    Azure Global is used for the Microsoft 365 Commercial version (login.microsoftonline.com) while Azure GCC High is used for the Microsoft 365 Government version (login.microsoftonline.us).
  9. Use the Check every field to change the trigger interval time to 40 minutes.
    The trigger interval for the bot is set to 120 minutes by default.
  10. Verify Client Credentials is selected under the Authentication mode drop-down menu.
  11. For the Client ID, Tenant ID, Username and Client Secret fields, select the Credential tab and click Pick to select a value from the Credential Vault.
    Use the Insecure String tab to provide an existing variable.
  12. In the Select Conditions field, select the following options for the email events:
    • Email from: Enter sales@example.com.
    • Email subject contains: Enter Monthly sales report.
    • Email attachment: Select With attachment.
  13. Optional: Use the Assigned to (optional) drop-down menu to either select an existing record variable, or click the Create variable icon to create a record variable that you want to assign.
    You can use this variable to retrieve various details about the email that triggered the bot, such as sender, recipient, subject, email content, date, action information, email server host, and port data.
  14. Click Save to save your configuration.
    Microsoft 365 Outlook is now configured to trigger the associated bot when the specified email events under the Select Conditions field occur.