{"product_id":"n8n-workflow-numbered-pdf-invoices-from-gmail-w-claude-sheets","title":"n8n Workflow: Numbered PDF Invoices from Gmail w\/ Claude \u0026 Sheets","description":"\u003ch3\u003eTurn invoice request emails into numbered, validated PDF invoices—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow polls your Gmail inbox for invoice\/order requests, extracts billing details with \u003cstrong\u003eAnthropic Claude\u003c\/strong\u003e, validates totals, assigns a \u003cstrong\u003esequential yearly invoice number\u003c\/strong\u003e in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, generates an \u003cstrong\u003eA4 PDF via MintPDF\u003c\/strong\u003e, replies to the customer with the PDF, and logs everything back to Sheets—while archiving the PDF in \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMonitors Gmail every minute\u003c\/strong\u003e: checks unread emails with subjects matching invoice or order request patterns.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts structured invoice data\u003c\/strong\u003e: uses \u003cstrong\u003eAnthropic Claude\u003c\/strong\u003e to pull customer, billing details, and line items from the email.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates and calculates totals\u003c\/strong\u003e: ensures required fields and currency are present, calculates \u003cstrong\u003esubtotal, tax, and total\u003c\/strong\u003e in integer cents, and routes invalid or over-limit requests to a \u003cstrong\u003eGoogle Sheets “Review”\u003c\/strong\u003e tab (and emails the owner).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAvoids duplicates + assigns numbering\u003c\/strong\u003e: reads an invoice log in Google Sheets to skip already-invoiced emails, then assigns the \u003cstrong\u003enext invoice number for the year\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRenders a PDF invoice\u003c\/strong\u003e: converts escaped HTML into an \u003cstrong\u003eA4 PDF\u003c\/strong\u003e using \u003cstrong\u003eMintPDF\u003c\/strong\u003e; if rendering fails, emails the owner.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCustomer reply + archiving\u003c\/strong\u003e: archives the PDF to \u003cstrong\u003eGoogle Drive\u003c\/strong\u003e, replies in the original Gmail thread with the PDF attached, and appends invoice details and the Drive link to the Sheets log.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators who receive \u003cem\u003ead-hoc invoice requests\u003c\/em\u003e by email and need consistent numbering and PDFs.\u003c\/li\u003e\n  \u003cli\u003eSmall businesses sending invoices manually but wanting an automated \u003cstrong\u003eGmail → Claude → Sheets → MintPDF\u003c\/strong\u003e pipeline.\u003c\/li\u003e\n  \u003cli\u003eTeams that need a review queue for invalid totals or missing fields before invoicing.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNode\/stack\u003c\/strong\u003e: if, set, code, no op, merge (plus required community node for PDF generation).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\u003c\/strong\u003e: Gmail, Google Sheets, Google Drive, Anthropic (Claude).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMintPDF\u003c\/strong\u003e: install community node \u003ccode\u003en8n-nodes-mintpdf\u003c\/code\u003e and add a MintPDF API credential.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets tabs\u003c\/strong\u003e: \u003ccode\u003eInvoices\u003c\/code\u003e and \u003ccode\u003eReview\u003c\/code\u003e, with columns matching the fields appended by the workflow.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46196306084019,"sku":"N8N-20731","price":42.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/9Gsz7NocX4YJwVvaflEDU_Xj9ArBCN.png?v=1791622947","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-numbered-pdf-invoices-from-gmail-w-claude-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}