Create invoices and expenses from new table rows
Each new row in your invoice table becomes a QuickBooks invoice or expense, so bookkeeping entries are created without retyping and duplicates are skipped.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/create-invoices-and-expenses-from-new-table-rows/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Finance · Accounts payable
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/create-invoices-and-expenses-from-new-table-rows
Set it up with the CLI
- Add it. Copies the folder into
zaps/create-invoices-and-expenses-from-new-table-rows/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/create-invoices-and-expenses-from-new-table-rows - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy create-invoices-and-expenses-from-new-table-rows - Check it. Its recent runs, with status and errors.
npx zap-pack logs create-invoices-and-expenses-from-new-table-rows
zaps/create-invoices-and-expenses-from-new-table-rows/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 5 to fill in
- connections/quickbooks.tsThe
quickbooksaccount it uses - connections/zapier-tables.tsThe
zapier-tablesaccount it uses - triggers/new-record.tsWhat starts it:
zapier-tablesnew_record - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: a new record is added to a Zapier Tables table (
zapier-tables,new_record). One row per invoice, bill or expense. - Filter: the row's Document Type must be
invoiceorexpense. Anything else, such as a credit, stops the run. - Wait: a short pause (2 minutes by default) so upstream systems finish writing the row.
- QuickBooks search: QuickBooks Online is searched for an existing invoice (by invoice number) or expense (by document number). If one exists, the run stops.
- QuickBooks create: a new invoice or expense is created from the row's number, date, amount, line details and tracking reference. Invoices are created unsent so finance can review them, and nothing is sent to a customer.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | What goes there |
|---|---|
TABLE_ID |
The Zapier Tables table that holds the rows. The trigger watches this same table |
DEFAULT_CUSTOMER_NAME |
The QuickBooks customer used when a row has no customer; look it up so the name matches |
DEFAULT_VENDOR_NAME |
The QuickBooks vendor used when a row has no vendor; look it up so the name matches |
BANK_ACCOUNT_ID |
The QuickBooks bank or credit account expenses are paid from |
EXPENSE_ACCOUNT_ID |
The QuickBooks expense account each expense is booked to |
Also review the defaults with them: SETTLE_SECONDS in workflow.ts (120; 0 skips the wait), INVOICE_DOCUMENT_TYPE and EXPENSE_DOCUMENT_TYPE (invoice and expense, compared lowercase), and EXPENSE_PAYMENT_TYPE (CreditCard, or Cash or Check).
Ask which columns of the table hold the document number, document type, total amount, transaction date, line details, tracking reference, and customer or vendor name. Map them, in that order, to f1 through f7 in the row data.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/create-invoices-and-expenses-from-new-table-rows, replace each REPLACE_… value as this file says, then run npx zap-pack deploy create-invoices-and-expenses-from-new-table-rows, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
quickbooks(the company file that should receive the records) to the user's QuickBooks Online connection. The trigger'szapier-tablesaccount (the one that owns the table) is set in step 2. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/new-record.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. Set the trigger's table toTABLE_ID. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect each action's fields with the user's connections and sample the trigger before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run this sample as a draft test, with a document number that does not exist in QuickBooks yet, against a QuickBooks test company:
{
"new": {
"data": {
"f1": "INV-1001",
"f2": "invoice",
"f3": 12.5,
"f4": "2026-10-29T13:00:00Z",
"f5": "Sample line item",
"f6": "REF-1001",
"f7": "Sample Customer",
"f8": "new"
}
},
"record_id": "sample-record-1"
}
Check that:
- A new invoice
INV-1001exists in QuickBooks for the sample customer, dated 2026-10-29, for 12.50, with the line details and reference filled in. - It is unsent.
- Running the same sample again does not create a second invoice.
- A row with Document Type
creditreturnsnot-billable-document-typeand creates nothing.
If run-status tools aren't available, check the result in QuickBooks directly. Then ask the user to delete the test invoice from QuickBooks; the agent does not delete test data. Publish only after the test passes, and confirm the trigger is active.
Notes
- QuickBooks invoices have no draft state. They are created unsent, which is how this Zap holds them for review.
- Each row becomes a single line item. Multi-line bills are not split.
- The customer or vendor is matched by exact display name. A row whose name does not match falls back to the default name; if that is also missing, the run stops and writes nothing.
- Expenses need a bank or credit account and an expense account. Set both before publishing.
- To extend it: create a credit memo for
creditrows instead of skipping them, or add a notification step to your team channel for records above a set amount.