Issue Reading Unread Email in Gmail

Hi All,

Hope everyone is staying healthy and safe.

We are facing a strange issue with reading the unread email in Gmail using the IMAP, so wanted to check if anyone could help or point us in the right direction.

The automation basically is trying to check if there are any unread email with a particular subject, which comes every day at a certain time. Once it finds it, it would download the attachment and do other processing.

The email settings for IMAP are turned on and also Less Secure app access is turned on as we have 2FA. The same settings works in DEV, UAT and also in PROD at certain condition. The issue here is:

  • When the automated email is received, the process is not able to find the email although the subject matches and also is in unread status. The process simply sends out notification email that it was not able to find any email that matches the criteria.
  • However, when we forward the same email with the same subject line and keep that one as unread, the process is able to find the email correctly and proceed forward with other steps.

We are currently not able to pin point where the issue is occurring. Is it some other Gmail settings or the daily automated email that we are receiving, not able to conclude.

Would appreciate any help on the above.

Regards,
Bibek

1 Like

Could you please attach the xaml for better identifying the root cause and a resolve for it

Thanks.

Hey Nithin,

Thanks for your reply.

As it is a client project, I won’t be able to share the source code here.

As mentioned the issue doesn’t seem to be with the code itself as it runs in DEV and UAT just fine and in PROD only at the scenario mentioned, it fails.

Appreciate your help.

Regards

1 Like

Okay @bbarahi, No problem

So you mean bot can’t find an email with subject - for an auto-generated email right ?

Basically it should be some encoding or formatting issue.

Can you try printing both the subjects from auto-generated email and forwarded email please to verify the same

Thanks :slight_smile:

Thanks Nithin,

There is no difference in the subject line and making changes to it didn’t resolve the issue. However, we found that the source of the email was not a valid email address and it was system a generated email. Once we changed it to a valid email address, the process started working fine.

It seems to be a bug in Gmail rather than UiPath code that the email activity cannot read an unread email coming from non-standard email.

For now this issue can be closed. I will be marking this as solution so that if anyone facing similar issue could refer to this.

Thank you again for your help.

Regards

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.