Zum Inhalt springen
Cloud StoragePro — €97

felipfr awesome-n8n-workflows Webhook Code Create Webhook 1

95/100
20 Nodes

Beschreibung

Automate felipfr_awesome-n8n-workflows_Webhook_Code_Create_Webhook_1

Setup-Anleitung

## Gmail PDF Invoice/Receipt Classifier & Google Drive Uploader (via n8n & OpenAI)

_**DISCLAIMER**: AI classification isn't perfect. Always double-check that the correct documents were identified and uploaded._

This n8n workflow, triggered via a webhook, scans your Gmail for emails within a specified date range, extracts PDF attachments, and uses OpenAI to determine if each PDF matches a defined category (defaulting to "receipt or invoice"). Matched PDFs are then uploaded to a uniquely named Google Drive folder based on the date range. You can customize the classification term (e.g., change "receipt or invoice" to "contract") and optionally have the workflow email the collected PDFs to a specified address.

### How it works
1.  Triggers via a `Webhook` receiving a start date, end date, and an optional flag to send an email.
2.  Creates a dated folder in `Google Drive` (e.g., `invoices_YYYY-MM-DD_YYYY-MM-DD`).
3.  Fetches emails with attachments from `Gmail` within the specified date range.
4.  Iterates through each attachment, filtering specifically for `PDF` files.
5.  Extracts text from each PDF (skipping if the text exceeds token limits set in the `Configure` node).
6.  Uses the `OpenAI` node to ask if the PDF content and filename look like the item defined in the `Configure` node's "Match on" field (e.g., "receipt or invoice").
7.  If OpenAI responds with "true", the original `PDF` file is uploaded to the `Google Drive` folder created in step 2.
8.  If the initial webhook request included the flag to send an email, it aggregates all successfully matched PDFs and sends them via `Gmail` to the address specified in the `Configure` node.

Workflow written by [Tom](https://browsewiz.com)

Benötigte Integrationen (9)

Respond To Webhook

respondToWebhook

Merge

merge

Filter

filter

Webhook

webhook

API Key

Gmail

gmail

API Key

Read PDF

readPDF

Google API

googleDrive

API Key

OpenAI

openAi

API Key

If

if

Workflow freischalten

Kaufe das Pro Bundle für €97 — erhalte sofortigen Zugang zu diesem und allen weiteren Starter + Pro Workflows als ZIP-Datei zum Import in n8n.

Sichere Zahlung via Stripe. 7-Tage Geld-zurück-Garantie.
← Zurück zum Marketplace