{"product_id":"gmail-pdf-invoice-capture-to-google-drive-sheets-gemini-n8n","title":"Gmail PDF Invoice Capture to Google Drive + Sheets (Gemini, n8n)","description":"\u003ch3\u003eAutomatically capture PDF invoices from Gmail, extract data with Google Gemini, and file them in Google Drive + Sheets (n8n)\u003c\/h3\u003e\n\u003cp\u003eThis n8n automation watches your Gmail inbox for PDF invoices, uses \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e to extract and classify invoice details, uploads the PDF to the right \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e folder, and logs everything into \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e with a direct file link.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns every minute\u003c\/strong\u003e: checks Gmail for new messages and downloads attachments.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePDF-only filtering\u003c\/strong\u003e: continues only when the email contains at least one \u003cstrong\u003ePDF attachment\u003c\/strong\u003e, then splits attachments so each PDF is handled individually.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts invoice fields with Gemini\u003c\/strong\u003e: sends each PDF to \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e to extract key invoice data such as \u003cem\u003edate\u003c\/em\u003e, \u003cem\u003evendor\u003c\/em\u003e, \u003cem\u003eamount\u003c\/em\u003e, \u003cem\u003etaxes\u003c\/em\u003e, \u003cem\u003ecategory\u003c\/em\u003e, and \u003cem\u003epayment method\u003c\/em\u003e, plus a \u003cstrong\u003esuggested filename\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRoutes corporativo vs pessoal\u003c\/strong\u003e: Gemini classification determines whether the invoice is treated as \u003cem\u003ecorporate\u003c\/em\u003e or \u003cem\u003epersonal\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUploads to the correct Drive location\u003c\/strong\u003e: stores the PDF in the corresponding \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e folder using the suggested filename.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLogs to Google Sheets\u003c\/strong\u003e: appends a new row with the extracted invoice data, the Gmail sender address, and the \u003cstrong\u003eGoogle Drive file URL\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eTurn invoice emails into a searchable archive in Google Drive, without manual downloading.\u003c\/li\u003e\n  \u003cli\u003eMaintain an up-to-date invoice ledger in Google Sheets with file links for quick review.\u003c\/li\u003e\n  \u003cli\u003eAutomatically separate \u003cstrong\u003ecorporate\u003c\/strong\u003e vs \u003cstrong\u003epersonal\u003c\/strong\u003e invoices using Gemini classification.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n workflow\u003c\/strong\u003e with nodes such as \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, \u003cstrong\u003emerge\u003c\/strong\u003e, \u003cstrong\u003esplit out\u003c\/strong\u003e, and Google Drive integration (plus a sticky note for guidance).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\u003c\/strong\u003e: Gmail (polling + attachment download), \u003cstrong\u003eGoogle Gemini\u003c\/strong\u003e (invoice extraction \u0026amp; classification), \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e (corporate\/personal uploads), and \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e (row append).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSetup note\u003c\/strong\u003e: in the Gemini prompt, replace \u003ccode\u003e[NOME_DA_SUA_EMPRESA]\u003c\/code\u003e with your real company name for accurate classification. Configure the target Drive folder IDs\/locations and select your Sheets spreadsheet + worksheet.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45962013081779,"sku":"N8N-19223","price":52.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/vKIfV5gSmi3X4O-N6help_7J55sF3O.png?v=1788599205","url":"https:\/\/buyflowscripts.com\/products\/gmail-pdf-invoice-capture-to-google-drive-sheets-gemini-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}