UiPath - Knowledge Base

Email Automation. Mail Trigger Sample.

Written by Alex Stoian | Jul 8, 2015 2:16:00 PM

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.

 

 

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.

 


Workflow Steps:

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

Email address:

 

Password:

 

Keyword:



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.
 
 

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.

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: