Skip to content

feat(quickbooks): add core webhook triggers - #6245

Open
BillLeoutsakosvl346 wants to merge 5 commits into
feat/quickbooks-integrationfrom
feat/quickbooks-08-webhook-core
Open

feat(quickbooks): add core webhook triggers#6245
BillLeoutsakosvl346 wants to merge 5 commits into
feat/quickbooks-integrationfrom
feat/quickbooks-08-webhook-core

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • add authenticated app-level QuickBooks webhook ingress with durable bounded processing
  • route events to deployed workflows for the matching QuickBooks company
  • add seven representative QuickBooks trigger options to the existing block
  • document the fixed callback and verifier-token setup using the established app-level trigger pattern

Validation

  • QuickBooks webhook route/provider/worker/target/trigger tests (15 passing)
  • Sim type-check
  • API, icon, client-boundary, and tool-registry-boundary validation
  • format, lint, documentation generation, and git diff checks
  • independent max-reasoning trigger review: no actionable findings

Live Intuit delivery remains dependent on configuring the public callback and QUICKBOOKS_WEBHOOK_VERIFIER_TOKEN; signed raw-body fixtures cover ingress locally.

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 4, 2026 8:21am

Request Review

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches authenticated webhook ingress, async fan-out to workflows, and company-scoped target resolution; misconfiguration could drop or misroute events, but the pattern mirrors existing provider ingress (e.g. TikTok) with signature checks and bounded batch handling.

Overview
Adds QuickBooks Online webhook triggers so workflows can start on Intuit CloudEvents (customers, invoices, payments, vendors, bills, bill payments, purchase orders) with per-trigger event type selection and OAuth company binding.

Introduces a fixed POST /api/webhooks/quickbooks ingress that verifies intuit-signature (HMAC-SHA256 over the raw body via QUICKBOOKS_WEBHOOK_VERIFIER_TOKEN), accepts batches up to 1,000 events, and durably enqueues processing before responding. A quickbooks-webhook-ingress job fans out each event by realm/company ID, resolves active webhook targets in 100-row keyset pages, and dispatches matching workflows through the existing webhook processor.

The QuickBooks block is enabled for triggers; integration metadata and docs describe the seven triggers and setup (Intuit callback URL + verifier token).

Reviewed by Cursor Bugbot for commit 28c04b1. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds authenticated QuickBooks webhook ingestion and durable fanout to deployed workflows associated with the affected company.

  • Verifies signed, bounded webhook batches before durable enqueue.
  • Resolves matching QuickBooks webhook targets with bounded keyset pagination.
  • Adds seven QuickBooks trigger configurations, provider normalization, registry entries, tests, environment configuration, and documentation.

Confidence Score: 5/5

The PR appears safe to merge.

The previously reported batch-termination failure is fixed: target and page failures no longer prevent later events from being processed, while stable per-target event idempotency prevents successful workflow executions from repeating during retries. No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/background/quickbooks-webhook-ingress.ts Processes every target and event before surfacing aggregate failures; the prior batch-stranding issue is resolved and successful redispatches are deduplicated downstream.
apps/sim/background/quickbooks-webhook-targets.ts Resolves active QuickBooks targets by exact parsed company identity using bounded keyset pagination and workspace/deployment constraints.
apps/sim/app/api/webhooks/quickbooks/route.ts Adds bounded raw-body ingestion, signature verification, schema validation, admission control, and durable acceptance semantics.
apps/sim/lib/webhooks/providers/quickbooks.ts Adds QuickBooks authentication, event matching, normalized trigger input, and stable event-ID extraction for execution idempotency.
apps/sim/triggers/quickbooks/utils.ts Defines shared QuickBooks trigger configuration, event-type parsing, matching, and output schemas for the seven new triggers.
apps/sim/blocks/blocks/quickbooks.ts Enables trigger support on the existing QuickBooks block and exposes the seven registered trigger options.

Sequence Diagram

sequenceDiagram
  participant QB as QuickBooks
  participant API as Webhook Route
  participant Ingress as Ingress Job
  participant DB as Target Resolver
  participant Dispatch as Webhook Dispatcher
  participant Workflow as Workflow Execution

  QB->>API: Signed event batch
  API->>API: Verify HMAC and validate envelope
  API->>Ingress: Durably enqueue bounded batch
  API-->>QB: 200 OK
  loop Each event and target page
    Ingress->>DB: Resolve targets by realm ID
    DB-->>Ingress: Active deployed targets
    loop Each target
      Ingress->>Dispatch: Dispatch event
      Dispatch->>Workflow: Enqueue idempotent execution
    end
  end
Loading

Reviews (3): Last reviewed commit: "fix(quickbooks): bound webhook ingress j..." | Re-trigger Greptile

Comment thread apps/sim/background/quickbooks-webhook-ingress.ts Outdated
Comment thread apps/sim/background/quickbooks-webhook-ingress.ts
Comment thread apps/sim/app/api/webhooks/quickbooks/route.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 937ec78. Configure here.

Comment thread apps/sim/blocks/blocks/quickbooks.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant