Generate invoice PDFs from forms with APITemplate.io, Google Drive, Gmail and Slack
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (7)
- APITemplate.io
n8n-nodes-base.apiTemplateIo - n8n Form Trigger
n8n-nodes-base.formTrigger - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Google Drive
n8n-nodes-base.googleDrive - Gmail
n8n-nodes-base.gmail - Slack
n8n-nodes-base.slack
What it does
Quick overview This workflow collects invoice details from an n8n Form, generates an invoice PDF with APITemplate.io, uploads it to Google Drive, emails the invoice to the customer via Gmail, and posts a summary with links to a Slack channel. How it works 1. Receives an invoice request through an n8n Form submission. 2. Wraps the submitted fields into a single formdata object and verifies required values (customer name, email, and invoice number) are present. 3. Creates a document ID, adds a predefined list of invoice line items, and builds an output filename from the invoice number and customer name. 4. Generates a PDF from an APITemplate.io PDF template by mapping form fields and line items into template properties. 5. Confirms the PDF was generated successfully and includes downloadable binary data. 6. Uploads the PDF to a specified Google Drive folder, emails the customer the invoice with Drive and direct download links via Gmail, and notifies a Slack channel with the invoice details and links. Setup 1. Create and connect an APITemplate.io account, then set the PDF template ID and ensure the template placeholders match the workflow property keys (for example, fullName, invoiceno, and items). 2. Add Google Drive OAuth credentials and select the destination folder where invoices should be uploaded. 3. Add Gmail OAuth credentials for the sender account used to email the PDF to form submitters. 4. Add Slack credentials, choose the target channel for notifications, and adjust the message text if you want different invoice fields or links. 5. Review and edit the hardcoded invoice line items and any validation rules to match your invoicing requirements, then publish the n8n Form URL for users to submit requests. Additional info How To Customize Nodes You can adjust this workflow to fit different business or branding requirements: - Customize Form Fields In TRG – Invoice Request Form, add or rename fields to capture extra data such as tax numbers, payment terms or discount codes. After adding new fields, update SET – Wrap Form Data and any mappings in later nodes to use the new properties. - Change Line Items Behavior SET – Items & Document ID currently hard‑codes the items array. To make this dynamic, you can: - Parse items from additional form fields. - Load items from a Google Sheet or database. - Calculate total per item inside an expression rather than in the template. - Adjust Template Fields If you change placeholders in your APITemplate.io template, update the key values in PDF Generate From Template and the corresponding value expressions. Keys and expressions must stay aligned to avoid missing fields in the PDF. - Email Content and Branding The Gmail node message uses template expressions to include user data and links. You can easily change the greeting, add your branded signature or additional instructions without touching the core logic. - Slack Message Format SLACK – Notify New Invoice uses Markdown formatting supported by Slack. You can add more lines, mention specific users or channels, or shorten the message while still referencing the same JSON fields. Add‑ons This workflow can be extended in several ways: - Logging and Audit Trail Add a database or spreadsheet node after IF – PDF Generation OK to persist invoice metadata, including documentid, invoiceno, customer details and links, for long‑term reporting. - Payment Integration Insert nodes to create payment links or invoices in payment systems like Stripe or Razorpay and include those links in the email and Slack messages. - Error Notifications Extend the false branches of IF – Check Required Fields or IF – PDF Generation OK to send Slack or email alerts whenever an invoice fails validation or PDF generation. This keeps operations informed about failures without checking the n8n UI manually. - Multi‑template Support Add logic before PDF Generate From Template to select different pdfTemplateId values depending on company, region or invoice type, while reusing th