RPA Trigger Follow
ServiceManager allows you to create Email Trigger and Scheduled Trigger from the RPA Manager.
Email Trigger
A service will be triggered every time an email is received and matched with the pre-configured email filters (From, Subject, Body Template and Has Attachment). The email which will listen is the same one configured on Admin > Mail (you can find more information here).
Click on RPA > Triggers > click on > Email Triggered
Then, you need to select a Service. It can be any Service, but usually it would be a RPA Service.
In the example below, the service will be triggered only if it's:
- From auraplayer.com
- Contains the exact same subject "Add order ${CUSTOMER_PO} for ${ORDER_DATE}", which ${CUSTOMER_PO} and ${ORDER_DATE} would be the values entered by the sender
- Has attachment(s)
On the Input, in order to get the values from the sender, we need to copy the input label from the service and paste them wrapped in ${} on the Default Value.
With that being said, an email from eitan.peles@auraplayer.com with the subject Add order demorpa123 for 26-jul-2021 and with an attachment would trigger the service selected above.
If you won't insert any value on the fields, the service will be triggered from any email.
If you want to filter by a specific email, you just need to insert the full email.
If you want to filter by more than one email, you can separate them by || on the From field. E.g.: *@auraplayer.com||*@gmail.com||*@outlook.com
Get the email, subject, body and attachment path from the Email sender
You can also get the email, subject, body content and attachments from the email sender.
In the example below, we'll use a JS service which will simply console those values to the log.
On the Input, set the default values with the reserved words below:
Which:
- ${from} - is the email sender
- ${subject} - is the email subject
- ${body} - is the email body
- ${attachments[INDEX].name} - is the name of the attachment file
- ${attachments[INDEX].path} - is the path of the attachment file
- ${attachments[INDEX].length} - is the length of the attachment file
The first attachment would be ${attachments[0].METHOD}, the second attachment would be ${attachments[1].METHOD} and so on.
For instance, if you want to get the name of the first attachment from the email you should use ${attachments[0].name} or if you want to get the path of the third attachment you should use ${attachments[2].path}
After the email is matched and triggered, we'll have the result as expected:
Check Emails
Occasionally your business mail service can be down for several minutes and therefore, during this time, ServiceManager will "miss" the matched emails and the trigger won't be executed. To solve this, the Check Emails goes over all your unread emails and triggers all of them, if they're matched.
To do that, on the RPA Triggers, click on Action > Check Emails
Scheduled Trigger
You can schedule a service to be triggered once or every pre-defined time.
Click on RPA > Triggers > click on > Scheduled
In the example below, the service will be executed starting on 26/07/2021 at 10:00 for every 1 hour from Monday to Friday.
For more information, please watch the demo video on https://www.youtube.com/watch?v=0WEacsxiZFA
Comments
0 comments
Please sign in to leave a comment.