Automated Invoice Processing Workflow: Extraction, Organization & Storage

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

  1. Retrieve PDF invoices from incoming emails
  2. Extract key details (via PDF.co AI Invoice Parser)
  3. Sort invoices into the correct Google Drive folders
  4. Log all invoice data in a single Google Sheets document

Let’s get started!

Step 1: Retrieve Invoices from Email Attachments

  1. Watch for new emails with invoices
  • Use Gmail: Watch Emails and select the right folder, filter, criteria and other settings.
  1. 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

  1. 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

  1. 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")}}

  1. Check if the folder exists
  • Use Google Drive: Search for File/Folder to look for a folder with the name (e.g., February 2025).

  1. 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

  1. Add each invoice as a new row
  • Use Google Sheets: Add a Row and map AI Invoice Parser values to the correct columns.
  1. 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’s lineItem[] output to extract each item.
    iii. Map the Iterator’s output to the corresponding columns in Google Sheets.

3 Likes

Very good thanks guys for this detailed explanation

1 Like