ml-connector
QuickBooks OnlineGoogle Sheets

QuickBooks Online and Google Sheets integration

QuickBooks Online tracks your company's invoices, bills, expenses, and journal entries. Google Sheets is where you organize and analyze financial data. Connecting the two keeps your spreadsheet in sync with your books without manual export and re-keying. New invoices and bills from QuickBooks Online flow into your sheet on the cadence you choose, mapped to the columns you define, and every sync is logged for audit and replay.

How QuickBooks Online works

QuickBooks Online (QBO) exposes vendors, customers, invoices, bills, payments, journal entries, accounts, departments, items, and classes through its REST Accounting API v3, with endpoints scoped by realm ID (company identifier). Authentication uses OAuth 2.0 with 1-hour access tokens and refresh tokens that rotate every 24-26 hours. QBO supports both webhooks that push entity change events in real time and a CDC (Change Data Capture) endpoint that polls 30 days of history. Webhook payloads contain only the entity ID and operation type, so the full record must be fetched with a separate call. Writes require the exact object representation including the SyncToken field for concurrency control.

How Google Sheets works

Google Sheets is a general-purpose cloud spreadsheet with a REST API that reads and writes cells using A1 notation ranges or named ranges. Authentication uses OAuth 2.0 with user delegation or Service Account credentials for server-to-server access. Sheets does not define financial entities natively - customers design their own schema by creating sheet tabs and column headers. Optional push notifications are available via Google Drive watch channels, but channels expire hourly and do not auto-renew, making polling every 5-15 minutes more reliable. Sheets operations are RESTful with no signature verification required.

What moves between them

Invoice and bill records flow from QuickBooks Online into Google Sheets on a polling schedule or in response to QBO webhooks. Each row in your sheet represents one QBO invoice or bill, with columns mapped to QBO line items, amounts, dates, vendors, or customers. Journal entry records can also be synced, with each row showing the GL account, amount, and debit-credit designation. The flow is one-way: data enters Sheets from QBO but updates in Sheets do not write back to QuickBooks Online.

How ml-connector handles it

ml-connector stores your QBO realm ID and your Google Sheets spreadsheet ID and named ranges. It listens for QBO webhook events that signal a new invoice, bill, or journal entry, then fetches the full record from QBO's API. Before writing to Sheets, it refreshes your OAuth access tokens (QBO tokens expire in 1 hour and Google tokens in 1 hour as well) and applies any concurrency control required by QBO's SyncToken field. Each row is mapped to your defined Sheets columns using the schema you specify. If a write to Sheets fails due to rate limits or network error, ml-connector retries with exponential backoff. If a QBO fetch fails with a 401 Unauthorized error, the refresh token is rotated and the request is retried. Every sync operation is recorded with a timestamp, the records processed, and any errors, so you can replay failed syncs if needed. QBO's webhook payloads may arrive out of order or duplicated, so ml-connector deduplicates by entity ID and sequence.

A real-world example

A small accounting firm manages client bookkeeping in QuickBooks Online and tracks billable hours and project revenue in Google Sheets. Each month, the partners export invoice reports from QBO and manually paste the totals into a Sheets workbook to reconcile against project budgets and billable hours. With QuickBooks Online and Google Sheets connected, each new invoice posted in QBO flows directly into the firm's analysis sheet with the client name, amount, project code, and date already in the correct columns. The partners can spot overbilled clients and under-billed projects in near real time, and the reconciliation step is eliminated.

What you can do

  • Sync invoices and bills from QuickBooks Online to Google Sheets with customer, vendor, amount, and date fields mapped to your columns.
  • Poll QBO webhooks or use the CDC endpoint to detect new and updated financial records on a schedule you control.
  • Refresh OAuth access tokens for both QBO (1 hour expiry) and Google Sheets automatically on every sync.
  • Handle QBO concurrency control by fetching and preserving the SyncToken field on all writes.
  • Record every sync operation with full audit trail, timestamps, record counts, and error details for replay on failure.

Questions

Can data flow from Google Sheets back into QuickBooks Online?
No. The flow is one-way only: from QuickBooks Online into Google Sheets. This protects your QBO books from accidental overwrites. If you need to update invoices or bills in QBO, you do so directly in QuickBooks Online, and ml-connector will pull the updated records into Sheets on the next sync.
How does the integration handle QBO's webhook payloads that contain only the entity ID?
QBO webhook payloads carry the entity ID and operation (Create, Update, Delete) but not the full record. ml-connector fetches the complete record by calling QBO's GET endpoint with that entity ID, then maps the fields to your Sheets columns.
What happens if my Google or QBO OAuth token expires during a sync?
ml-connector detects a 401 Unauthorized response and automatically refreshes your OAuth token using the refresh token stored in the connection. If the refresh token itself has expired or been revoked, the sync pauses and you are alerted to re-authorize the connection.

Related integrations

Connect QuickBooks Online and Google Sheets

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started