See also:
Parsing text from attached files
Exporting email contents to Google Sheets
In this example we will show how to capture the invoice number, the date and the total of an attached invoice in PDF format with Email Parser. The file we receive attached is as follows:
Email Parser does not read all the attached files unless you create a field of type Attached reader. Usually, its configuration is quite easy. Just indicate the file format you want to read, in this case PDF files. We use “*.pdf” for that:
Once we have the contents of the PDF file stored in a field we can use it as input for parsing. All the rules for parsing the email body apply to attached files as well. All we need to do is set the input of a field to “pdf_file_contents” instead of “Body”
For the total of the invoice, we do exactly the same:And for the invoice date as well. Note that in this case, we used regular expressions:
Finally, we use the three fields we got for creating a new row in Google Sheets
And when an email is received, Email Parser produces the following output: