This activity is used to trigger other activities when an email appears in any of the folders in the account. Currently Google, Yandex, Yahoo, Mail.ru and iCloud mail services are supported. It is also possible to set a custom server.
It can be used for automatic email processing or other email-related activities. Note, however, that this activity is initially triggered only once. If you want to set up a cyclic operation of "Email trigger", you must manually create a loop.
An example of using the activity is saving the contents of a message to a text file. Here is what such a bot might look like:
This simple workflow saves the text from the email to a file
Also note that this activity returns an object which represents a set of the email data. The returned output can be saved by adding a 'Assign value to variable' block after this action and selecting the Save the previous step result option. This is how it looks like.
This variable stores the contents and other data of the email. Click the View button to see more
How to work with credentials
To start using this activity, you first need to enter your credentials.
The button to add new credentials.
This article describes in detail the process of adding credentials.
This activity requires credentials data of the email account you are going to use for it. It is set in first parameter called Host and login. It is required. This can be done in the Settings - Credentials management menu.
Host and login parameter
Then there is Server settings parameter. It defines what email service will be used.
Server settings parameter and the supported services
This is what you will see when selecting the Custom option. Here you can set the protocol, server host and toggle the secure connection.
Custom server settings
Secure connection - if this checkbox is checked, then the connection will be performed using TLS.
Next, there are the event settings. They define what kind of email should appear to trigger other actions. If you choose to enable the Wait for a specific email to appear option, you will be able to set a specific email subject, body (i.e. its contents) or sender. It is also possible to only check for the emails that contain attachments.
Here you can choose as many options as needed for your task.
Finally, the Stop waiting (in seconds) option defines the awaiting time for the email to appear. After this time No branch will be executed.
Setting the awaiting time