Parsing email contents to CSV/Excel

Discuss RoboTask here
Post Reply
liorwn
Posts: 1
Joined: Tue Apr 26, 2011 3:50 pm

Parsing email contents to CSV/Excel

Post by liorwn »

Hi there,

I'm trying to accomplish what I had thought to be a
relatively simple procedure but I got a bit complicated
so any help would be appreciated.

What I'm trying to create is a daily/weekly (doesn't
matter) task that will check my email (POP), identify
emails with a specific non-changing Subject, parse it and
copy contents into an excel file (add row with values).

The email comes in a fixed format where each line has a
prefix and contents like "Name: John Doe" and there are
always 4 lines with the same prefixes.
What I want to do is basically create a new row in an
excel file, and copy each line content to the appropriate
column (column A through D).

I saw how to define the email pull, I saw how to trigger
but everything in between I can't figure out (identifying
the specific emails, copying the content, pasting to
excel, closing the file, etc)

What I figured needs to happen is that I do Download
Email, then Parse Email (no idea how to tell it to parse
only the new emails downloaded in the previous action or
at all) to find the emails with the proper subject, then
parse again each email, then do STR Extract for each line
I want and store in a new variable, then somehow open the
excel file and put each variable inside a new row in the
appropriate column. MOUTHFUL :D


Help?

Thanks so much in advance!
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Parsing email contents to CSV/Excel

Post by Oleg »

no idea how to tell it to parse only the new emails downloaded in the previous action or at all
Generate some file name
Download and save email to file
Open this file (Parse Email action).
find the emails with the proper subject
You can do this in "POP3 Email loop" action. Save "subject" into variable and, next, use "If..Then" action to compare this string with some expression.

If you will send me some examples of email files and the example of CSV file you want to make, probably I can help you in more detail.
Post Reply