hai ,
I am extracting specific content form the email body but when i reading it showing in HTML format but i need only the specific info and that need to be saved in variable .
can anyone suggest how we can achieve this.
Hi,
Use any get mail activity like get outlook mail message activity that i have used assign the output from get mail activity to a list<mailmessage> variable.
Then put an for each function and change the type argument to mail message then from the item returned from the for each activity u can get the body of each mail.
Hi
I want to extract only the data circled in red from email.
But when i am using Mail.Body, the whole data of the mail including the previous mail gets extracted.
@Dominic @sreekanth Any ideas on what could be done in this>??
Thanks and Regards.
Shaista
Which one? To extract information from email?
yes
This is the workflow.
You need to configure the IMAP settings.
MailInfo.xaml (7.2 KB)
Do you have any fixed text in that mail body?If yes then you can go with post referred by @arivu96 and use indexof() and substring() to extract required text. @SHAISTA
Thanks,
Sreekanth.k
@arivu96 @sreekanth
Please see in the screenshot i have attached.
The format of the mail will be fixed always.
The reply from the sender will always be approve or disapprove.
But in the mail which i have sent to the vendor, i have already mentioned “Please reply with approve or disapprove”
So if i am extracting the body data and applying if condition to check whether the reply is approve or not, the condition always comes true as UiPath fetches the whole email data including the data of the mail i sent.
Hi @SHAISTA,
After extracting the data split using environment.newline take the first line alone check the condition as approve or disapprove.
Regards,
Arivu
That worked.
hey i have am concerned that what if i dont have fixed text and getting different reply to my mail totally different or some may be common as well how i can do that
Do you have code example for this?
Thanks
hey
i m facing the same scenario
but not getting the body of email
can u suggest/…
thanks
try to get the body in HTML and then convert that into plain text it will be working
can u elaborate more
i mean the activities to get the text from mail
when m using mail.body it is showing blank messages
tell me how can i get body as html and dn cnvrt it into text?
thanks
assign the body of the mail to mail.body(html)
then assign the same to mail.body(plaintext)
did the same but getting error.
html is not declared inaccessible due to its protection level
please share the screenshoot