You can use the email trigger to start a bot when your receive an email
after connecting to the Microsoft 365 Outlook server using the OAuth
2.0 authentication.
Prerequisites
Ensure that in
Automation Workspace, you have used the
Trigger loop
package to add the
Trigger loop to your
bot.
Procedure
-
In the Trigger loop, select Trigger loop:
Handle.
-
Click the Trigger on drop-down menu and select .
-
Click the Azure Cloud drop-down menu and select one of
the following options:
- Azure Global: For the Microsoft 365 Commercial version
(login.microsoftonline.com)
- Azure GCC High: For the Microsoft 365 Government version
(login.microsoftonline.us)
-
Use the Check every field to specify or set the trigger
interval time.
The trigger interval for the
bot is set to
120 minutes by default.
(Optional) Click the
Minutes drop-down menu to change the value to
Seconds.
-
Click the Authentication mode drop-down menu and select
Client Credentials.
-
For the Client ID, Tenant ID,
Username and Client Secret
fields, select one of the following tabs:
- Credential: Click Pick to
select a value from the credential vault.
- Variable: Specify a variable.
- Insecure String: Enter a value or click the Insert a
value icon to select an existing variable.
-
(Optional) Use the Select Conditions field to select any
or all of the following options for email events from the selected server
type:
- Email from: Enter the email addresses or click
the Insert a value icon to select an existing
variable.
- Email subject contains: Enter a condition for the
email subject line.
For example, you can enter 'Sales report' as a
condition to trigger a bot when you receive any email
that contains the subject line as 'Sales report'. You can also click
the Insert a value icon to select an existing
variable.
- Email attachment: Select one of the following
email attachment options:
- With attachment
- Without attachment
- Email in folder: Enter the filepath of the email
folder.
For example, if you want to trigger a bot
when you receive an email in Microsoft 365 Outlook folder called 'Sales',
enter inbox/sales. You can also click the
Insert a value icon to select an existing
variable.
-
Use the Assigned to (optional) field to select one of
the following tabs:
- Multiple variables: Click Add variable
mapping to associate a key with a variable.
- Record: Use the Assigned
to drop-down menu to assign an existing variable or click
the Create variable icon to create a variable that
you want to assign.
Note: 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.
-
Click Save to save your configuration.
Microsoft 365 Outlook is now configured within
the trigger loop handle of a bot.