See llms.txt for all machine-readable content.

Back to Templates

Generate and email PDF invoices from Google Sheets with Documol

Quick overview

Turn Google Sheets order rows into branded PDF invoices with Documol. Download a real sample without a key, then connect your own Documol account to generate fresh invoices. An optional SMTP step sends each finished PDF as an attachment.

How it works

  1. Starts when you manually execute the workflow.
  2. Pulls invoice line items from Google Sheets (or uses the included sample rows when Sheets is not enabled).
  3. Validates the invoice data, groups rows by invoice ID, calculates totals, and renders an HTML invoice for each invoice.
  4. When enabled, Documol renders each HTML invoice into a PDF and returns a temporary download URL.
  5. Download the new PDF when Documol is enabled. In the default preview, download the included Documol-generated invoice without credentials or an API request.
  6. Optionally emails the downloaded PDF invoice to the customer via SMTP as an attachment.

Setup

  1. Run the workflow as imported. Open Download Sample PDF, select Binary, then click Download. To generate a fresh invoice, create a Documol API key and set it as the value of the x-api-key header in an n8n Header Auth credential. Select that credential and enable Generate PDF with Documol.
  2. To generate invoices from your own data, enable Read Google Sheets Rows and choose a spreadsheet and tab. Use one row per line item and the column names shown in the workflow notes.
  3. (Optional) Configure SMTP credentials, set the From address and test recipient, and enable the email step after you confirm PDFs generate correctly.

Additional info

Create a free Documol account at https://app.documol.com/#/signup. API setup guide: https://docs.documol.com/api/first-request/