Resources

The Knowledgebase articles are deprecated. Please visit the new Guides and Resources here: https://www.uipath.com/developers/guides-and-resources.

Knowledge Base

Email Automation. Mail Trigger Sample.

Email triggers are the foundation of any email automation process. In the attached Mail_Trigger_Sample Workflow, the Inbox is checked every 60 seconds for fresh emails.

 

 Mail_Trigger_Sample_Flowchart.png

If a new email is detected and a certain condition is met (a specific Keyword is found in the Subject), then the message Body is passed as an argument to the Process_Email Workflow.

 
email_Trigger_ProcessEmailFlowchart.png

Workflow Steps:

1. Before running the Mail_Trigger_Sample workflow, you will need to set:

Email address:

email_trigger_SetEmail.png

 

Password:

 

Keyword:

email_trigger_SetKeyword.png


Also, please make sure you set your MailFolder, Port, and Server in the GetIMAPMailMessages activity properties. By default, the Workflow is configured to work with the Gmail settings.
 
email_trigger_IMAP_Settings.png
 

2. When the Workflow is running, it checks your email for new messages (using the GetIMAPMailMessages activity). If no new email is found, it waits for 60 seconds and then it tries again. You can change the waiting time to other value, within the Delay activity.

email_trigger_SetDelay.png

3. If a new email is found, it is marked as read (you can change that by un-checking the MarkAsRead property in the GetIMAPMailMessages activity) 

4. The Workflow then checks if the email's subject contains the keyword.  If there's a match, the Process_Email Workflow is invoked and the email body is passed as an argument (Body)

5. The Process_Email Workflow will pop up a window with the message body.

 
Note: The workflows are created & tested with UiPath Studio 8.

Attachments: