AI Invoice Data Extraction from Google Drive to Google Sheets - n8n Workflow

Automate invoice processing with this powerful n8n workflow. Extract vendor, date, and total from Google Drive PDFs using PDF.co AI and log the structured data into Google Sheets. Get this n8n template now!

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Accounting teams needing to automate data entry from invoices.

  • Businesses receiving a high volume of vendor invoices in PDF format.

  • Users looking for robust n8n templates integrating AI OCR services.

  • Developers seeking a complete example of a file processing n8n node chain.

Overview

Managing incoming invoices manually is time-consuming and prone to errors. This specific n8n workflow solves this by providing a hands-free, scalable solution for invoice processing. It monitors a designated Google Drive folder for new PDF invoices. Using the PDF.co AI Invoice Parser, this powerful n8n node extracts critical financial information, such as the vendor name, invoice date, total amount, and due date. This structured data is then automatically recorded in a Google Sheets spreadsheet, functioning as an invoice log or tracking system. This automation ensures accuracy, eliminates manual data handling, and is a perfect example of a practical n8n template for finance operations. Deploying this n8n workflow means faster processing and better financial oversight.

How it Works

This automation is initiated by a manual n8n trigger, although it is easily convertible to a recurring schedule (e.g., Cron n8n trigger).


  1. Locate Folder: The n8n workflow begins by using the Google Drive n8n node to search for a predefined parent folder containing the invoices (e.g., 'n8n Invoices') and retrieves its unique ID.

  2. Fetch Files: A subsequent Google Drive n8n node uses this folder ID to list all PDF invoice file IDs within the designated folder.

  3. Prepare Link: The Convert to URL n8n node transforms the retrieved Google Drive file IDs into publicly accessible Google Drive URLs.

  4. AI Extraction: The core processing happens in the AI Invoice Parser n8n node (PDF.co). This service analyzes the content of the PDF URL and returns the invoice data in a structured JSON format.

  5. Data Mapping: The Set Fields n8n node cleans and standardizes the extracted JSON output, mapping complex field paths (like body.vendor.name) to simple column names (like Vendor) for consistency.

  6. Update Spreadsheet: Finally, the Store Data in Google Sheets n8n node appends the fully structured data to the designated sheet. It uses the invoice URL as a key for Append or Update logic, ensuring that running this n8n workflow multiple times will not create duplicate entries for the same invoice.

Installation Guide

To deploy and execute this effective n8n workflow, follow these setup steps for credentials:

1. Import the n8n template

Copy the entire JSON code and import it into your n8n instance via the 'Workflows' section.

2. Configure Google Drive Credentials


  1. Go to n8n → Credentials → New → Google Drive (OAuth2).

  2. Sign in with the Google account that holds the invoice PDFs and grant necessary access.

  3. In the initial Get Parent Folder ID n8n node, ensure the Query String matches the exact name of your invoice folder (e.g., n8n Invoices).

3. Configure PDF.co Credentials


  1. Obtain your API Key from your PDF.co account.

  2. In n8n → Credentials → New → PDF.co API, paste your API Key and save. This credential will be used by the AI Invoice Parser n8n node.

4. Configure Google Sheets Credentials


  1. Go to n8n → Credentials → New → Google Sheets (OAuth2).

  2. Log in and grant access.

  3. In the Store Data in Google Sheets n8n node, specify your target spreadsheet and tab. The expected columns for this n8n workflow are: Url, Vendor, Invoice Date, Total, and Due Date.

Node Details

This n8n workflow utilizes several key nodes to achieve its goal:

When clicking ‘Execute workflow’ (Manual Trigger): This n8n trigger manually starts the data processing chain for testing or on-demand execution. It is the initial n8n trigger for the flow.

Google Drive (Get Parent Folder ID & Get Invoice ID's): These Google Drive n8n node instances are crucial for file access. The first finds the container folder, and the second lists all files, filtered by the folder ID provided by the preceding n8n node.

Set (Convert to URL): A utility n8n node that transforms the raw file ID retrieved from Google Drive into a standard HTTPS URL format required by the PDF.co service.

AI Invoice Parser (PDF.co Api n8n node): The core intelligence of this n8n workflow. It uses advanced AI/OCR to analyze the PDF document linked by the URL and outputs machine-readable, structured data fields.

Set (Set Fields): A data manipulation n8n node used to restructure and rename the complex JSON output received from the PDF.co API into a flatter, more easily usable format for the final Google Sheet step.

Store Data in Google Sheets (Google Sheets n8n node): The final action. This n8n node uses the 'Append or Update' operation, matching rows based on the Url field to ensure the n8n workflow remains idempotent (prevents duplicate entries).

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

Featured*