Skip to content

feat(plaid): add the Plaid bank-data integration - #6749

Open
j15z wants to merge 13 commits into
stagingfrom
feat/plaid-integration
Open

feat(plaid): add the Plaid bank-data integration#6749
j15z wants to merge 13 commits into
stagingfrom
feat/plaid-integration

Conversation

@j15z

@j15z j15z commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add an eight-action Plaid integration for pre-linked Plaid Items: Transaction Sync, Accounts, Balances, Identity, Auth, Item, Institution Search, and Institution Details.
  • Keep credential setup block-only: users create or select one reusable, encrypted Plaid Item credential from the block's Plaid Item field. Plaid Link, public-token exchange, triggers, and webhooks are intentionally out of scope.
  • Add operation-aware account selectors, country-aware institution selectors, strict provider response normalization, executor-delegated secret custody, seven workflow templates, and no agent skills.
  • Preserve the one-credential-per-Item architecture. Reconnect may rotate app credentials or the Item token only when the verified Item ID and environment remain unchanged.

Sensitive output semantics

  • Get Auth account/routing numbers and Get Identity PII are standard workflow outputs. They can enter workflow/execution state, downstream blocks, Agent/model context, and configured model-provider requests.
  • hiddenFromDisplay suppresses Get Auth's numbers field only from source-block log display; it is not a non-persistence or downstream-access guarantee.
  • The docs recommend dedicated, access-controlled workflows and approved handling for Auth and Identity data.

Scope

  • 8 tools
  • 7 templates
  • 0 skills
  • 0 triggers/webhooks
  • Pre-linked Plaid Item credentials; no Plaid Link or standalone Integrations-page connection flow

Validation

  • 17 focused Plaid, credential, selector, route, catalog, and display suites: 268 tests passed.
  • Sim TypeScript check passed.
  • Biome passed on changed files.
  • All 32 repository audits passed, including tool metadata, docs, deployment config, registry boundaries, canvas sentences, icon checks, integration catalog, and API validation.
  • Generated Plaid documentation contains the complete nested output schemas and no credential values.

Live Plaid Sandbox and Production behavior for this current implementation remains unverified pending suitable credentials.

Type of Change

  • New feature

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 15, 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 21, 2026 2:44am

Request Review

@cursor

cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Handles long-lived Plaid Item tokens, ACH/account numbers, and identity PII with new credential encryption, decryption, and executor-delegated proxy paths. Mis-handling could leak financial secrets or persist sensitive Auth/Identity outputs in workflow state.

Overview
Adds a Plaid block that reads a pre-linked Item (no Plaid Link, public-token exchange, triggers, or webhooks). Users store one workspace Item credential (environment, client ID, secret, Item access token), verified with /item/get and encrypted; reconnect may rotate secrets only if the verified Item ID and environment stay the same.

Workflows can sync transactions, list accounts, fetch balances, identity, Auth numbers, Item health, and search/get institutions. Editor selectors load accounts/institutions via a session-only options route; tool execution is executor-delegated so secrets never leave the credential boundary. Auth numbers are hiddenFromDisplay in logs only—they remain normal workflow outputs.

Plaid is not available on the public v2 credential create API. Docs warn that Auth/Identity data can flow into downstream blocks and models unless workflows are access-controlled.

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

@greptile-apps

greptile-apps Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a complete Plaid bank-data integration with ten tools, block and catalog registration, response normalization, error extraction, documentation, and tests. It also centralizes optional numeric and boolean block coercion shared with Brex.

  • Supports transaction synchronization, account and balance retrieval, identity and authorization data, Item health, institution discovery, token exchange, and sandbox token creation.
  • Adds environment-aware request construction, credential-safe tool parameter visibility, and Plaid-specific error messages.
  • Registers the integration across block, tool, icon, generated metadata, documentation, templates, and skills catalogs.

Confidence Score: 4/5

The PR appears safe to merge, with only a non-blocking TypeScript const-assertion issue in the Plaid block configuration.

The Plaid operation IDs, registry entries, credential visibility, request mappings, and response transforms are consistently wired; the accepted concern only weakens compile-time typing for two operation lists.

Files Needing Attention: apps/sim/blocks/blocks/plaid.ts

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/plaid.ts Defines the Plaid block, conditional fields, operation dispatch, templates, and skills; the two operation constants omit required const assertions.
apps/sim/tools/plaid/utils.ts Provides environment selection, credential headers, wire-value normalization, and response mappers for shared Plaid behavior.
apps/sim/tools/plaid/sync_transactions.ts Implements cursor-based transaction synchronization with optional request controls and normalized pagination output.
apps/sim/tools/plaid/get_auth.ts Implements retrieval and normalization of ACH, EFT, BACS, and international account identifiers.
apps/sim/tools/error-extractors.ts Adds extraction of Plaid developer messages and error codes from Plaid error envelopes.
apps/sim/tools/registry.ts Registers all ten Plaid tools consistently with their block operation identifiers.
apps/sim/blocks/utils.ts Centralizes optional finite-number and boolean coercion for Plaid and Brex block execution.

Sequence Diagram

sequenceDiagram
  participant User as Workflow or Agent
  participant Block as Plaid Block
  participant Tool as Selected Plaid Tool
  participant API as Plaid API
  User->>Block: Operation and inputs
  Block->>Block: Select tool and coerce optionals
  Block->>Tool: Credentials and operation parameters
  Tool->>API: Environment-specific HTTPS request
  API-->>Tool: Plaid response or error envelope
  Tool->>Tool: Normalize response or extract error
  Tool-->>User: Typed workflow output
Loading

Reviews (1): Last reviewed commit: "feat(plaid): add the Plaid bank-data int..." | Re-trigger Greptile

Comment thread apps/sim/blocks/blocks/plaid.ts Outdated
Comment on lines +7 to +16
const ACCESS_TOKEN_OPERATIONS = [
'sync_transactions',
'get_accounts',
'get_balances',
'get_identity',
'get_auth',
'get_item',
]

const ACCOUNT_FILTER_OPERATIONS = ['get_accounts', 'get_balances', 'get_identity', 'get_auth']

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Const operation arrays are widened

These operation groups directly control conditional visibility and required fields, but without const assertions their identifiers widen to string[], weakening compile-time protection against invalid operation values.

Suggested change
const ACCESS_TOKEN_OPERATIONS = [
'sync_transactions',
'get_accounts',
'get_balances',
'get_identity',
'get_auth',
'get_item',
]
const ACCOUNT_FILTER_OPERATIONS = ['get_accounts', 'get_balances', 'get_identity', 'get_auth']
const ACCESS_TOKEN_OPERATIONS = [
'sync_transactions',
'get_accounts',
'get_balances',
'get_identity',
'get_auth',
'get_item',
] as const
const ACCOUNT_FILTER_OPERATIONS = [
'get_accounts',
'get_balances',
'get_identity',
'get_auth',
] as const

Context Used: TypeScript conventions and type safety (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment thread apps/sim/blocks/blocks/plaid.ts Outdated
Comment thread apps/sim/blocks/blocks/plaid.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 71700f3. Configure here.

Comment thread apps/sim/blocks/blocks/plaid.ts Outdated
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