Using Email Trigger in Trigger loop Handle
- Updated: 2023/08/29
Using Email Trigger in Trigger loop Handle
You can use the email trigger to start the bot when an email is sent or received.
Prerequisites
Procedure
-
In the Trigger loop Handle, select
Email in the Trigger on
field.
A list of options for the email trigger will appear for you to configure.
-
Choose one of the following server types as the trigger for your incoming
emails:
Server type Steps Microsoft Outlook Click Outlook. Microsoft Outlook is set as the email service and the bot is triggered when you receive a new email.
Email server Click Email server. - Enter the email service Host information.
For example, if you are using Office365 as your email service, enter Outlook.office365.com.
- Select IMAP or POP3.IMAP and POP3 are protocols used to connect to the mail server that enables you to read your emails through an email client. By default IMAP is selected.Note: The POP3 protocol has a known limitation where any new calender invite can also trigger the bot.
- Use secure connection (SSL/TLS): This option is selected by default. This option enables you to use a secure connection with the mail server.
- Enter the configured port number for your email server in the Port field.
- Select one of the following user
authentication methods to sign in to the email
server:
-
Basic
- Credential: Click Pick to select the stored Username and Password.
- Variable: Specify a variable.
- Insecure string: Enter the username and password.
-
OAuth 2.0 - Client
credentials
- Specify the unique client and tenant IDs generated when you registered the application in the Microsoft Azure portal.
- Specify the username you want to use to access the mail server.
- Specify the client secret that you generated for your app in the app
registration portal.For Client ID, Tenant ID, Username and Client Secret fields, choose from the following:
- Credential: Use a value available in the credential vault.
- Variable: Specify a variable.
- Insecure string: Manually enter a value.
Note: Client Credentials flow does not support Gmail.
Note: The Email in folder does not support sub-folders when you set the protocol as POP3 for Email Server, -
Basic
EWS server Click EWS server. - From the Microsoft Exchange Version drop-down menu, select the
version that your organization is using.
- Exchange Server 2013
The Microsoft Exchange Server 2019 is now supported. Therefore, if your organization is using the Exchange Server 2013, 2016 or 2019 versions of the Microsoft Exchange Server, select Exchange Server 2013.
- Exchange2010_SP2
- Exchange2010_SP1
- Exchange2010
- Exchange2007_SP1
For example, if you are using Microsoft Exchange Service Pack 2, select Exchange2010_SP2 as your email service.
- Exchange Server 2013
- Enter the
domain name, for example,
smtp.office365.com
- Select one of the following user
authentication methods to sign in to the email
server:
-
Basic
- Credential: Click Pick to select the stored Username and Password.
- Variable: Specify a variable.
- Insecure string: Enter the username and password.
-
OAuth 2.0 - Client
credentials
- Specify the unique client and tenant IDs generated when you registered the application in the Microsoft Azure portal.
- Specify the username you want to use to access the mail server.
- Specify the client secret that you generated for your app in the
app registration portal.For Client ID, Tenant ID, Username and Client Secret fields, choose from the following:
- Credential: Use a value available in the credential vault.
- Variable: Specify a variable.
- Insecure string: Manually enter a value.
Note: There is no shared mailbox support for Microsoft Outlook but as a workaround, you can use the EWS server credentials flow with a shared email as a username string.
-
Basic
- Enter the email service Host information.
-
Specify a time in the Check
every field for all the server types to set the trigger
interval.
The trigger interval for the bot is set to 120 seconds by default. You can also specify the minutes.
Note: The trigger interval that you have configured using the Check every drop-down menu does not depend on the number of emails received during the scheduled interval. -
Specify an email event for the selected server type in the
Select Conditions fields.
- Email from: Specify the email addresses.
- Email subject contains: Specify that an email contains a condition.
- Email without an attachment
- Email with an attachment
- Email in folder: Specify an email in a folder.
Note: When you select the Email subject contains check box, the email trigger is executed depending on the following subject conditions:- When the subject line is provided within double quotation marks (""), for example, "ABC spreadsheet", the trigger is executed only when the email subject has an exact match for the string provided within quotation marks.
- When multiple subject lines are separated by semicolons, for example, ABC spreadsheet; ABC project logs, the trigger is executed when the email subject matches any of the subject lines mentioned.
-
Specify your variable in the Assigned
to field.
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.You can select from the following:
- Multiple variables
- Record
-
Click Save to save your configuration.
You have configured the email trigger for use with the trigger loop handle.