PICKED FROM N8N.IO · DOCUMENTS & DATA ENTRY
When a Gmail message arrives, the workflow reads the text of each PDF attachment and asks OpenAI whether it matches a search term you set, such as invoice or contract. Matching PDFs are uploaded to a chosen Google Drive folder, and the rest are ignored.
Template by n8n Team · 22.1k views on n8n.io · listed there as “Send specific PDF attachments from Gmail to Google Drive using OpenAI”
- DIFFICULTY
- Intermediate
- NODES
- 16
- USES AI
- Yes
- PUBLISHED
- March 2023
001 / WHAT HAPPENS
- 01
A Gmail trigger starts on each new email and checks it has attachments.
- 02
Each attachment is checked to be a PDF and its text is read.
- 03
Large PDFs are skipped if the text is over the token limit.
- 04
OpenAI decides whether the text matches your search term.
- 05
Matching PDFs are uploaded to the Google Drive folder.
WHO IT SUITS
Suits a business that wants invoices, receipts or contracts pulled from a busy inbox into one Drive folder for later processing.
CONNECTS
- Gmail
- OpenAI
- Google Drive
002 / BEFORE YOU USE IT HERE
- !Customer or staff details sent to an overseas AI provider such as OpenAI is a cross-border disclosure under APP 8 of the Privacy Act, so say so in your privacy policy.
- !Only PDFs with readable text work, so scanned images are skipped; test with your real attachments.
- !The workflow uses an older OpenAI node, so check it still works with your current OpenAI account.
- !Set the search term and folder ID in the Configure node, and check the filter with a few test emails.
WORTH KNOWING
Templates on n8n.io are written for a global audience. Set the workflow timezone to your city, and test with a handful of real items before switching it on.
Need n8n and the AI hosted in Australia? →003 / MORE FOR DOCUMENTS & DATA ENTRY
- 17 NODESAI
DOCUMENTS & DATA ENTRY
Extract invoice data from Gmail PDFs into Google Sheets
GmailLlamaParseOpenAIGoogle SheetsAdvancedby Jimleuk46.7k views - 36 NODESAI
DOCUMENTS & DATA ENTRY
Parse emailed documents with LlamaParse, AI and Telegram alerts
GmailLlamaParseOpenAIGoogle DriveAdvancedby Joseph LePage19.8k views - 5 NODESAI
DOCUMENTS & DATA ENTRY
Generate Google Slides proposals from a form with OpenAI
Google SlidesGoogle DriveGmailOpenAIBeginnerby Gerald Denor14.4k views
004 / QUESTIONS
Anything else is quicker to answer on a call. Thirty minutes, free, with the people who would build it.
Yes. Every template on this list is free on n8n.io. You need an n8n account (n8n Cloud or self-hosted) and accounts for the apps it connects to, some of which charge for API use.
We adapt templates to your systems, add approval steps where customers are involved, host n8n in Australia when the data calls for it and hand it over documented.
Book a free call→