Hello friends,
i would really appreciated if you could help me with this problem.
my robot has been though to forward the newest email received respecting some criteria.
Those criterias are:
A .- email is unread
B.- email subject contains string “prd”
Previously, some modules of the program (in other words: before the forwarding the email target’s module), makes other applications (like SAP) to send the email target.
So that, SAP send the email target towards email account named C, and the email account (C) received the that email in the inbox.
Then My robot, has to verify the last email respecter criterias (A and B).
if the email respect criterias (A and B) it will mark this email as “unread” and use the same email account (C) to forward this email (with its attachment included) to email D.
My robot starts 8h00 and finish 8h40. and between this time the outlook email account C is suposed to received the email (newest) from SAP.
The problem i am facing is:
My robot is always sending an yesterdays 'email respecting same criterias instead of the last email (Today’s emails). (in other words, account D received always yesterdays emails.
However, todays email is always present.
Here is a description of my robot (picture bellow)
i would really appreciated if you could help me , with suggestions or advices…
Thanks
To ensure your robot forwards the most recent email received, sort the emails by date in descending order, filter for unread emails with the subject containing “prd,” mark the email as unread, and then forward it to email account D with its attachment. Verify that your robot’s scheduling aligns with the timing of SAP sending the email to account C to ensure it processes the most recent email.
The issue you’re facing with your robot forwarding yesterday’s emails instead of today’s emails might be due to the sorting and filtering criteria you’re using. Here’s how you can address the problem:
Sort Emails by Date: In your robot, make sure to sort the emails by date in descending order so that the most recent email is at the top of the list.
Filter by Criteria: Apply your criteria (unread and subject contains “prd”) to the sorted list of emails.
Mark Email as Unread: Before forwarding the email, ensure that you mark it as unread.
Forward the Email: Forward the email to email account D with its attachment included.
Repeat the Process: Configure your robot to repeat these steps once to process the most recent email, not all eligible emails.
Use UiPath activities such as “Get Outlook Mail Messages,” “Sort Data Table,” “Filter Data Table,” and “Mark Message” to achieve these steps. Verify that your robot’s scheduling aligns with the timing of SAP sending the email to account C to ensure it processes the most recent email.
Additionally, handle any errors or exceptions that might occur during the process to ensure the reliability of your automation.
as you see there is a time delay (15 min) that i gave to let SAP send the email to account C. (sure that It takes less than 15 min , so there is enough time to sap to send the email target and account C to received)…
Then , after 15 min passed:
email target should be selected here my parameters for Get outlook mail message:
output is: ListEmails ( that is composed by 1 email : the target one)
Then, For each email in this list goes to check condition:
"Subject contains :“prd”
if Yes, then , mail is marked as Read and it you be forwarded to Account D.
But it does not work as required…
Thanks for any advice or help to figure it out how to make it work…
TArget email is marked as unread.
however next activity (picture below)
is forwarding yesterdays’email eventhough this mail has already been marked as read …
So that , problem is in this last activity…
I would really appreciated if you could advice how to fix this problem with this last activity…
Thanks