Skip to main content

sync:qbo

Overview

Syncs bank transactions from QuickBooks Online to the local PostgreSQL database. Supports filtering by date range and specific QBO account. Defaults to a 7-day lookback window.

Usage

npm run sync:qbo [startDate] [endDate] [accountId]

Arguments

ArgumentDescriptionDefault
startDateStart date (YYYY-MM-DD)7 days ago
endDateEnd date (YYYY-MM-DD)Today
accountIdFilter to specific QBO accountAll accounts

Prerequisites

  • Repo: symphonycore-org/sc-finance-sync
  • Install: npm install from repo root
  • Environment: QBO_CLIENT_ID, QBO_CLIENT_SECRET, QBO_REALM_ID, DATABASE_URL

Examples

Default 7-day sync

npm run sync:qbo

Sync a specific date range

npm run sync:qbo 2026-01-01 2026-01-31

Sync a specific account

npm run sync:qbo 2026-02-01 2026-02-28 12345

Production (via Docker)

docker exec sc-finance-sync npm run sync:qbo

Output

Prints transaction count (processed, created, updated) and any errors. Exit code 0 on success, 1 on failure.