Email body data scraping

Hi everyone,

We have a use case where we have to read all google alerts emails from GMAIL inbox & consolidate it in a csv/excel. I’m unable to read the body of the email as it seems to be in some sort of an embedded format.


I have to extract the topic, url, source & description into separate columns of the excel for all emails. Any idea/suggestion?

Hi @tara017
try data scrapping by indicating on the link as first and then select 8 diy hair masks and then do it for links and url same process

Thanks
Ashwin S

There might be several such emails with different links, how do I open each mail & then do data scraping?

Adding to tara017’s… how do I scrape if the email body is composed of multiple paragraphs. when I use getText(), it selects only one paragraph, also I need to take into account that the length of the email body might vary.

Hi @mysubfeeds
Have you tried using get attribute or get visible text

Thanks
Ashwin S

Thanks @AshwinS2. I used the Extract Wizard from Design > *Data Scraping.

May be you will have some confusion with this answer, but just a suggestion

  1. You need to get all the mails from the inbox and loop through them
  2. If you get some kind of subject as google ads or whatever, then try to get the body of the mail
  3. And use that HTML and get all the href tags , I mean the URL’s.
  4. Similarly you can get all the required

Thanks for the idea, @HareeshMR. But body of the email is returning empty string. Refer above image for the content of the body.

Can you please let me know how you are trying to retrieve the body of the mail @tara017?

For each mail, assign mail.Body to variable.

Are you reading from the webpage or are you getting the emails using the Gmail activities?