Build an AI Finance Agent for QuickBooks
1) Run the first load
The first run needs --full-refresh and a window that covers every record edit in your company. The window filters on QuickBooks LastUpdatedTime, not on the transaction date, and the API does the filtering, so an early start date costs nothing:
bruin run --full-refresh --workers "$QB_WORKERS" \
--start-date 2000-01-01 \
--end-date "$(date -u +%Y-%m-%dT%H:%M:%S)" \
quickbooks
The end time is the current UTC time, so today's edits are included. A date-only --end-date stops at midnight at the start of that day. QB_WORKERS comes from Step 1: on DuckDB it is 1, because only one process can write to the database file at a time.
The run executes 27 assets in dependency order: seven ingestr assets, the account mapping seed, ten staging models, and nine reports. Each one runs its column checks and custom checks after it builds. A sandbox company loads in a minute or two. A company with several years of books takes longer, mostly in the invoice and purchase loads.
If the QuickBooks assets fail with invalid_grant, the refresh token has expired or rotated. Generate a new one in the OAuth 2.0 Playground and export QUICKBOOKS_REFRESH_TOKEN again.