← All posts
How-ToAugust 15, 2026 · 5 min

How to Automate Invoicing and Stop Chasing Payments

You can build a fully hands-off invoice → payment pipeline that creates a Stripe invoice, records it in QuickBooks, and sends escalating email reminders - all without writing a line of custom code. The result is a reliable accounts-receivable workflow that reduces manual effort and improves cash flow.

Key insight: Automation removes the human "forget-to-follow-up" error, so you get paid on schedule instead of spending hours on reminder emails.

invoice automation is the use of software tools and integrations to generate invoices, track payments, and trigger follow-up actions without manual intervention.

Below is a step-by-step guide that any SaaS founder, freelancer, or small-business accountant can follow today.


What you need

ToolPlan / PriceRole
n8n (self-hosted)Free (Docker) - cloud starts at $20 / monthOrchestrates the workflow (trigger, Stripe API, QuickBooks API, email reminders)
StripePay-as-you-go (2.9 % + 30 ¢ per successful charge)Generates invoices and collects payments
QuickBooks Online - Simple Start$25 / month (check QuickBooks pricing page for latest rates)Records invoices for accounting and reporting
Gmail (or any SMTP)Free (personal) - $6 / month for Google WorkspaceSends reminder emails
Git (optional)FreeVersion-controls workflow JSON for auditability

Estimated build time: 3 - 4 hours (including Docker setup, API key configuration, and testing).


How to automate invoicing - the escalating-reminder build

1. Provision n8n

  1. Install Docker if you haven't already:
bash
 curl -fsSL https://get.docker.com -o get-docker.sh
 sh get-docker.sh
 
  1. Pull the n8n image and start a container that persists data:
bash
 docker run -d \
 --name n8n \
 -p 5678:5678 \
 -v ~/.n8n:/root/.n8n \
 n8nio/n8n
 

This launches the n8n UI at http://localhost:5678. The container runs for free on your own server; you can later switch to the cloud version if you prefer a managed service.

2. Create API credentials

  • Stripe: In the Stripe Dashboard → Developers → API keys, copy the Publishable key and Secret key.
  • QuickBooks: Follow the QuickBooks OAuth2 guide to obtain Client ID, Client Secret, and a Refresh token.
  • Gmail: Create an App password (if 2-FA is enabled) or enable "Less secure apps" for a regular password.

Store each secret in n8n's Credentials store:

  1. Open the n8n UI → Settings → Credentials → New Credential.
  2. Choose the appropriate type (Stripe API, QuickBooks OAuth2, SMTP) and paste the keys.

3. Design the workflow

#### a. Trigger

Use the Cron node to run nightly at 02:00 UTC, which scans for invoices that are overdue by one day.

FieldValue
Cron expression0 2 * * *
TimezoneUTC

#### b. Find overdue invoices in Stripe

Add a Stripe node, set Operation to List Invoices, and filter with status=unpaid and due_date < now() - 1d.

#### c. Create a QuickBooks transaction

Insert a QuickBooks node, Operation = Create Sales Receipt. Map fields from the Stripe invoice:

  • Customercustomer.email
  • Amountinvoice.amount_due (converted from cents to dollars)
  • Dateinvoice.created

#### d. Send the first reminder email

Add an SMTP Email node. Use the following template (replace placeholders with n8n expressions):

text
Subject: Friendly reminder - invoice {{ $json["invoice"]["number"] }} is due

Hi {{ $json["customer"]["name"] }},

Our records show that invoice {{ $json["invoice"]["number"] }} ({{ $json["invoice"]["amount_due"] | $number($, 2) }}) was due yesterday. Please click the link below to pay securely via Stripe:

{{ $json["invoice"]["hosted_invoice_url"] }}

Thanks for your prompt attention.

Best, 
Your Finance Team

#### e. Escalate reminders

Create three If nodes that check the invoice age (1 day, 7 days, 14 days) and send increasingly urgent emails. For the 7-day step, prepend "Second reminder - overdue" to the subject; for the 14-day step, add "Final notice - service suspension possible".

Each email node uses the same template with the adjusted subject line.

#### f. Optional - automatic payment link

If you prefer to auto-charge customers with saved payment methods, add a Stripe - Create Payment Intent node after the first reminder and include the payment link in the email body.

4. Save and activate

Click Save in n8n, then toggle the workflow to Active. The pipeline will now run automatically each night, generate invoices in Stripe, log them in QuickBooks, and send escalating reminder emails until payment is received.

#### Example n8n node JSON for the Stripe List Invoices step

json
{
 "name": "Stripe List Overdue Invoices",
 "type": "n8n-nodes-base.stripe",
 "position": [
 400,
 300
 ],
 "parameters": {
 "operation": "listInvoices",
 "filters": {
 "status": "unpaid",
 "due_date": {
 "operator": "lessThan",
 "value": "={{ $now.subtract(1, 'day').unix() }}"
 }
 }
 },
 "credentials": {
 "stripeApi": "Stripe API Key"
 }
}

