Quick overview
This workflow runs on schedules to invoice and chase unpaid WooCommerce on-hold orders in WordPress using Invoice Ninja, tracking each order in an n8n Data Table to avoid duplicates, sending reminders and optional Telegram alerts, and delivering a daily email report via SMTP.
How it works
- Runs every hour and every day at 08:00 using scheduled triggers.
- Validates your chase settings, then uses the Invoice Ninja API and WooCommerce REST API to confirm connectivity and determine whether to run the hourly invoicing path or the daily chasing path.
- On the hourly run, fetches WooCommerce orders with status on-hold, filters to selected payment methods, skips orders already logged in the n8n Data Table, and records newly claimed orders for tracking.
- Creates or matches the customer in Invoice Ninja, builds an invoice from WooCommerce line items (including shipping, fees, and taxes), verifies the Invoice Ninja total matches the WooCommerce order total, and emails the invoice via Invoice Ninja.
- Adds an order note in WooCommerce with the Invoice Ninja invoice number and updates the tracking row to mark the order as invoiced, or records a failure reason if any invoicing step fails.
- On the daily run, loads all tracked invoiced orders, checks each Invoice Ninja invoice and its WooCommerce order status, then releases fully paid orders to processing or stops chasing if the invoice/order was changed externally.
- For overdue invoices, sends an Invoice Ninja reminder email, optionally sends a Telegram owner alert, and optionally voids the invoice and cancels the WooCommerce order when the configured cancel day is reached.
- Sends a daily SMTP email report summarizing newly invoiced orders, payments, overdue status, cancellations, and any errors that require attention.
Setup
- Create an n8n Data Table named dd_in_chase with the columns used by the workflow (for example order_id, order_number, state, currency, order_total, due_date, invoice_id, invoice_number, amount_paid, step_a_at, step_b_at, step_c_at, last_error, invoiced_at, closed_at).
- Add credentials for WooCommerce (read/write), Invoice Ninja v5, SMTP (for the run failure and daily report emails), and Telegram (optional, for owner alerts).
- Update the Chase settings values, including your WordPress store URL, Invoice Ninja base URL, payment method IDs to chase, due/reminder/alert/cancel day thresholds, report email addresses, and optional telegram_chat_id.
- If you enable cancellation, set cancel_unpaid_orders to true and confirm your reminder and cancel day settings reflect your policy, since cancelled orders and voided invoices are not automatically restored.
Requirements
- WordPress with WooCommerce and a REST API key with Read/Write permission (tested on WooCommerce 11.2.1, WordPress 7.1.3)
- Invoice Ninja v5 with an API token and its email set up to send invoices (tested on 5.13.22, self-hosted)
- Self-hosted n8n with data tables (tested on 2.33.7)
- An SMTP credential for the report and failure emails
- A Telegram bot, if you want the owner alerts
Customization
- payment_methods takes any WooCommerce payment method id that leaves orders on hold
- due_days, reminder_day, owner_alert_day and cancel_day set the timetable, counted in whole days
- Leave telegram_chat_id empty to switch the owner alerts off
- Cancelling on day C stays off until you set cancel_unpaid_orders to true
Additional info
Full guide, free to read: https://datadrifter.io/chase-unpaid-woocommerce-orders-wordpress-invoice-ninja/
After purchase you download the workflow from your DataDrifter account. That copy carries the full setup notes on the canvas: the credentials, the data table columns and every setting. Email support and updates to this version are included.
It does not take payments: your customer pays through Invoice Ninja's invoice page or however you have set it up there. Invoices and reminders go out through Invoice Ninja, with Invoice Ninja's own mail settings.