How to extract information from the body of an Outlook e-mail


#1

Hello,

I am trying to extract specific information from the body of an Outlook e-mail.
For example, I need to get all words that are between quotation marks (“word”) that are present in the body.

I am using the “Get outlook mail messages” and I can already paste the whole body information into an excel file, for example. However, I need to work with some parts of the info instead of all of it.

Thanks in advance,
Kazuo


#2

Even I am searching for this will let you know Kazuo san if I find any solution.


#3

You can use the Matches activity.
There is a sample in UiPath -> Library called Extract Text Between Labels. Labels.xaml (7.1 KB)

Probably you’ll need to adapt it to retrieve all matches (not only the first) plus adapt the regex expression as per this article:


#4

Thanks Badita for your help will try this :relaxed:


#5

Thanks Badita!

I’ll also try this!


#6

Hi Adarsh i am also trying this but i am not getting any solution ,Did you got the solution?? i am not able to get data into CSV or excel from email body ,my problem is i have thousands of email from a particular email address and i want to retrieve some part of it into excel or CSV ,

I have email body like
xx,
say helloo
regards

name: Sandeep
age: 27

i want my name and age field into CSV


#7

hello, I am also trying to extract values from an email. Badita’s solution does work … but … I first had to remove carriage returns / line breaks from my txt. Once I converted the text into a string without carriage returns then Badita’s solution worked fine.

this line removes the carriage returns.
strVariable = mail.Body.Replace(vbCrLf, “”)

thanks Mihai.


#8

Hello Sandeep, did you manage to find a solution for this? I am looking at the same thing. Thank you!


#9

Hello, anyone could give a solution for this?
Thanks!