When a job, order or project is marked complete in your other system, this workflow creates the QuickBooks Online invoice once. It checks for an existing invoice with the same number first, matches the customer by email or name (or creates them), can email the invoice from QuickBooks, and posts every result and every failure to Slack.
What it does
- Receive and map: a webhook (or the built-in sample job) is read using the
field_*names in Config, so any system's payload works without editing code. Jobs with no id, no customer or a bad line are rejected with a reason. - Never invoice twice: the invoice number is the job id plus an optional prefix. If QuickBooks already has it, nothing is created.
- Customer: matched by email when there is one, otherwise by display name, and created if new.
- Invoice: lines map to your QuickBooks items, the due date follows
due_days, andemail_invoicesends it from QuickBooks. - Retries and alerts: every QuickBooks call retries 3 times. Anything that still fails posts the step, the job and QuickBooks' reason to Slack.
What you need
- An n8n instance
- A QuickBooks Online company and an Intuit developer app (for the OAuth2 credential)
- A Slack incoming webhook URL
Setup
- Import
workflow.jsoninto n8n. - Create a QuickBooks Online OAuth2 API credential and select it on the five QuickBooks steps.
- In Config, set
realm_id,default_item_idand the Slack URL. Leaveqbo_base_urlon the sandbox until you have tested. - Set the
field_*names in Config to match your system's payload. Dotted paths such asjob.idwork. - Click Test workflow to send the sample job to your sandbox company and check the invoice.
- Point your system's webhook at Job completed (webhook), then switch
qbo_base_urltohttps://quickbooks.api.intuit.com.
Notes
- No credentials are included. Every value marked
REPLACE_MEorREPLACE_WITH_...must be set before you activate the workflow. - QuickBooks invoice numbers can be at most 21 characters, so the prefix plus job id must fit.
Importing it
In n8n, open a new workflow, choose the … menu at the top right, then Import from file and pick the downloaded workflow.json. You can also open the file, copy everything and paste it onto an empty canvas. New to n8n? Start with what n8n is and how templates work.
Background reading: QuickBooks automation.
Want it set up and running in your own n8n? Send us a short brief.
Pushbuild · Automate your business with Pushbuild: pushbuild.com/