Browse the docs

Agent setup guide

Invoice Ninja Payment Reminder

Every weekday, overdue Invoice Ninja invoices get a polite reminder email with the invoice number, due date and balance from Invoice Ninja, after your approval.

Available About 12 min to set up

What it does

Every weekday, overdue Invoice Ninja invoices get a polite reminder email with the invoice number, due date and balance from Invoice Ninja, after your approval.

  • Every weekday, lists your overdue Invoice Ninja invoices with the days overdue worked out in code.
  • AI writes one polite reminder text without any amounts; you approve it once per run.
  • Each client's primary contact gets their own email from Gmail with the invoice number, due date and balance copied in code.
  • Who was emailed and skipped is counted in code.

What it needs

  • A paid plan (agents run live on paid plans).
  • An AI provider key (Settings → AI Providers).
  • Invoice Ninja (hosted Pro or Enterprise, or self-hosted) and Gmail, connected in Settings → Integrations.

What it doesn't do

  • It never changes invoices or records payments in Invoice Ninja.
  • Clients whose primary contact has no valid email are skipped.
  • Up to 100 overdue invoices per run.

Availability and plans

Available

Its workflow is built and tested, and every app it needs is live. You can get it and set it up now.

Included free on the Enterprise plan; on other paid plans it's a one-time purchase per workspace (the price is on the Agents page). The Agents page in the app always shows its current status.

Before you start

  • A paid plan: agents run live, and the Free plan only runs Dry Runs.
  • An AI provider key (OpenAI, Anthropic, Google and more) in Settings → AI Providers. AI usage is billed by your provider.
  • These apps, connected in Settings → Integrations: Invoice Ninja and Gmail.
  • Nothing to send: the agent runs on a schedule.
  • About 12 minutes.

Set it up step by step

