Extract information from downloaded E-mails

Hi guys

I’m looking to build an automation in order to create a report
Basically the situation is as follows:

A folder containing 5 folders (countries), each country containing folders for customers (around 5 customers for each country), each customer containing folders for each month, each month containing an email with a report

My question is, would it be possible to build an automation that extracts certain information from each report? Each report follows the same template, only data refering to each customer and period differs. How would you go about this?

Thanks a lot :slight_smile:

To make things easier I guess I could put all the files into one folder somehow

Hi @b.oprea,

Without knowing the quality and type of data it is hard to come up with a detailed solution design.

However, a generic approach would be:

  1. Download all emails in the respective folders. (Get Outlook Mail-activity)
    A) Depending on your folder structures you can consider using the For Each Email-activity.
  2. Loop through all reports and do the following: (For Each File in Folder-activity)
    A. Read report. (Read Range-activity)
    B. Extract relevant data. (Filter Data Table or Matches(RegEx))
    C. Add or append extracted data to aggregated report. (Append Range-activity)

Regards,
JM

Thanks a lot :slight_smile:

So what I did was create a folder with all the files
All the files are .msg type

Also created a For Each File in folder

How would you go about extracting certain text from the entire email body?

Ex: Period: 2010 (year different for each file)
Amount: 200 (agian, different for each file)

Thanks

Hey @b.oprea

Take a look here at this tutorial. Then take a look at my Regex MegaPost.

Cheers

Steve