{"product_id":"n8n-webhook-generate-pdf-invoices-from-json-with-pdfmint","title":"n8n Webhook: Generate PDF Invoices from JSON with PDFMint","description":"\u003ch3\u003eGenerate professional PDF invoices from JSON—directly via an n8n webhook\u003c\/h3\u003e\n\u003cp\u003eThis n8n Webhook workflow accepts invoice data as a JSON payload, merges it with your seller defaults, renders an invoice in HTML\/CSS, converts it to a PDF using \u003cstrong\u003ePDFMint\u003c\/strong\u003e, and returns the generated PDF as a binary file in the same HTTP response.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives a POST request\u003c\/strong\u003e on an n8n webhook endpoint (path: \u003cem\u003e\/invoice\u003c\/em\u003e) containing customer details, line items, and optional invoice fields.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eApplies seller defaults\u003c\/strong\u003e and fills missing values such as currency, invoice number, issue date, and due date.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBuilds the invoice content\u003c\/strong\u003e by rendering an invoice in plain \u003cstrong\u003eHTML\/CSS\u003c\/strong\u003e, calculating each line total and the grand total.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eConverts HTML\/CSS to PDF\u003c\/strong\u003e using the \u003cstrong\u003ePDFMint\u003c\/strong\u003e community node.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturns the PDF immediately\u003c\/strong\u003e in the webhook response (no separate download step required).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaaS billing\u003c\/strong\u003e: generate invoices on-demand from your application by POSTing invoice JSON to n8n.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMarketplace payouts\u003c\/strong\u003e: create customer-ready PDF invoices for line-item transactions.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFreelance ops\u003c\/strong\u003e: automate recurring invoice generation while keeping invoice layout under your control via HTML\/CSS.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes \/ workflow components\u003c\/strong\u003e: set, webhook, sticky note, \u003cstrong\u003en8n-nodes-pdfmintpdf\u003c\/strong\u003e (PDFMint community node), respond to webhook.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePDFMint credentials\u003c\/strong\u003e: create a PDFMint API key (from \u003cem\u003epdf.mintapis.com\u003c\/em\u003e) and add it as a PDFMint credential in n8n.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSelf-host required\u003c\/strong\u003e: this template uses the PDFMint community node, which \u003cstrong\u003en8n Cloud cannot install\u003c\/strong\u003e, so self-hosted n8n is required.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCustomization\u003c\/strong\u003e: edit the markup directly in the “Build invoice HTML” step to change the invoice design; line items render from the provided JSON.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45905436115123,"sku":"N8N-18734","price":22.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/QoJnGgmhBjglN8gecw9Sj_DlBopdag.png?v=1787821910","url":"https:\/\/buyflowscripts.com\/products\/n8n-webhook-generate-pdf-invoices-from-json-with-pdfmint","provider":"N8N Commerce","version":"1.0","type":"link"}