Get the agent first (buy it, or it's already yours when your plan includes it), then in Agents → My agents press “Set up this agent”. That creates the agent's workflow in your workspace (it counts towards your plan's workflow limit) and opens the canvas with a setup checklist above it. Each item links to the exact place to go and ticks itself off when it's done.

1. Connect your AI provider

The AI steps run on your own key (OpenAI, Anthropic, Google and more). Add one in Settings → AI Providers.

2. Connect Invoice Ninja

Connect Invoice Ninja with an API token (Settings → Account Management → API Tokens in Invoice Ninja; hosted Pro or Enterprise, or self-hosted).

3. Connect Gmail

Connect the Gmail account the emails go out from (Settings → Integrations → Gmail).

4. Pick the Invoice Ninja account

Open “Find overdue invoices” and “Read the client” and pick your Invoice Ninja connection.

SettingWhat to enterIn step
Invoice Ninja accountYour Invoice Ninja connection. Pick your connected Invoice Ninja account.“Find overdue invoices”
Invoice Ninja account (client lookup)The same Invoice Ninja connection, to read each client's contact. Pick your connected Invoice Ninja account.“Read the client”

5. Describe your reminders

Open “Write the reminder” and replace the placeholder.

SettingWhat to enterIn step
How clients pay, your toneReplace the placeholder with how clients can pay, who to contact, your tone and your sign-off. It starts as “[YOUR BUSINESS NAME, YOUR TONE WITH CLIENTS, HOW THEY CAN PAY (E.G. THE CLIENT PORTAL LINK IN YOUR INVOICE EMAIL OR BANK TRANSFER), WHO TO CONTACT WITH QUESTIONS AND YOUR SIGN-OFF]” until you replace it.“Write the reminder”

6. Pick the Gmail account

Open “Email the client” and pick the Gmail account.

SettingWhat to enterIn step
Gmail accountThe Gmail or Google Workspace account the reminders go out from. Pick your connected Gmail account.“Email the client”

7. Test it with Dry Run

Press Dry Run: the agent runs on sample data with no messages sent and nothing written to your apps.

8. Switch the trigger on

Open the trigger, set your time zone and switch the schedule on. It runs every weekday at 9:00.

How it works

The agent is a normal workflow with 17 steps (1 AI step, with a person approving in Reviews). You can open, edit and monitor it like any other workflow.

  • Weekdays at 9:00 — Runs on a schedule (cron 0 9 * * 1-5, UTC — change it in the trigger's settings). Runs every weekday morning. Set your time zone on the trigger.
  • Find overdue invoices — Invoice Ninja: List overdue invoices. Lists Invoice Ninja's overdue invoices (oldest due first), with the days overdue worked out in code.
  • Anything overdue? — Decision: picks the branch to follow. No overdue invoices: nothing is drafted.
  • Nothing overdue — Kept in the run history. Branch: None. No invoice is past its due date.
  • Write the reminder — AI step (runs on your AI provider key). Branch: Overdue. AI writes one short, polite reminder for all overdue invoices. The invoice number, due date and balance are added for each client in code, from Invoice Ninja.
  • Approve the reminders — A person approves or rejects it in Reviews (the run waits). The reminder waits in Reviews with the list of overdue invoices: edit it, approve to email each client, or reject.
  • Check the reminder — Step. Branch: Approved. In code: a subject and body, under the length limit and no leftover placeholders.
  • Passed the checks? — Decision: picks the branch to follow. Passed: one email per invoice. Otherwise nothing is sent.
  • Held: nothing sent — Kept in the run history. Branch: Held. The reminder was blank, too long or had a placeholder.
  • Each overdue invoice — Repeats the steps below for each item (up to 100 per run). Branch: Send. Sends one email per overdue invoice (up to 100).
  • [For each item — “Each overdue invoice”] Read the client — Invoice Ninja: Get a client. Reads the invoice's client and primary contact from Invoice Ninja.
  • [For each item — “Each overdue invoice”] Valid email? — Step. In code: the client's primary contact has one valid email address.
  • [For each item — “Each overdue invoice”] Email them? — Decision: picks the branch to follow. No valid contact email: skipped (listed in the count).
  • [For each item — “Each overdue invoice”] Skipped: no valid email — Kept in the run history. Branch: Skip. This client's primary contact has no valid email in Invoice Ninja.
  • [For each item — “Each overdue invoice”] Email the client — Gmail: Send an email. Branch: Valid. Sends the approved reminder from your Gmail with the invoice number, due date and balance copied from Invoice Ninja.
  • Count what was sent — Step. In code: which clients were emailed and which were skipped.
  • Reminders sent — Kept in the run history. The run history keeps the count and each email.

Test it with Dry Run

Press Dry Run in the canvas. The agent runs on the sample data stored on its trigger (the “Sample data for Dry Run” box), so you can check every step's output before anything is live.

  • Nothing is sent or written: app actions, emails and Slack posts are simulated, and AI steps don't call your AI provider.
  • Approval steps use the Dry Run decision you pick in the step's settings (approved, rejected or timeout), so you can try each branch.
  • For-each loops repeat only the first 3 items.

Go live

  • Open the trigger, set your time zone and switch the schedule on. It runs every weekday at 9:00.
  • Scheduled runs start only once the schedule is activated, and can't repeat faster than your plan's minimum interval.
  • The setup checklist adds a “paid plan” item before activation: live runs need a paid plan (the Free plan only runs Dry Runs).
  • When every checklist item is done and the trigger is on, the checklist says “Live — this agent is running”. Follow its runs in the workflow's History tab and in Analytics → Agents.

Questions

Can the AI get an amount wrong?

The AI never writes amounts: the invoice number, due date and balance are copied from Invoice Ninja into each email in code.

Does it work with self-hosted Invoice Ninja?

Yes, with version 5: enter your install's https:// address on the connection.

Will a client get a reminder every day?

You approve the reminders on each run. Reject a run, or switch the schedule to weekly, for fewer reminders.

Troubleshooting

  • “No AI provider connected” or a rejected key: connect or fix the key in Settings → AI Providers, then press Test there.
  • A checklist item stays unticked: the setting is still empty or still contains its placeholder text. Open the step from the checklist and fill it in.
  • An app step fails with “Needs reconnect”: the account's access was revoked or expired. Reconnect it in Settings → Integrations.
  • It didn't run at the expected time: the schedule must be activated, and its time is in the trigger's timezone.
  • A run shows as paused: it's waiting for someone in Reviews to approve or reject it.
  • A step failed: open the run in History and check that step in the Trace tab for the error and what it received.

Generated from the agent's own workflow, so it always matches what the agent does. Last updated .