Free n8n template

QuickBooks data entry n8n template (Stripe payouts to journal entries)

What it does

This n8n template lists paid Stripe payouts every morning, skips any already in your post ledger, summarizes each payout's charges, refunds and fees, and has Claude assign charge groups to income accounts from your own mapping table. Code builds a balanced QuickBooks Online journal entry and blocks anything unbalanced, unmapped, low confidence or in a closed period. You need Stripe, QuickBooks Online, Google Sheets and an Anthropic API key.

What this workflow does

  1. Daily 6am starts the run, and Config holds your QuickBooks company ID, home currency, closing date and how many days of payouts to look back.
  2. Read mapping loads the table that maps Stripe transaction types (bank, stripe_fee, refund, adjustment and so on) and your income accounts to QuickBooks account IDs.
  3. Read post ledger loads every payout already posted.
  4. Stripe: recent payouts lists paid payouts in the lookback window, and Split new payouts drops any payout ID already in the ledger. The duplicate guard runs before any other step.
  5. Stripe: payout transactions pulls up to 100 balance transactions per payout.
  6. Summarize payout groups charges by description and builds a Claude request whose output can only name group IDs and income account IDs from your table.
  7. Claude: map income accounts assigns each charge group to an income account with high, medium or low confidence.
  8. Build journal entry debits the bank for the payout, debits fees and refunds, credits income per Claude’s mapping, and checks that transactions net to the payout, debits equal credits, every type is mapped, no mapping is low confidence, the currency matches and the date is after your closing date.
  9. Post or review sends clean entries to QBO: create journal entry, then records the QuickBooks ID in Append to post ledger. Anything else, including QuickBooks errors, becomes a row in Append to review tab with the reason and the draft entry.

Before you import

  • A current n8n version.
  • A Stripe restricted key with read access to payouts and balance transactions, added as n8n’s Stripe credential.
  • Automatic Stripe payouts. Stripe only filters balance transactions by payout ID for automatic payouts, so manual payouts need separate handling.
  • A QuickBooks Online company with a Stripe clearing or bank account, a fees expense account and your income accounts. Use an Intuit sandbox company first.
  • A Google Sheet with “Mapping”, “Post ledger” and “Review” tabs.
  • An Anthropic API key.

Setup

  1. Import the JSON file and connect the Stripe, QuickBooks Online, Google Sheets and Anthropic credentials.
  2. In Config, replace REPLACE_WITH_QBO_COMPANY_ID and set closingDate to the last day of your most recent closed period.
  3. Replace REPLACE_WITH_SHEET_ID in the four Google Sheets nodes.
  4. Fill the Mapping tab with one row each for bank, stripe_fee, refund, payment_refund and adjustment, plus one income row per income account. Use the notes column to describe what belongs in each income account, because Claude reads it.
  5. Add the headers shown in Append to post ledger and Append to review tab to row 1 of those tabs.

Test it

Point the QuickBooks credential at a sandbox company and set lookbackDays to cover two or three real payouts. Run the workflow. Each payout should either create a journal entry, with its ID in the ledger, or a review row with a specific reason such as unmapped_type_adjustment. Run it again and confirm nothing new is posted, which proves the duplicate guard. Then add a low-confidence charge description and check it lands in review.

Make it production-ready

  • Pagination. Payouts with more than 100 transactions are sent to review. Add Stripe pagination with starting_after before you go live on high volume.
  • Error workflow. Set one so a Stripe or Sheets failure alerts your bookkeeper.
  • Ledger table. Move the post ledger to Postgres once it grows past a few thousand rows, and add a unique constraint on the source ID.
  • More sources. Add Shopify orders, HubSpot closed deals or emailed orders as separate flows that write to the same ledger.
  • Review loop. Have the bookkeeper fix the mapping table, not the workflow, when review rows repeat.
  • Model choice. claude-haiku-5-5 is a cheaper option for this classification. Keep the enum and the confidence check whichever model you use.

Read the full guide, how to automate QuickBooks data entry, or talk to Lumeor about mapping your other sources.

Next steps