Extract Invoice Data from Google Drive to Sheets using PDF.co AI Parser
This workflow looks inside a Google Drive folder, parses each PDF invoice with PDF.co’s AI Invoice Parser, and appends vendor, amount, dates, and a link to the file into a Google Sheet.
⚙️ Setup Instructions
- Connect Google Drive (OAuth2)
In n8n → Credentials → New → Google Drive (OAuth2)
Sign in to the Google account that owns your invoice PDFs and allow access.
In the Get Parent Folder ID node, set your search to the folder name (e.g., n8n Invoices).
In Get Invoice ID’s, ensure Filter → folderId uses the ID from the previous node (already wired in this template).
> Tip: The workflow builds a Drive link like
> https://drive.google.com/file/d/<FILE_ID>
> Make sure those files are at least viewable via link (e.g., Anyone with the link – Viewer) so PDF.co can fetch them.
- Connect PDF.co (AI Invoice Parser)
Create a PDF.co account and copy your API Key.
In n8n → Credentials → New → PDF.co API, paste your key and Save.
In the AI Invoice Parser node, keep URL mapped to the Drive link coming from Convert to URL. The node is already set to use your PDF.co credentials.
> What it does: Sends each Drive file URL to PDF.co’s AI Invoice Parser and returns structured JSON (vendor, totals, dates, line items, etc.). The next Set Fields node maps those fields to simple columns for Sheets.
- Connect Google Sheets (OAuth2)
In n8n → Credentials → New → Google Sheets (OAuth2)
Log in with your Google account and grant access.
In the Store Data in Google Sheets node, select your Spreadsheet and Sheet (this template is set to:
Spreadsheet: Invoice Template (1a6QBIQkr7RsZtUZBi87NwhwgTbnr5hQl4J_ZOkr3F1U)
Tab: Due (gid: 1002294955)
The node is configured to Append or Update by Url so repeats won’t duplicate.
Expected columns on the Due tab: Url (Drive link we generated) Vendor Invoice Date Total Due Date
▶️ How to Run
Put your PDF invoices in the “n8n Invoices” folder (or the folder name you used).
Click Execute Workflow in n8n.
Watch items flow:
Get Parent Folder ID → finds folder
Get Invoice ID’s → lists files in that folder
Convert to URL → turns each file ID into a shareable link
AI Invoice Parser → extracts JSON from each PDF
Set Fields → maps fields for Sheets
Store Data in Google Sheets → appends/updates the Due sheet
🧩 Troubleshooting
PDF.co can’t fetch the file:* Ensure your Drive file link is accessible (e.g., Anyone with the link – Viewer*), or use a URL that PDF.co can reach.
No rows added:* Confirm the Google Sheets credential is selected and the Sheet tab* (gid) matches your target.
Wrong folder:* Update the search string in Get Parent Folder ID* to match your Drive folder name.
📬 Contact Need help customizing this (e.g., auto-sharing Drive links, enriching the Sheet, or pushing to Slack/Email)?
📧 robert@ynteractive.com
🔗 Robert Breen
🌐 ynteractive.com
Related Templates
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments