Send specific PDF attachments from Gmail to Google Drive using OpenAI
Needs changesNeeds changes. This template uses 2 thing(s) that n8n 3.0 removes: Read PDF, OpenAI (legacy). 2 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| Read PDF Read PDF | Extract from File node, 'Extract From PDF' operation |
| OpenAI (legacy) OpenAI matches PDF textual content | OpenAI node (AI section) |
Worth a look
- Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (On email received)
Nodes used (9)
- Read PDF
n8n-nodes-base.readPDF - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Code
n8n-nodes-base.code - OpenAI
n8n-nodes-base.openAi - Merge
n8n-nodes-base.merge - Google Drive
n8n-nodes-base.googleDrive - Gmail Trigger
n8n-nodes-base.gmailTrigger
What it does
This workflow reads PDF textual content and sends the text to OpenAI. Attachments of interest will then be uploaded to a specified Google Drive folder. For example, you may wish to send invoices received from an email to an inbox folder in Google Drive for later processing. This workflow has been designed to easily change the search term to match your needs. See the workflow for more details. Prerequisites - OpenAI credentials. - Google credentials. How it works 1. Triggers off on the On email received node. 2. Iterates over the attachments in the email. 3. Uses the OpenAI node to filter out the attachments that do not match the search term set in the Configure node. You could match on various PDF files (i.e. invoice, receipt, or contract). 4. If the PDF attachment matches the search term, the workflow uses the Google Drive node to upload the PDF attachment to a specific Google Drive folder.