Trigger a process when mail arrives

Hi, can you please expand on that solution? It sounds like we can use it too but I am no sure how to create the Outlook rule for .bat file execution.
Thank you very much.

@Dalibor_Pavlas. To create outlook rule, please follow this step.
Outlook > Home > Rules > Create Rule > Advanced Options.
Select Condition (more than 20 options available) and click Next
eg. With “ABCDEF” in the subject.
Select Action (again more than 20 actions available)
eg. Start Application.
In the second box , you can view the rule , it will go like this :
"Apply this rule after the message arrives with ABCDEF in the subject and start Application.. "
Here, click the ‘Application’ key word which is in hyperlink. It will prompt to select a exe file.Here, select the batch file which contains script to run the bot.

To create script in bat file, Copy this line in notepad & save it as .bat file.
“C:\Program Files (x86)\UiPath Studio\UiRobot.exe” -f “C:\RPA challenge\msg.xaml”
“Uirobot.exe path” -f “xaml File Path”

10 Likes

Thanks for your help! Sadly I can’t apply this solution right now because our IT department have disabled Start Application action in registry. But at least now I know that such action exists since I am not able to see it in Outlook.

1 Like

Dear @vasanth8891,
I have followed your steps to create script in bat file.
Sadly, my robot license is provided by Orchestrator and it won’t run the ".xaml " file that i called.
May i ask you which licenses you use on Studio and Robot to run the script?

I am just using community edition. In the help section , it says license provider as Orchestrator only.

1 Like

Thank you, i saw that i used the same license with you but some how, may be the version make my robot can not run the “.xaml” file as my command. I will try to find out why. Thank you a lot.
image

hi @ranjith,

i was looking for something similar. Could you tell me how to schedule running of xaml file through Windows task scheduler ?

@mayank.te @plmtri.kddi

If you peopel are using Community Edition of UiPath studio then we can schedule Attended BOTS from UiRobot system tray only and no need of any Windows Scheduler or Third party tools to schedule it.

We have new feature in new Community Edition. Please check below thread to get know more about this.

1 Like

Hey @vvaidya , I was wondering what you put as the condition in the ‘New Email’ decision tree?

In other words, if my output variable for ‘Get Outlook Messages’ is “messages”, then what would the condition be for the ‘New Email?’ Flow decision.

hey @GTowerz in order to check if there is a new mail, you can work with the counter. In that case check in the “New EMail” condition if messages.count > 0

Hope this helps :smiley:

1 Like

@Mod0091 thank you so much!

1 Like

@vasanth8891 thanks for detailed example but do you have some sample working workflow for this

Well, if using Outlook, then be careful because it all depends if this is a Unattended Process (RPA) or a Attended Process (RDA). If Unattended (RPA) then utilizing Outlook is not the way to go, instead I would recommend utilizing Exchange (connection), if using Outlook, then Outlook has to be installed on your back-end Automation Server. The Process/Workflow Diagram still is valid and works. I would just recommend scheduling a Robot/Job that runs continuously with the “Wait fo” delay and can poll the Exchange Inbox or whatever Folder the emails are being routed to.

1 Like

we need this feature in Uipath. This is a regularly heard usecase to perform some activities on receiving such specific mails. I hope Uipath team is already working on some idea to come up with this feature.

2 Likes

Hello All,
If you want to trigger UiPath process when an email arrives in outlook check this video that present one solution for this:

If you want to do this on Gmail here you have another solution:

Thanks,
Cristian Negulescu

4 Likes

It can be done easily using MACROs

Appreciate it, it works for me perfectly.

1 Like

Hi @Cristian_Negulescu, I have one more concern about the queue function, when the first time I sent an API to start a job, it works, but when I sent multiple time it can’t run the right way. For example, I sent API 3 times then the process run 2 times.

Hello Tien,
You can try the approach with Queue with multiples items:

and here more details about Queue start:

more detail about queue from power automate here:

So the approach from the first movie is for a system with 1-2 emails per hour, If we talk about 20-30 emails per hour is better an approach with Start a process when number of Items arrives in the queue.
Thanks,
Cristian Negulescu

1 Like

Can you explain how it is done?