Is there any way to retrieve “sent mails” from my gmail account using UiPath activities?
I need mails from “Sent” folder. This is mails from “Inbox”.
Just change the name from Inbox to sent items…
Already tried that. Throwing error “Folder not available”.
enter same name as given on gmail account
Not working. Can you give me running example?
are you getting mails after entering Inbox?
“Inbox” is working fine.
Please ensure the name of the folder is correct. If using Outlook I think it should be “Sent Items”.
No, I am not using Outlook. Is there any other way apart from Outlook?
Please can I know the name of the activity you are trying to use .
Ok so connecting to Gmail using IMAP via UiPath’s “Get IMAP Mail Messages” activity can be quite bothersome. The main issues that arise for most are:
Virus scanner blocking the connection
Your virus scanner might block or interfere with the connection. This might result in a connection timeout, a secure connection and/or certificate exception. It might also simply stall the robot for minute(s) without any exception being thrown. See if this is the issue by temporarily disabling your anti-virus and trying again.
If you have two-factor authentication set-up on your Gmail account, you will most likely need an Application-specific password. UiPath will throw an exception indicating
Get IMAP Mail Messages: Application-specific password required: https://support.google.com/accounts/answer/185833 (Failure).
To set an application-specific password simply go to your Google Account Settings - Security - App passwords. Here’s a guide on how to create an application-specific password: https://www.lifewire.com/get-a-password-to-access-gmail-by-pop-imap-2-1171882
Selecting the right inbox
(Allmost) all Gmail inboxes prefix with the literal “[Gmail]”. If you would like to access the sent folder you would have to specify the [Gmail]/Sent Mail folder in UiPath. I have noticed that your Gmail account’s language settings directly affect the name of your IMAP folders. In my case using [Gmail]/Sent Mail will throw the
Get IMAP Mail Messages: The requested folder could not be found. exception. My Gmail account is set to Dutch and so setting the
MailFolder Argument in UiPath to [Gmail]/Verzonden berichten will get me all sent messages. Note that this is not the same name as what is shown on the menu on the left-hand side of the Gmail interface. If you’re unsure what I mean by this, no worries I will attach an image to this post that clarifies that. The deprecated IMAP protocol’s XLIST command lists the right folder names that you are able to use. This would be the solution for the computer technicians amongst us. For those who are not what you could try to do to get the right mail folder name is use Gmail’s search function and search for: “in:Verzonden” which will then pop-up the actual folder’s name (see image below)
Again, note that this is not the same name as what is shown on the menu on the left-hand side of the Gmail interface. You will have to search for it and see what Gmail outputs.