How to only send a single Email

Hello, I was wondering if there was any way that an automation that runs from 5 to 5 minutes during the day, could send a single email on the last run.

The automation starts running at 6am and stops running at 9:55pm. Every time it runs, it sends an email and it doesn’t really make sense to have all those emails. is there any way I can improve this to only send a single email at the end of the day?

Best Regards

Hi @rodrigo.simao

You can trigger the program to run by using the add triggers in the orchestrator.
In Orchestrator open the Automation tab in that you can add the trigger then you can configure the triggers to run the bot for every 5 minutes with in the time.

Hope it helps!!

I still want the robot to run every 5 minutes but I wanted it to only send the email with the report at the final run

Hi @rodrigo.simao

Should bot send all the reports or else only the last report at the end of the day.

Regards

@rodrigo.simao
I suggest you to make a separate worklow in process which will run only specific time like on 9 55pm by putting condition in process.
you will pass this work consolidate summary through file or any other option

Hi,
@rodrigo.simao

  1. Initialize the variables:
  • Create two variables: emailContent of type String, and lastRunTime of type DateTime. Set their initial values accordingly.
  1. Start a loop:
  • Add a “Do While” or “While” loop activity to enclose the automation steps.
  1. Check time conditions:
  • Inside the loop, add an “If” activity to check if the current time is the last run time (9:55 PM) and if the last run time is not null. If both conditions are true, add a “Break” activity to exit the loop.
  1. Automation task:
  • Perform your desired automation steps within the loop.
  • Update the emailContent variable with the necessary information using an “Assign” activity.
  1. Send email at the end of the day:
  • After the loop, add an “If” activity to check if the emailContent variable is not empty.
  • Inside the “If” activity, add the necessary activities to send an email with the accumulated content. You can use UiPath’s built-in “Send Outlook Mail Message” activity or other email-related activities depending on your email configuration.

Thanks

Hi @rodrigo.simao

Send the mail in the then activity

Hope it helps!!

1 Like

It’s something that was brought up by the business team just for me to think about it. Once I get started I’ll try it! :slight_smile:

But where will the robot store all the data gathered until then?

@rodrigo.simao

We can store all the reports in a single folder and at the end of the day we can attach that folder and send the mail.

Regards