This node pulls every unpaid invoice whose due date is older than one day, providing the data that the rest of the workflow consumes.


Where this breaks

Failure modeSymptomFix
API rate limits (Stripe: 100 req/s, QuickBooks: 250 req/min)Workflow stalls, "429 Too Many Requests" error in logsAdd Throttle nodes in n8n to respect limits (maxRequestsPerSecond: 90 for Stripe).
Expired OAuth token (QuickBooks)QuickBooks node returns "401 Unauthorized"Use the built-in Refresh Token feature in the QuickBooks credential; schedule a separate OAuth Refresh node every 24 h.
SMTP auth failuresEmails never leave n8n, "Authentication failed" in logVerify the App password or enable "Less secure apps"; test with a simple SMTP Send node before attaching to the workflow.
Invoice amount roundingPayment link shows $0.01 discrepancyConvert cents to dollars with {{ $json["amount_due"] / 100 }} and format to two decimals.
Unexpected invoice status changesDuplicate reminder emails sentAdd an If node to check invoice.status before each reminder; only send if still unpaid.
Cost blow-up (high volume of reminders)Monthly email spend spikesSet a hard cap on the number of reminders per month using a Set node and a workflow Stop condition.

For a deeper technical reference, see n8n's documentation.

FAQ

How do I test the workflow without sending real emails? Create a separate SMTP credential that points to a mail-catching service like MailHog (Docker image mailhog/mailhog). Replace the production Gmail credential with this test credential while you run the workflow's Execute Node mode. No real emails leave the system.

Can I use PayPal instead of Stripe? Yes. n8n offers a PayPal node that supports Create Invoice and Capture Payment. Replace the Stripe nodes with PayPal equivalents and map the same fields to QuickBooks. Be aware that PayPal's fee structure (2.9 % + $0.30 per transaction) differs slightly from Stripe's.

What if a client wants to pay via bank transfer? Add a Static Text field to the email template with your bank details and a note like "Please reference invoice #{{ $json["invoice"]["number"] }} when transferring." The workflow will still log the invoice in QuickBooks; you'll need to manually mark the payment as received once it clears.

How do I handle VAT or sales tax? Include a Set node before the Stripe invoice creation that calculates tax based on the client's location (tax_rate = 0.20 for EU VAT). Use Stripe's tax parameter to add the amount, and map the same tax fields to QuickBooks for accurate reporting.

Is the workflow GDPR-compliant? All personal data stays within your own server (Docker container) and the third-party APIs you explicitly authorize. Ensure you have a Data Processing Agreement with Stripe and QuickBooks, and configure n8n's Encryption at Rest option (--env-file with N8N_ENCRYPTION_KEY) to protect stored credentials.


Ready to ship a zero-maintenance invoicing engine?

Grab the full template, step-by-step guide, and pre-configured n8n JSON from the Invoice & Payment Chaser vault: https://getaab.com/vault/invoice-payment-chaser.

For a quick-start overview, download the free guide at https://getaab.com/free.

By following this playbook, you'll know exactly how to automate invoicing and eliminate the endless cycle of payment chasing.

Frequently asked questions

How does the workflow know when an invoice is paid?

The Stripe webhook fires only on `charge.succeeded`. The workflow creates the QuickBooks invoice after payment, so the invoice is considered "paid" from the start. If you also accept offline payments, add a separate "QuickBooks Get Invoice" trigger that runs daily and checks for a non-zero `Balance`.

Can I replace QuickBooks with Xero or FreshBooks?

Yes. n8n has built-in nodes for Xero and FreshBooks. Swap the "QuickBooks" node for the equivalent "Xero - Create Invoice" node and adjust the payload fields according to the provider's API docs.

What if a customer disputes a charge on Stripe?

Create an additional branch after the Stripe trigger that listens for `charge.dispute.created`. In that branch, use the QuickBooks "Update Invoice" node to set the status to "On Hold" and pause any further reminder emails.

Do I need a developer to maintain the OAuth tokens?

No. The "Refresh Token" node can be scheduled to run automatically, and n8n will store the new token in an environment variable. This eliminates manual token refresh.

Is the PDF generated compliant with accounting standards?

PDFShift simply renders HTML to PDF. You must ensure the HTML contains required fields (VAT number, payment terms, company registration). Use a template that matches your local tax authority's checklist.

Where can I see a live example of this workflow?

Check out the template in the Invoice & Payment Chaser. It includes all nodes pre-filled and a step-by-step video walkthrough. --- Ready to stop chasing payments? Grab the free guide to get a copy-and-paste version of the workflow and a list of best-practice reminder templates: https://getaab.com/free.

Get the full toolkit

Grab the free guide with the node-by-node build for all 10 automations.

No spam. Unsubscribe anytime. Just the good stuff.