Zapier Tutorial

Automate Invoice Generation with Zapier

Connect Stripe, Gumroad, Paddle, or any payment platform to auto-generate and send professional invoices when payments are received.

Vincent Ventalon
Vincent Ventalon
·Updated
TemplateFox

About the TemplateFox Integration

The official TemplateFox Zapier integration lets you generate PDFs from templates with dynamic data. Native integration — no HTTP setup required. Connect to 7,000+ apps.

Why automate invoices?

You just got a payment notification. Now you need to create an invoice — open your template, copy the customer details, add line items, double-check the math, export to PDF, attach it to an email. For one order? Fine. For 10 a day? That's your entire morning gone.

Stripe's built-in invoices work, but they look like everyone else's. Same layout, same font, same "powered by Stripe" branding. If you're running a serious business, you probably want something that actually looks like your business.

Here's what we're building: a Zap that fires whenever you get paid, generates a branded PDF invoice with all the details, and emails it to your customer. No copying, no exporting, no forgetting to send it.

1

Create your invoice template

1.1 — Choose a template

Start with one of our pre-built invoice templates or create your own:

  1. Go to Templates
  2. Filter by Invoice category
  3. Choose a template that matches your style (minimal, corporate, creative)
  4. Click Use Template to add it to your dashboard

This tutorial uses the European Corporate Invoice template.

Other options: Minimalist European for freelancers, Modern with QR Code for instant payments.

1.2 — Understand the template structure

The template uses dynamic fields that get replaced with real data. Some fields you'll hardcode (your company info), others come from Zapier (client, invoice details).

Invoice template in the visual editor showing dynamic fields and table structure

Hardcode once (your company)

  • company_name — Your business name
  • company_address_1/2 — Your address
  • company_vat — Your VAT number
  • iban, bic, bank_name — Bank details

Edit these directly in the template — they stay the same for every invoice.

Dynamic from Zapier (per invoice)

  • client_company — Customer name
  • client_address_1/2 — Customer address
  • invoice_number — Unique invoice ID
  • invoice_date, due_date — Dates
  • items[] — Line items array

Map these from your payment platform in Zapier.

Auto-expanding line items table

The items table automatically repeats for each product in the items array. Send 2 items, get 2 rows. Send 10 items, get 10 rows.

Each row uses:
{{items.description}} — Service name
{{items.amount_excl_vat}} — Price before tax
{{items.vat_rate}} — Tax rate (20%)
{{items.vat_amount}} — Tax amount

Automatic totals with expressions

The template calculates subtotal, VAT, and total automatically using sum() expressions. You don't need to calculate these in Zapier.

Subtotal: {{sum(items, 'amount_excl_vat')}}
VAT: {{sum(items, 'vat_amount')}}
Total: {{sum(items, 'amount_excl_vat') + sum(items, 'vat_amount')}}

Page numbers (for multi-page invoices)

The footer shows page numbers using system variables. If your invoice has many line items and spans multiple pages, pagination is automatic.

{{sys.page_number}} / {{sys.total_pages}}→ 1 / 2

1.3 — Test with the Preview tab

The Preview tab lets you test your template with sample data before connecting to Zapier. The JSON panel on the right contains your test data, and the rendered invoice appears on the left in real-time.

Invoice template preview with JSON data panel showing real-time rendering
1

JSON data maps to template fields

Each key in the JSON (like client_company) fills its matching {{client_company}} placeholder.

2

Line items array becomes table rows

The 4 objects in the items array generate 4 table rows automatically.

3

Totals calculate automatically

The sum() expressions add up all values: 3500 + 4200 + 6800 + 1200 = 15700 € subtotal.

Tip: Use the Copy Payload button to copy the JSON structure. This is the exact format you'll need to send from Zapier.

View full JSON payload example
{
"company_name": "Atelier Duval",
"company_tagline": "Strategic Design & Consulting",
"company_address_1": "24 Rue du Faubourg Saint-Honoré",
"company_address_2": "75008 Paris, France",
"company_email": "billing@atelierduval.eu",
"company_vat": "FR 76 832 456 789",
"company_reg": "832 456 789 00012",
"client_company": "Müller & Partners GmbH",
"client_address_1": "Bahnhofstrasse 42",
"client_address_2": "8001 Zürich, Switzerland",
"client_vat": "CHE-123.456.789",
"client_ref": "CL-0847",
"invoice_number": "INV-2026-0042",
"invoice_date": "January 15, 2026",
"due_date": "February 14, 2026",
"payment_terms": "Net 30",
"iban": "FR76 3000 4000 0100 0000 1234 567",
"bic": "BNPAFRPPXXX",
"bank_name": "BNP Paribas",
"account_name": "ATELIER DUVAL SARL",
"notes": "Late payments are subject to a penalty...",
"items": [
{
"description": "Strategic Audit & Recommendations",
"amount_excl_vat": 3500,
"vat_rate": "20%",
"vat_amount": 700
},
// ... more items
]
}
2

