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
| Argument | Description | Default |
|---|---|---|
startDate | Start date (YYYY-MM-DD) | 7 days ago |
endDate | End date (YYYY-MM-DD) | Today |
accountId | Filter to specific QBO account | All accounts |
Prerequisites
- Repo: symphonycore-org/sc-finance-sync
- Install:
npm installfrom 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.