Nightly QuickBooks invoices for unpaid Acuity appointments

Every night at 8pm, sweep yesterday's completed Acuity appointments that are still unpaid and open matching QuickBooks invoices with a Sheets audit log.

Deterministic Code
Acuity SchedulingQuickBooks OnlineGoogle SheetsFinanceOperationsData Sync
PromptCreate

Every night at 8pm my practice's local time, run a deterministic code workflow that reconciles yesterday's Acuity Scheduling appointments against QuickBooks Online and logs every invoice created to a Google Sheets audit tab. This is a node-based flow, not an agent.

Step 1. Pull yesterday's appointments. Use Acuity Scheduling List Appointments with minDate set to yesterday at 00:00:00 and maxDate set to yesterday at 23:59:59 in the practice's local timezone (Acuity accepts any strtotime-parseable value, e.g. "2026-07-16T00:00:00-0500"). Paginate by advancing minDate to the last returned appointment's datetime with direction=ASC until the page is short. Keep only appointments whose paid field equals the string "no" (Acuity returns paid as a string, not a boolean) and whose email field is a non-empty string. Skip anything already flagged paid or missing an email.

Step 2. For each remaining appointment, find or create the QuickBooks customer. Call QuickBooks Query Entities with a SQL-like query: SELECT * FROM Customer WHERE PrimaryEmailAddr = '<client email>'. If exactly one match comes back, reuse that customer's Id. If no match, call QuickBooks Create Customer with the client's first name, last name, email, and phone from the Acuity appointment payload, and use the new Id.

Step 3. Create the invoice. Call QuickBooks Create Invoice with the customer Id from step 2 and a single line item whose description is the Acuity appointment type name and whose amount is the appointment's price. Acuity returns price as a decimal string like "150.00", so parse it to a number before sending. Set the invoice due date to the run date plus 14 days (net-14). Include the client's email on the invoice's billing address so QuickBooks can send it.

Step 4. Log the run. Call Google Sheets Append Values to add one row to the practitioner's "Acuity Invoices" audit tab with these columns in order: Appointment ID (Acuity's id), Client Name (firstName plus lastName), Session Type (Acuity's appointmentType or type), Amount (the parsed decimal), Invoice Number (DocNumber from the QuickBooks Create Invoice response), and Timestamp (ISO 8601 timestamp of the moment the invoice was created).

Guardrails. Never invoice an appointment that is already marked paid in Acuity, and never invoice an appointment missing a client email. On any per-appointment error (QuickBooks validation failure, missing customer data, network blip), log the failure with the appointment ID and continue to the next appointment so one bad row does not block the rest of the batch. Do not send Slack or email notifications. The Google Sheets tab is the entire audit trail.

What does this prompt do?

  • Every night at 8pm, we pull yesterday's finished Acuity appointments and pick out the ones that are still unpaid.
  • For each unpaid appointment with a client email, we open a matching invoice in QuickBooks Online with the session type, the price, the client's contact info, and a net-14 due date.
  • Anything already marked paid in Acuity or missing an email is left alone so you can handle it manually.
  • Every invoice we create lands as a new row in a Google Sheets audit tab with the appointment ID, client name, session type, amount, invoice number, and timestamp.

What do I need to use this?

  • An Acuity Scheduling account with your appointments and client details.
  • A QuickBooks Online account you invoice from, connected to the same practice.
  • A Google Sheets file with a tab reserved for the invoice audit log.

How can I customize it?

  • Change the 8pm run time or shift it to a weekly cadence for lower-volume practices.
  • Adjust the due date from net-14 to net-7, net-30, or any other terms your practice uses.
  • Choose which columns show up in the audit tab, or point the log at a different Google Sheet.

FAQs

What happens if a client already paid at the appointment?
We skip anyone Acuity has flagged as paid, so they never get an invoice. The workflow only touches appointments still marked unpaid in Acuity.
What if an appointment does not have a client email on file?
We skip it. QuickBooks needs an email to attach an invoice to a customer, so anything missing one is left for you to handle by hand.
Will this create duplicate customers in QuickBooks?
No. Before creating an invoice we look up the customer in QuickBooks by email. If they already exist we reuse the record; if not, we open a new one with the client's name, email, and phone from Acuity.
Can I change the due date from net-14?
Yes. Net-14 is the default, but you can switch to net-7, net-30, or any other terms your practice uses by adjusting the due date offset.
How do I know the invoice actually went out?
Every invoice we create is logged as a row in your Google Sheets audit tab with the appointment ID, client name, session type, amount, invoice number, and the exact time we created it.

Related templates

Call overdue Xero customers with an AI collections agent

Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.

LiveKit
Xero
Deepgram
+2
Agentic Task
Local listing health board for every location you manage

See every Google Maps listing you manage on one screen, ranked worst first, with an audit button that writes the fix list for you.

Local Business Data
Google Sheets
App
Let support send one-off Loops emails without an engineer

Your team picks a template, finds the customer, checks they are safe to email, then sends it, with every send logged where the whole team can see it.

Loops.so
Stripe
Google Sheets
App
Stop cold emails to anyone with a live deal in Pipedrive

Every night at 2am, pull the contacts on your open and won deals and block them from your cold outreach before the next send goes out.

Mailshake
Pipedrive
Google Sheets
Deterministic Code
iMessage campaign console with pre-flight checks and delivery board

Build every text campaign in one screen: check who is actually reachable, see a realistic send plan, then watch delivery land row by row.

LoopMessage
Google Sheets
HubSpot
App
LinkedIn Ads budget pacing dashboard for every client account

See every LinkedIn ad account's spend against the budget you committed to, catch overspend early, and rebalance without rebuilding a spreadsheet.

LinkedIn Ads
Google Sheets
Slack Bot
App

Stop chasing unpaid Acuity appointments by hand.

Turn every night's finished sessions into clean QuickBooks invoices with a Sheets audit trail, all without manual data entry.