Hi every. I’m still new to UiPath so every help is welcome
The process is about downloading the secured PDFs in gmail and writing the data of those PDFs in excel. I succeeded in the extraction part from PDF to excel, just not the gmail part.
It’s like this: Every PDF is protected and the password is in the mail. It is namely the last 4 digits of the date (datum) and order number (bestellingnummer). So 2019 of date 26-2-2019 and 6534 of Ordernumber 166534, the password is 20196534. So I need to get the password’s and download the PDF’s from every mail. Any idea how I can tackle this?
I’m using the IMAP get mail activity, but the only problem that i’m facing now is that my item.body is returning empty cells. The item.subject works fine, but not the other one. I looked up for solutions, but item.Headers(“PlainText”) and item.Headers(“HTMLBody”) aren’t working
You can get the email body text by mailmessage.body property and for deleting you can use Move IMAP mail message to a different folder.
And the reason for getting a blank mail body may be because it’s in html format, other than plain text. If so, read the html mail body by mail.Headers(“HTMLBody”) and convert it to plain text using the regular expression, System.Text.RegularExpressions.Regex.Replace(mail.Headers(“HTMLBody”),“(<.?>)|({.})”,“”) or you can use the key mail.Headers(“PlainText”).