Extract data out of body of a mail

@yannip after running in circles a few weeks either on this problem, I solved installing outlook locally instead of using the web version. With that, the dedicated activity works very nicely.

Thanks for sharing Stefano.
Unfortunately for me it is not working on the standalone version of outlook or the web version.
Glad you have a working solution - i know the pain of this issue :slight_smile:

1 Like

Well, if you use the Get Outlook Mail activity, it works fine normally. Be sure the MailFolder input is equal to the name you have in the outlook application. And check also the trust center config in Outlook options.

1 Like

One of the issues is in the trust center. Company policies do not allow us to change it. And it is an international company so not easy to change it. In the end they did not want to change it.

1 Like

Hello,
Can you pls elaborate on (From row In DataTableMail.Select() Select String.Join(“,”,row.ItemArray)).ToList()
I am trying to follow this and need to convert ‘ExtractDataTable’ (type=datatable) to a list type variable.

1 Like

Well this code will convert each row of your dt into a list item and its using LinQ
It takes each row nd then for each item it will join it together and make it a comma separated value and the result converted to a list item.

ex DT like :
1|Nadim|29|UiPath
2|Ash|28|UiPath

becomes List[{“1”, “Nadim” , “29”, “UiPath”},{“2”, “Ash”, “28”, “UiPath”}]

1 Like

Thank you, but what I am confused about is the syntax.
I guess I need to create a variable of type (list), lets say ‘LIST’
and assign
LIST= (From row In DataTableMail.Select() Select String.Join(“,”,row.ItemArray)).ToList()
where DataTableMail is the scraped datattable.
Right?

2 Likes

yes :slight_smile:

2 Likes

:slight_smile: :slight_smile: Thank you so much!!!

1 Like

Main.xaml (12.7 KB)

Hi, I tried this, but strangely, sometimes its working and giving me data in output pane and sometimes not. I am not able to get it. (Internet explorer blocking content???)

attaching the mht file and the error message I am getting.

1 Like

see if this helps
ProcessEmailBody.xaml (14.0 KB)

2 Likes

hi nadim
when m trying to search specific mail based on subject in assign activity
its showing some error

how can i get specific mail?
please suggest

thanks

1 Like

Yes, you get it by filter based on the subject.
However the issue you have here is due to variable type.

This assign will give a result = whether the current mail is having the subject that you want.
This should be a Boolean (true/false) based on which you can proceed of move to next mail.

Your left hand variable is related to the subject it self im guessing.

Let me know you have understood what you need to do.

3 Likes

got resolved.
thanks

1 Like

Hi,

I tried same in Lotus Notes mail, at step c, while trying to scrape data, scrape results coming as blank. Please suggest.

If you have excel license look at this post:

@nadim.warsi please let me know your review =)

Hi Can you please Explain step 4.
i tried this step but i got an error object reference not set to an instance of object

User ID rupadhye
Client ID 100
Connection Name MGS
Action Unlock

Want to extract such data from mail body

@Sneha_Ambulkar, extract data from body, then Build data table , Add data row by row

Main.xaml (19.4 KB)

i attach my work flow over here please check