How to handle ad hoc requests by the bot?

Hi All

We are going to automate a task where we get request of CREATE, UPDATE or DELETE of a customer and other rules associated with it. The request comes via email with attached excel sheet.

But these requests don’t come daily. It can come any day at anytime. So the bot has to fetch the specific email, read the subject and perform the task accordingly.

Question is as the requests are ad hoc and not repetitive how can we schedule the bot to perform the task.

  1. Can we schedule like every 1 hour it will check the email box once ?
  2. Is there any way that once the specific email is received automatically the bot will get triggered ?

Hi There @kkp

It can be done either way…

  1. Yes every hour it can be scheduled (triggers)
  2. You can build a windows service that can look at your inbox continuously (seems like an overkill to me)
  3. Or trigger the UiPath workflow using command line (have a script {Python, vb, etc…} that looks at your inbox continuously for a subject line or any unique identifier which does this)

I would personally go with schedules if bot licenses are available.

Appreciate a lot @Raghavendraprasad !

Could you please elaborate options 2 and 3 ? I haven’t ever used any script like that. And also why do you think the schedule option is good ?

Will it be good that every one hour the bot will be running to check. Sometimes the bot may run whole day checking for the required email and the email may not come as it is ad hoc request. Is it good from the efficiency point of view ?

Hi @kkp

Option 2 is out of the box - a windows service should be built and up and running in the virtual machine that you plan to deploy your BOT. Maybe this would shed some light (not sure that this will help considerably but its a start) https://stackoverflow.com/questions/2631364/c-sharp-windows-service#:~:text=The%20service%20was%20concieved%20from,the%20process%20to%20be%20restarted.

Option 3 is basically achievable through UiPath as well as vbscript (or any scripting language - even excel macro VBA) but I suggested vbscript because a continuous loop that is looking at your outlook inbox will not (and should not be) use up the bot license all the time. This approach is basically a programmatic access to your outlook application (inbox) which will trigger the process/bot if it satisfies a condition (maybe your mail Subject line contains a certain Keyword)

I would prefer a schedule (trigger from orch) because it is an inbuilt solution and development time is considerably reduced.

1 Like

Thanks @Raghavendraprasad!