{"product_id":"n8n-webhook-gmail-pdf-to-airtable-hubspot-sync","title":"n8n Webhook + Gmail PDF to Airtable \u0026 HubSpot Sync","description":"\u003ch3\u003eWebhook + Gmail PDF to Airtable \u0026amp; HubSpot Sync—deduplicated, validated, and fully audited\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow automatically ingests business records from an authenticated POST webhook or from PDF attachments in Gmail, then deduplicates, validates, and syncs updates into \u003cstrong\u003eAirtable\u003c\/strong\u003e and \u003cstrong\u003eHubSpot\u003c\/strong\u003e—with audit logs in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e and real-time \u003cstrong\u003eTelegram\u003c\/strong\u003e alerts for exceptions.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers\u003c\/strong\u003e from:\n    \u003cul\u003e\n      \u003cli\u003ea \u003cstrong\u003ePOST webhook\u003c\/strong\u003e,\u003c\/li\u003e\n      \u003cli\u003ea \u003cstrong\u003eGmail label polling\u003c\/strong\u003e setup that downloads PDF attachments,\u003c\/li\u003e\n      \u003cli\u003eor a \u003cstrong\u003emanual test run\u003c\/strong\u003e.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts structured data\u003c\/strong\u003e from PDFs in Gmail using \u003cstrong\u003eOpenAI (LangChain Information Extractor)\u003c\/strong\u003e, producing a structured batch of records.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSplits into individual records\u003c\/strong\u003e, removes duplicates using \u003cstrong\u003eexternal_id\u003c\/strong\u003e, normalizes fields, and \u003cstrong\u003equarantines invalid records\u003c\/strong\u003e instead of writing them.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePrevents unnecessary updates\u003c\/strong\u003e by computing a \u003cstrong\u003eSHA-256 content hash\u003c\/strong\u003e per record, matching Airtable by \u003cstrong\u003eexternal_id\u003c\/strong\u003e, and \u003cstrong\u003eskipping records\u003c\/strong\u003e whose content hasn’t changed.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpserts into Airtable\u003c\/strong\u003e, then checks \u003cstrong\u003eHubSpot\u003c\/strong\u003e for \u003cstrong\u003eemail opt-out\u003c\/strong\u003e before upserting contacts—suppressed contacts are not synced.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAudits every outcome\u003c\/strong\u003e: appends one audit row per record to the \u003cstrong\u003eGoogle Sheets “Audit Log”\u003c\/strong\u003e, posts \u003cstrong\u003eTelegram\u003c\/strong\u003e alerts for any non-success status, and writes a per-run summary to the \u003cstrong\u003e“Reconcile Report”\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns a daily reconciliation\u003c\/strong\u003e that counts Airtable records and the first 100 HubSpot contacts, logs counts to Google Sheets, and sends a Telegram reconcile message (silent when in sync).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSync customer or lead records submitted via API into Airtable and HubSpot without duplicates.\u003c\/li\u003e\n  \u003cli\u003eExtract data from inbound Gmail PDFs (e.g., forms, statements) and keep CRMs up to date automatically.\u003c\/li\u003e\n  \u003cli\u003eEnsure compliance workflows by respecting HubSpot email opt-out\/suppression and quarantining invalid records.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details (n8n \u0026amp; integrations)\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eTriggers\u003c\/strong\u003e: POST webhook, Gmail label polling, manual test.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI extraction\u003c\/strong\u003e: OpenAI via \u003cstrong\u003eLangChain Information Extractor\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCore logic\u003c\/strong\u003e: \u003ccode\u003eif\u003c\/code\u003e, \u003ccode\u003eset\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, record splitting, deduping by \u003cstrong\u003eexternal_id\u003c\/strong\u003e, \u003cstrong\u003eSHA-256\u003c\/strong\u003e hashing, and upsert logic.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eApps\u003c\/strong\u003e: Gmail, Google Sheets, Airtable, HubSpot, Telegram.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46196309721267,"sku":"N8N-20717","price":20.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/x0CQV3jtdTj355y99Fmx_RuCvDJRG.png?v=1791623301","url":"https:\/\/buyflowscripts.com\/products\/n8n-webhook-gmail-pdf-to-airtable-hubspot-sync","provider":"N8N Commerce","version":"1.0","type":"link"}