Quick Overview
This workflow runs every Monday morning to pull active invoices from Invoice Ninja, generate an accounts-receivable ageing summary as a branded PDF using PDFMint, and email the report to a chosen recipient via Gmail.
How it works
- Runs every Monday at 08:00 on a schedule.
- Loads your company branding and report recipient details used throughout the report.
- Fetches all active invoices from Invoice Ninja and includes each invoice’s client details.
- Filters to invoices with an outstanding balance, calculates days past due, and builds an HTML ageing table grouped by client and bucketed into not-yet-due, 1–30, 31–60, 61–90, and 90+ days.
- Stops the workflow when there are no clients with an outstanding balance to avoid generating and sending an empty report.
- Converts the HTML report into a landscape PDF with PDFMint and emails it as an attachment using Gmail.
Setup
- Install the PDFMint community node (
n8n-nodes-pdfmint) and add PDFMint API credentials in n8n.
- Add your Invoice Ninja API credentials and ensure the account has access to read invoices and client data.
- Add a Gmail OAuth2 credential with permission to send email.
- Update the company name, address, accent colour, currency, footer note, and recipient email address in the “Your company details” step.
Try it without Invoice Ninja
The Invoice Ninja node ships with pinned sample data: six invoices across three clients, one already paid and one not yet due. Open the workflow and run it — the paid invoice drops out, the client with a 90+ day balance is flagged, and the totals row adds up to the four summary cards at the top.