Handling invoices manually can be time-consuming. This workflow automates the process—extracting invoice data, organizing files, and keeping records up to date.
How It Works
- Retrieve PDF invoices from incoming emails
- Extract key details (via PDF.co AI Invoice Parser)
- Sort invoices into the correct Google Drive folders
- Log all invoice data in a single Google Sheets document
Let’s get started!
Step 1: Retrieve Invoices from Email Attachments
- Watch for new emails with invoices
- Use Gmail: Watch Emails and select the right folder, filter, criteria and other settings.
- Extract attachments
- Add Flow Control: Iterator and select Attachments[] to process each file separately.
Step 2: Extract Invoice Details using PDF.co AI Invoice Parser
- Send invoices to PDF.co for data extraction
- Use AI Invoice Parser and select Upload File as the input type.
- Select the file from the Iterator to extract details such as the Delivery Date.
Step 3: Organize Invoices to go into Google Drive Folders
- Sort invoices into folders by month and year
- Use Tools:Set Variable to extract the month and year from the Delivery Date.
- Format the date correctly using: “
{{formatDate(parseDate("Feb 20, 2025"; "MMM D, YYYY"); "MMMM YYYY")}}
”
- Check if the folder exists
- Use Google Drive: Search for File/Folder to look for a folder with the name (e.g., February 2025).
- Upload the invoice
- If the folder exists, upload the file using Google Drive: Upload a File.
- If the folder doesn’t exist,
i. First, create it using Google Drive: Create a Folder (use the Set Variable output as the folder name).
ii. Then, upload the file to the newly created folder.
Step 4: Record Invoice Details to Google Sheet
- Add each invoice as a new row
- Use Google Sheets: Add a Row and map AI Invoice Parser values to the correct columns.
- Log individual table items separately
-
If the invoice contains table items,
i. Add an Iterator before the Google Sheets module.
ii. Use AI Invoice Parser’slineItem[]
output to extract each item.
iii. Map the Iterator’s output to the corresponding columns in Google Sheets.