How to parse an attached invoice in PDF

See also:
Parsing text from attached files
Exporting email contents to Google Sheets

the left panel of Email Parser for reading attached pdfs

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:

the invoice to export to a google spreadsheet

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:

reading the attached file before parsing

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”

exporting the invoice number in an addtached pdf
For the total of the invoice, we do exactly the same:
capturing the total of an invoice

And for the invoice date as well. Note that in this case, we used regular expressions:

capturing the invoice data

Finally, we use the three fields we got for creating a new row in Google Sheets

exporting to Google Sheets an invoice

And when an email is received, Email Parser produces the following output:

saving an attached invoice to google sheets automatically

© 2008-2024 Triple Click Software
News & Updates

Windows App privacy police and terms of use
Web App privacy police and terms of use

This site privacy police and terms of use
PAD file·Old news