{"product_id":"gmail-invoice-pdf-to-google-sheets-n8n-gpt-4-1-mini","title":"Gmail Invoice PDF to Google Sheets (n8n + GPT-4.1-mini)","description":"\u003ch3\u003eTurn Invoice PDFs in Gmail into Structured Rows in Google Sheets—Automatically\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003eGmail Invoice PDF to Google Sheets (n8n + GPT-4.1-mini)\u003c\/strong\u003e workflow scans your Gmail inbox for invoice emails with PDF attachments, extracts the invoice text, uses \u003cstrong\u003eOpenAI (gpt-4.1-mini)\u003c\/strong\u003e to convert it into structured fields, normalizes the data, and appends each invoice into a \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e tracker—ready for reporting and bookkeeping.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns on a schedule\u003c\/strong\u003e (every hour) and searches Gmail for messages with attachments matching \u003cem\u003einvoice OR bill OR receipt\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProcesses attachments individually\u003c\/strong\u003e: it skips emails with no attachments and splits emails so each PDF attachment is handled separately.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts PDF text\u003c\/strong\u003e from each attachment.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses an AI Agent to structure invoices\u003c\/strong\u003e: sends the extracted text to \u003cstrong\u003egpt-4.1-mini\u003c\/strong\u003e to return invoice data as \u003cstrong\u003eJSON\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes the output\u003c\/strong\u003e into a consistent schema (e.g., invoice number, dates, vendor details, totals, and tax) and converts numeric values.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAppends to Google Sheets\u003c\/strong\u003e using \u003cstrong\u003einvoice_number\u003c\/strong\u003e as the matching column.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaaS operators\u003c\/strong\u003e tracking recurring vendor invoices without manual copy\/paste.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAutomation engineers\u003c\/strong\u003e building an invoice intake pipeline from Gmail attachments to a spreadsheet-based ledger.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFinance teams\u003c\/strong\u003e consolidating invoice numbers, dates, tax, and totals into a single Google Sheets dashboard.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n Gmail Trigger\u003c\/strong\u003e to poll Gmail hourly.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eif\u003c\/strong\u003e and \u003cstrong\u003ecode\u003c\/strong\u003e nodes for attachment checks, splitting, JSON parsing, normalization, and numeric conversion.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8nn8n-nodes-langchainagent\u003c\/strong\u003e AI Agent using \u003cstrong\u003eOpenAI gpt-4.1-mini\u003c\/strong\u003e to transform PDF text into structured invoice JSON.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e integration to append normalized invoice records to the selected spreadsheet and sheet.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOptional setup notes\u003c\/strong\u003e: align Google Sheets headers with appended fields (e.g., invoice_number, date, due_date, vendor_name, subtotal, tax, and totals).\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45837450576051,"sku":"N8N-18268","price":51.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/9__xobOPOtDXhTgilWQ-w_pbqRFYG7.png?v=1786794372","url":"https:\/\/buyflowscripts.com\/products\/gmail-invoice-pdf-to-google-sheets-n8n-gpt-4-1-mini","provider":"N8N Commerce","version":"1.0","type":"link"}