Manual invoicing is one of the biggest drains on a growing business. You close a deal, then spend the next twenty minutes formatting a PDF, attaching it to an email, waiting for payment, manually checking your bank account, and sending a receipt. Multiply that by every deal and you have lost hours each week — hours that should go into selling, building, and serving customers.
An automated invoice system eliminates all of that. When a deal is marked as won, n8n generates the invoice, sends it to the customer via email and WhatsApp, creates a Paystack payment link, monitors the transaction, and fires off a receipt the moment the payment clears. If the invoice goes unpaid, the system follows up automatically — no reminders needed on your end.
In this guide, you will build that exact system using n8n and Paystack. Every step is explained in plain terms, with the exact node configuration you need. By the end, you will have a production-ready invoice automation workflow running in your own n8n instance.
The Selazone Automation Vault includes a pre-built invoice generator workflow and a payment receipt workflow — both fully configured for Paystack. You can import them in under two minutes. Get the vault here.
What You Will Build
Here is the full automation flow you will create in this tutorial:
Each stage is a separate block of n8n nodes. You can wire them together in a single workflow or split them across multiple workflows connected by webhooks. This tutorial assumes a single workflow for clarity.
Prerequisites
- A running n8n instance (self-hosted or n8n cloud)
- A Paystack business account with an active secret key and public key
- A Gmail or SMTP email account for sending invoice emails
- A WhatsApp Business API account (or use Twilio WhatsApp Sandbox for testing)
- Node.js installed locally if you want to test the PDF generation helper
If you do not have a Paystack account yet, sign up at paystack.com. It is free to create an account. You will need your live secret key (or test secret key for sandbox mode) from the Settings → API Keys & Webhooks page.
Step 1: Trigger the Workflow from a New Deal
The first node in any invoice automation workflow is the trigger. You want the workflow to fire automatically when a deal is won in your CRM or when a new row appears in your deal-tracking spreadsheet.
n8n gives you several trigger options:
- HubSpot / Pipedrive / Salesforce trigger: n8n has native trigger nodes for all major CRMs. Configure the trigger to fire when a deal stage changes to "Closed Won."
- Google Sheets trigger: If you track deals in a sheet, use the Google Sheets trigger node (with "Row Added" mode) and filter for rows where the stage column equals "Won."
- Webhook trigger: If your CRM supports outgoing webhooks, point it to n8n's webhook URL. This is the most flexible approach and works with almost any CRM.
Whichever trigger you choose, the data coming into the workflow should include the customer name, email, phone number, deal value, invoice number (or a unique identifier you can use), and a line-item description of what was sold.
Step 2: Generate the Invoice PDF
Once the trigger fires, you need to produce a professional invoice PDF. n8n does not have a built-in PDF generator, but you have two practical options:
Option A: HTML + Puppeteer (Recommended)
Use an HTML node to construct an invoice template using HTML and inline CSS, then pass that HTML to a Puppeteer node that converts it to PDF. This approach gives you full control over the invoice layout — your logo, your fonts, your color scheme.
Your HTML template should include:
- Your business name, address, and logo
- The customer's name and billing address
- A unique invoice number and issue date
- A table of line items: description, quantity, unit price, total
- Subtotal, tax (if applicable), and grand total
- Payment terms and the Paystack payment link (added in Step 4)
Option B: Invoice API Service
Use an HTTP Request node to send the invoice data to a service like Invoice Ninja, Invoice Simple, or a self-hosted PDF generation API. The API returns a PDF URL or base64-encoded PDF that you can attach to your email.
For this guide, we assume Option A (HTML + Puppeteer). It is free, self-contained, and gives you full control.
Store your invoice HTML template as an n8n code node with the template stored in a variable. This keeps the invoice design separate from the workflow logic and makes it easy to update later.
Step 3: Send the Invoice via Email
With the PDF generated, the next step is delivering it to the customer. Use n8n's Gmail node (or the SMTP node for any email provider) to send the invoice as an attachment.
Configure the email node as follows:
- To: the customer's email address (from the trigger payload)
- Subject: "Invoice #[number] from [Your Business Name]"
- Body: A short message thanking the customer for their business and explaining that the invoice is attached. Include the Paystack payment link as a prominent button.
- Attachments: Set the attachment field to the binary data output of the Puppeteer PDF node.
If you use Gmail, you will need to set up OAuth credentials in n8n. For SMTP, you need your email host, port, and credentials. Both are secure — n8n encrypts credential data at rest.
Step 4: Send the Invoice via WhatsApp
Email alone is not enough. Customers in markets like Nigeria, Kenya, Ghana, and South Africa often respond faster to WhatsApp messages than to email. Adding a WhatsApp delivery channel dramatically improves the chances that your invoice is seen and paid promptly.
Use n8n's WhatsApp Business node (powered by Twilio) to send the invoice as a message:
- To: the customer's phone number with country code (e.g., +2348012345678)
- Template: Use an approved WhatsApp template for document messages, or send a text message that reads: "Hello [Name], your invoice #[number] for [amount] is ready. Click here to pay: [Paystack link]"
- Media: If your WhatsApp Business account supports document messaging, attach the PDF directly.
WhatsApp Business API requires a Twilio account and a WhatsApp Business profile approved by Meta. The setup takes about 24–48 hours for full approval. You can use the Twilio WhatsApp Sandbox to test immediately.
Step 5: Generate a Paystack Payment Link
This is the core of your Paystack invoice integration. You will use n8n's HTTP Request node to call the Paystack Transaction API and generate a payment link that the customer can click to pay securely.
Here is the exact HTTP request configuration:
- Method: POST
- URL:
https://api.paystack.co/transaction/initialize - Authentication: Bearer Token — use your Paystack secret key as the token value
- Body (JSON):
{ "email": "customer@example.com", "amount": 500000, "currency": "NGN", "reference": "INV-2026-001", "callback_url": "https://yourdomain.com/payment-callback" }
Important: Paystack accepts amounts in kobo (the smallest currency unit). Multiply your invoice total by 100. For example, an invoice of ₦5,000 becomes 500000 in the API call.
The API response contains an authorization_url field. This is the payment link you embed in the invoice email and WhatsApp message. When the customer clicks it, they are taken to a Paystack checkout page where they can pay with a card, bank transfer, USSD, or mobile money — depending on their currency and region.
Step 6: Confirm Payment and Send Receipt
Generating a payment link is only half the picture. Your automated billing system must also detect when the payment succeeds and respond accordingly.
There are two ways to do this in n8n:
Option A: Paystack Webhook (Recommended for Production)
Create a second n8n workflow that starts with a Webhook node. In your Paystack dashboard, go to Settings → Webhooks and add the webhook URL pointing to your n8n workflow. Paystack will send a POST request to that URL every time a transaction status changes.
In the workflow, filter for events where event equals charge.success. Extract the transaction reference, customer email, and amount from the payload. Then:
- Mark the invoice as paid in your database or Google Sheets
- Generate a receipt PDF (same HTML + Puppeteer approach, but with "PAID" watermark)
- Send the receipt to the customer via email and WhatsApp
- Log the transaction in an accounting sheet
Option B: Polling with n8n (For Simpler Setups)
If you cannot configure webhooks, use an n8n Schedule trigger that runs every 15 minutes. For each unpaid invoice, call the Paystack transaction/verify/:reference endpoint to check the status. If the status is success, proceed with the receipt and update flow.
Option A is preferred because it is real-time and does not waste API calls. But Option B works fine for low-volume setups.
Your receipt should include: the paid invoice number, the amount paid, the payment method used (card, bank transfer, USSD), the transaction reference from Paystack, and a thank-you message. Attach it as a PDF and send it via both email and WhatsApp.
Step 7: Automate Follow-Up Reminders for Unpaid Invoices
Not every invoice gets paid on the first try. A professional automated invoice system handles this gracefully with timed follow-ups.
Here is a three-stage reminder sequence you can build in n8n:
Gentle nudge
"Hi [Name], this is a friendly reminder that invoice #[number] for [amount] is due. You can pay securely here: [Paystack link]. Let us know if you have any questions."
Firmer follow-up
"Hi [Name], invoice #[number] is now [X] days overdue. Please arrange payment at your earliest convenience to avoid service interruption. Pay here: [Paystack link]."
Final notice + escalation
"Final notice: invoice #[number] is [X] days overdue. If payment is not received within 48 hours, your account will be suspended. Pay now: [Paystack link]. Reply to this email if you need to discuss payment arrangements."
To build this in n8n, use a Schedule trigger that runs daily. Query your unpaid invoices (from a Google Sheet, database, or n8n's internal data store). For each invoice that is past due, calculate the days overdue and decide which reminder to send based on the threshold. Send the appropriate message and log the reminder date so you do not send duplicates.
Add a "reminder level" column to your invoice tracking sheet. Each time a reminder is sent, increment the value. The daily check workflow only sends a reminder if the current level matches the overdue threshold. This prevents duplicate messages.
Tying It All Together: The Complete Workflow Map
Here is what your final n8n invoice automation workflow looks like at a high level:
And the separate webhook listener for payment confirmation:
And the daily reminder sweep:
Why This Matters for Your Business
An automated invoice system is not just a convenience — it directly impacts your cash flow and customer experience. When invoices go out within seconds of a deal closing, customers perceive your business as professional and organized. When they can pay with a single click on a Paystack link, friction disappears. When receipts arrive automatically, support tickets about payment status drop to zero.
Businesses that implement automated billing with n8n and Paystack report an average reduction in days-sales-outstanding (DSO) of 40–60%. That means you get paid weeks faster without lifting a finger.
The n8n invoice generator workflow you just built handles the entire lifecycle: create, send, collect, confirm, and follow up. It is a complete accounts receivable department running on a single automation instance.
Go Further with the Selazone Automation Vault
Building this workflow from scratch is a valuable exercise. But if you want to go live in under 10 minutes — with professional invoice templates, pre-configured Paystack nodes, and battle-tested error handling — the Selazone Automation Vault has you covered.
The vault includes two workflows that directly apply to this tutorial:
- Invoice Generator Workflow — Trigger from any CRM, generate PDF, send via email + WhatsApp, create Paystack payment link
- Payment Receipt Workflow — Listen for Paystack webhooks, verify payments, send receipt PDFs, update your tracking sheet
Plus 34 other production-grade n8n workflows across lead generation, sales, marketing, AI agents, customer support, operations, and HR — each with documentation, credential mappings, and 200 AI prompts to accelerate your automation stack.
Automate Your Invoicing in Under 10 Minutes
Get the Invoice Generator + Payment Receipt workflows — and 34 more — in the Selazone Automation Vault. Import, configure, and go live today.
Buy the Automation Vault →