Block 1 - 04 | Code Split PDF Attachments into Items
- Type / Role
- n8n-nodes-base.code - code
- Config choices
- Version 2
How it works Watches a Google Drive folder and triggers automatically when a new invoice PDF is uploaded Extracts raw text from the PDF and passes each invoice through an OpenAI powered agent that ...
n8n-nodes-base.code, n8n-nodes-base.googlesheets, n8n-nodes-base.slack, n8n-nodes-base.gmail, n8n-nodes-base.googledrive, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Redowan Ahmed Farhan.
Original n8n.io sourceHow it works
Watches a Google Drive folder and triggers automatically when a new invoice PDF is uploaded Extracts raw text from the PDF and passes each invoice through an OpenAI powered agent that returns structured fields like vendor, amount, due date, and line items Fans the enriched data to three parallel outputs: a Google Sheets log, a Slack alert for overdue invoices, and a weekly summary email to Finance via Gmail
Set up steps
Connect Google Drive, Google Sheets, Gmail, Slack, and OpenAI credentials (~15 minutes total) Works best with text based PDFs; scanned invoices need OCR upstream of the extraction step Keep full setup details and prompt tuning tips in the sticky notes inside the workflow
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Reconcile Google Drive invoice PDFs with OpenAI, Sheets, Slack and Gmail |
|---|---|
| Complexity | advanced |
| Nodes | 16 |
| Categories | Invoice Processing, AI Summarization |
| Author | Redowan Ahmed Farhan |
| Published | 20 May 2026 |
Use the JSON export at /data/workflows/15840/15840.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
How it works Watches a Google Drive folder and triggers automatically when a new invoice PDF is uploaded Extracts raw text from the PDF and passes each invoice through an OpenAI powered agent that ...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing, AI Summarization use case.