Hi UiPath Community,
I have an automation process that sends email notifications
to legal case handlers about their upcoming Hearing and
Pleading due dates. The process reads case data from a CSV
file, filters the relevant cases based on due date and
status, then sends HTML-formatted reminder emails to the
assigned handlers.
Here is a brief overview of how the process works:
- The bot reads a CSV file containing legal case records.
- It filters out cases where the Filed/Done column is
marked as “Yes” or “N/A” — these are skipped. - For the remaining cases, it calculates the days left
before the due date. - Based on the task type (Hearing or Pleading), it
determines whether today is a notification day. - Cases due today (DaysLeft = 0) are also included in
the notification. - The bot groups the cases per handler and sends one
consolidated HTML email per handler using a Microsoft
365 connection via UiPath’s Send Mail activity. - There is a delay between each email send to avoid
rapid consecutive requests.
THE PROBLEM:
When running the process through Orchestrator using an
unattended robot, only 1 out of 4 emails is being sent
successfully. The remaining emails are not being received
by the handlers. No hard error is thrown — the process
completes and only logs a Warning level message of
“Error Email” without the actual exception details.
We also noticed that some of the unsent emails appeared
in the Drafts folder of the sender’s mailbox instead of
being sent out.
IMPORTANT: When we run the same workflow directly in
UiPath Studio, all emails are sent successfully without
any issues.
What we have already checked:
- The delay between sends is already set to 2 seconds
- The HTML email body builds correctly (confirmed in Studio)
- The Microsoft 365 connection is configured in Orchestrator
- The Send Mail activity uses an Integration connection
Our questions:
- Could the Microsoft 365 connection in Orchestrator be
missing the Mail.Send permission scope, causing emails
to save as Drafts instead of sending? - Is there a known issue with the UiPath Microsoft 365
Send Mail activity saving to Drafts when run under an
unattended robot context? - Could the connection token expire mid-run when sending
multiple emails in sequence? - Would increasing the delay between sends help, or is
this purely a connection/permission issue?
Any help or guidance would be greatly appreciated. Thank you!