Can you please show us the expression you are using here to extract the body of the email and show us any error message if you are getting.
lets say u are using Gmail Get IMAP
So just save all the messages in a list of mail messages and follow these steps:
- Iterate in mails using For Each loop.
- Use this type of condition in If block under For Each loop to select the particular mail from particular subject ( item.Subject.Contains(“ABC Text”) ). it will return the boolean.
- Based on the above boolean and save the body in variable using Assign activity to save the body you can use this syntax → item.Body.ToString
- After all these steps use can use write Range activity to save all the information in Excel.
No Problem @anmita
Hope its working for you now if so kindly close topic
No Worries @anmita
I would like to suggest this thread as this refers similar to your scenario and it has got a workflow as a solution
Let us know if you are still facing any issue
I tried following the approaches mentioned but they did not work.
So I am attaching the workflow that I followed.
Open for suggestion’s or if you could share the workflow that worked for you in extracting Email body using gmail.
Main - Copy.xaml (12.7 KB)
@anmita Can you please let us know what is the error that you are getting. In prior follow these steps, and see where it is wrong
- Within the for each, keep message boxes and try to print Mail date, subject, body etc and check if it is missing anything
No @ushu I am not getting any Error it just shows blank fields in Body. Other that that Subject, etc. I am able to Extract it.
Thanks for the reply @ushu
@anmita Can you try doing this
Please follow the below link
Hi @anmita ,
Looks like we have not yet done the first part of your Query.
Extracting the Body from Gmail account. After Checking your workflow, you have used
item.Body for Retrieving the Body content.
We also would like to Suggest you to Check with the Below Expressions :
Also, To Check if the Body is an HTML, You can use the below :
I tried using the one’s you have mentioned but still it just shows blank in Body.
Thanks Arpan for the reply!!!
@anmita What was the Output of this Expression ? Did you Check it?
Yes I tried it so it was showing blank.
Then I tried using item.IsBodyHtml.ToString just to check but still there is no output.
Can you share the workflow if you have tried implementing it ?
@anmita , There is no change in the Workflow, Just using a Write Line to Print the values in the Output Panel.
However, Below is the Workflow :
Main - Copy1.xaml (14.7 KB)
Thank you @supermanPunch for the workflow
But even this just shows blank output