How to parse name:value data from an email and export to an Excel file

See also:
Capturing text with “Starts after… continues until…”
Exporting email contents to Excel

This example shows how to parse an incoming email contaning data using the format “name:value” and save it to an Excel file. This format is quite common in email notification like website contact forms, e-commerce sales and other type of reporting that uses an email for notifications. The email we receive in this case is a notification from a weather station:


From:test@example.com
To:example@example.com
Subject:Weather report

***** WEATHER ALERT ******
----------------------- 12 kts windspeed was exceeded! -----------------------
Time of event was : 5:55:03 PM
Date of event was : 24/09/10
Current conditions : Windspeed 14.3 kts
Direction SW 225 °
Temperature 27.1 °C
Heat index 27.4 °C
Humidity 48%
Barometer 100.5 kpa
Maximum windspeed 34.5 kts SW at time: 5:16 PM
Maximum speed last hr 34.5 kts SW at time: 5:16PM
Rain today 0 mm
Maximum temperature 28.8°C at time: 3:29 PM
Minimum temperature 15.4 °C at time: 6:06 AM
Rain Rate/min 0.00 mm/min (0.00 mm/hr)
Rain last hour 0 mm
Max Rain Rate 0.0 mm/min (0.0 mm/hr) at time: 00:00 AM

We only want to capture the wind speed, the date, and the time when the data was measured. Let’s see how to set up the fields to capture this information from the email body:

The last step is to save this fields to an Excel file. To do that, we use an action of type Save to an Excel file:

When an email is received, Email Parser automatically captures the text following the rules above and produces the following output:

After parsing a set of emails (or leave Email Parser running for a while) we have this generated rows in the Excel file:


© 2008-2024 Triple Click Software
News & Updates

Privacy Policy & Terms of Use
PAD file·Old news