Extract data out of body of a mail

It is achievable. Follow the below process.

  1. Read Email based on Subject filter like: “[subject]=‘Uipath demo’” . more details here :point_right: How to filter messages in Get outlook mail messages:

  2. Use option : Unread Email

  3. You will get an out List say mailList, so you can use forEach mail in the mailList, do the below:
    … a. Use Save Mail Message : pass mail, to: “temp.mht”
    … b. Use Start Process, pass “temp.mht”. This will open the mail in the browser
    … c. Use data scraping and scrape the table data into datatable
    … d. Covert dt data into a list type using bodytableList =(From row In DataTableMail.Select() Select String.Join(“,”,row.ItemArray)).ToList() → you will get List[{“Age”, “38”},{“City”, “Prague”}…]

  4. Now split to get each item: rowArray = bodytableList(0).Split(","c)
    So, you get rowArray(0) = Age, rowArray(1)= 38 and so on…

  5. Use activity Move Outlook Mail message, in: mail out, FolderName

See if this helps

7 Likes