Library / Documents, PDF & OCR
Documents, PDF & OCR
Save matching Gmail PDF attachments to Google Drive using OpenAI
Runs on each new Gmail message, reads PDF text with OpenAI to check relevance, and uploads matching attachments such as invoices to a Google Drive folder. The search term is adjustable.
What it does
## Send specific PDF attachments from Gmail to Google Drive using OpenAI _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. ### 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. Workflow written by [David Sha]({{ $env.WEBHOOK_URL }}
The steps
- Read PDF
- Configure
- Is PDF
- Not a PDF
- Is matched
- This is a matched PDF
- This is not a matched PDF
- Iterate over email attachments
- OpenAI matches PDF textual content
- Merge
- Upload file to folder
- On email received
- Ignore large PDFs
- Is text within token limit?
17 steps in total.
Similar automations
Files & Cloud StorageSave Matching Gmail PDF Attachments to Drive with OpenAI16 stepsDocuments, PDF & OCRSave Gmail Attachments to Drive and Log Data in Sheets with OpenAI14 stepsDocuments, PDF & OCRSave Gmail Attachments to Drive and Sheets with OpenAI30 stepsDocuments, PDF & OCRExtract Gmail attachment data with OpenAI into Google Sheets14 steps