{"product_id":"n8n-invoice-receipt-automation-gmail-pdfs-to-google-drive","title":"n8n Invoice Receipt Automation: Gmail PDFs to Google Drive","description":"\u003ch3\u003eAutomatically collect Gmail invoice PDFs and store them in Google Drive—instantly classified as receipts or invoices\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow scans your \u003cstrong\u003eGmail\u003c\/strong\u003e mailbox for PDF attachments, uses AI to determine whether each PDF is an \u003cstrong\u003einvoice\u003c\/strong\u003e or a \u003cstrong\u003ereceipt\u003c\/strong\u003e, and uploads them into a dedicated \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e folder. Optionally, it can email the attachments to your accountant—so your bookkeeping stays organized with minimal effort.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCreates a Google Drive folder\u003c\/strong\u003e for the upload and returns a \u003cstrong\u003eWebhook response\u003c\/strong\u003e containing the folder URL.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches emails with attachments\u003c\/strong\u003e from a specified Gmail mailbox.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003e(Optional) Filters emails\u003c\/strong\u003e—for example, exclude messages sent to specific addresses.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFilters attachments to PDFs only\u003c\/strong\u003e, ignoring non-PDF files.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eClassifies each PDF with AI\u003c\/strong\u003e to determine whether it’s a receipt or an invoice.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUploads classified documents\u003c\/strong\u003e (receipts and invoices) into the created Google Drive folder.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOptionally sends an email\u003c\/strong\u003e with the attachments to \u003cstrong\u003esendInvoicesTo\u003c\/strong\u003e (e.g., your accountant).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFreelancers\u003c\/strong\u003e who need to centralize client invoices and receipts without manually downloading PDFs.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSmall business owners\u003c\/strong\u003e who want a reliable system to keep tax documents in Google Drive.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAccounting handoffs\u003c\/strong\u003e where attachments are forwarded to an accountant automatically after upload.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWebhook trigger\u003c\/strong\u003e to start the process and respond with the created Drive folder URL.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGmail integration\u003c\/strong\u003e to search emails with attachments.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Drive integration\u003c\/strong\u003e to create folders and upload PDFs.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI-powered classification\u003c\/strong\u003e to identify receipts vs invoices from PDF contents.\u003c\/li\u003e\n  \u003cli\u003eUses n8n nodes such as \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eno op\u003c\/strong\u003e, \u003cstrong\u003egmail\u003c\/strong\u003e, and \u003cstrong\u003emerge\u003c\/strong\u003e to control logic and routing.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003ePre-conditions\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eGmail and Google Drive accounts\u003c\/li\u003e\n  \u003cli\u003eGoogle Cloud \u003cstrong\u003eOAuth 2.0 Client ID\u003c\/strong\u003e (or a service account) with \u003cstrong\u003eGmail\u003c\/strong\u003e and \u003cstrong\u003eDrive APIs\u003c\/strong\u003e enabled\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI API account\u003c\/strong\u003e and API key\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45732370841779,"sku":"N8N-3719","price":54.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/F3fJEdp4kXgXh9omk5G1U_HFKilP6a.png?v=1785144078","url":"https:\/\/buyflowscripts.com\/products\/n8n-invoice-receipt-automation-gmail-pdfs-to-google-drive","provider":"N8N Commerce","version":"1.0","type":"link"}