n8n workflow template · 11 nodes · OpenAI
Send specific PDF attachments from Gmail to Google Drive using OpenAI is a free n8n workflow template that starts from the Gmail Trigger node and works with OpenAI, Google Drive and Gmail. It has 11 nodes, 1 of them AI nodes (OpenAI). The notes inside the workflow say: “_DISCLAIMER: You may have varying success when using this workflow so be prepared to validate the correctness of OpenAI's results.” To run it, you add your own credentials for Gmail OAuth2, Google Drive OAuth2 and OpenAI API.
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
_DISCLAIMER: You may have varying success when using this workflow so be prepared to validate the correctness of OpenAI's results.
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.
Workflow written by David Sha.
Match on(required): What should OpenAI's search term be? Examples: invoice, callsheet, receipt, contract, payslip. Google Drive folder to upload matched PDFs(required): Paste the link of the GDrive folder, an example has been provided but will need to change to a folder you own. maxTokenSize(required): The maximum token size for the model you choose. See possible models from OpenAI here. replyTokenSize(required): The reply's maximum token size. Default is 300. This determines how much text the AI will reply with.
The 11 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
Do you need somewhere to run it? Read our guide to self-hosted n8n.
We can adapt this workflow to your apps, data and process, then deploy and support it.
Contact Us