Connect with Zapier

The whole thing runs automatically. Payment hits Stripe, invoice lands in your customer's inbox:

Complete Zapier workflow: Stripe trigger → TemplateFox Generate PDF → Gmail Send Email

2.1 — Set up the trigger

Choose your payment platform and trigger event:

S

Stripe

Trigger: New Payment Intent Succeeded or New Charge

G

Gumroad

Trigger: New Sale

L

LemonSqueezy

Trigger: New Order

P

Paddle

Trigger: New Payment Completed

  1. Go to zapier.com and create a new Zap
  2. Search for your payment platform
  3. Select the appropriate trigger event
  4. Connect your account and test the trigger

🧪 Testing with Stripe Test Mode

Connect Zapier using your test secret key (starts with sk_test_). Then create a test payment in Stripe Dashboard:

  • • Card: 4242 4242 4242 4242
  • • Expiry: any future date (e.g., 10/30)
  • • CVC: 123
Creating a test payment in Stripe Dashboard with test card 4242

2.2 — Add TemplateFox action

After testing the trigger, Zapier has your Stripe data. Now connect it to your invoice template:

  1. Add an Action step
  2. Search for "TemplateFox"
  3. Select "Generate PDF"
  4. Connect your TemplateFox account with your API key
  5. Select your invoice template
  6. Map each field — click the + button to insert Stripe data, or type static text
Zapier field mapping for TemplateFox Generate PDF action showing Stripe data

Tip: Hardcode your company info (address, IBAN, VAT) directly in the fields — they stay the same for every invoice. Only map dynamic data like customer name and amounts from Stripe.

2.3 — Send via email

Automatically email the invoice to your customer:

  1. Add another Action step
  2. Choose Gmail, Outlook, or SMTP by Zapier
  3. Select "Send Email"
  4. Set the recipient to the customer's email from the trigger
  5. Write your email subject: Invoice #{{invoice_number}} from Your Company
  6. Attach the PDF URL from the TemplateFox action
  7. Turn on your Zap

That's it. Payment comes in, invoice goes out. Your customers get professional documentation, and you didn't lift a finger.

What your customer gets

A clean, professional invoice with all the details filled in — no more generic Stripe receipts:

Final generated invoice PDF with all data filled in automatically

Supported platforms

Any payment platform with a Zapier integration works. Here are the most popular:

S
Stripe
G
Gumroad
P
Paddle
L
LemonSqueezy
P
PayPal
S
Square
S
Shopify
W
WooCommerce
C
Chargebee

Frequently asked questions

Which payment platforms can I connect?

Any payment platform with a Zapier integration: Stripe, Gumroad, Paddle, LemonSqueezy, PayPal, Square, Shopify, WooCommerce, and 100+ more. If it has a "Payment Received" or "New Order" trigger in Zapier, it works.

Can I include line items and taxes on the invoice?

Yes. Use data binding to pass arrays of line items from your payment platform. The template will automatically generate rows for each product, calculate subtotals, apply tax rates, and show the final total.

How do I handle different currencies?

Your payment platform sends the currency with each transaction. Map the currency field to your template, and it will display the correct symbol. You can also use conditional formatting to show different tax labels (VAT, GST, Sales Tax) based on region.

Can I send the invoice directly to the customer?

Yes. Add an email action after the PDF generation step in your Zap. Use Gmail, Outlook, SMTP, or any email service. The customer's email comes from the payment trigger, and the PDF attaches automatically.

What about invoice numbering?

Use system variables combined with your payment platform's transaction ID. For sequential numbering, use Zapier's built-in formatter or connect to a Google Sheet that tracks the last invoice number.

What does automated invoicing cost?

TemplateFox offers 60 free PDFs per month. Paid plans start at $19/month for higher volume. View pricing.

Can I include multiple currencies on invoices?

Yes. Your payment platform sends the currency with each transaction. Map it to your template, and the correct currency symbol displays automatically. You can also use conditional formatting to handle different regional formats.

Automate your PDF generation

Complete documentation, no-code integrations, and a powerful API to help you generate PDFs at scale. Let us handle the boring stuff.