🧾 Generate invoice PDFs from Google Sheets with DocuPotion and Drive

⚡ 47 views · 🧾 Invoice Processing

Description

Automatically generate an Invoice PDF from Google Sheets data with DocuPotion

How it works

This workflow automatically generates a branded PDF invoice from data in Google Sheets and saves it to Google Drive. No manual document editing required.

It’s triggered when you update the status column of any row in your invoices sheet to Active. From there it:

  1. Fetches all line items for that invoice from a separate “line items” tab (matched by invoice_number)
  2. Aggregates the line items and calculates the total
  3. Generates a PDF using your DocuPotion invoice template, with customer details and line items merged in
  4. Uploads the PDF to your Google Drive, named Invoice-{invoice_number}.pdf
  5. Writes the PDF link back to the invoice row and updates its status to Sent

The workflow loops over invoices, so you can flip multiple rows to Active at once and each will be processed independently. Polling runs every minute (but you can change this to whatever frequency you want).

What you’ll need

Set up steps

1. Copy the demo Google Sheet

👉 Demo invoice Sheet

Open the link and go to File → Make a copy. This gives you a Sheet with the correct structure:

2. Install the DocuPotion community node

In n8n, go to Settings → Community Nodes → Install and enter ‘DocuPotion’.

3. Create your DocuPotion invoice template

Log into DocuPotion and create a template for your invoice layout. The workflow passes these merge fields to the template:

invoice_number, invoice_date, due_date, customer_name, customer_company, customer_address, customer_email, total, and line_items[] (an array where each item has description, quantity, unit_price).

Note the template ID from DocuPotion — you’ll need it in step 5.

4. Connect credentials

Import this workflow into n8n, then connect credentials for:

5. Point the workflow at your resources

6. Activate and test

Turn on the workflow. Then in your invoices Sheet, change the status of a sample row to Active. Within a minute, you should see:

Customisation ideas

🔗 Nodes Used

Google Sheets, Google Drive, Google Sheets Trigger, Filter

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup