Skip to content

Comments

feat(attio): add Attio CRM integration with 40 tools and 18 webhook triggers#3324

Merged
waleedlatif1 merged 3 commits intostagingfrom
feat/tools
Feb 24, 2026
Merged

feat(attio): add Attio CRM integration with 40 tools and 18 webhook triggers#3324
waleedlatif1 merged 3 commits intostagingfrom
feat/tools

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Add Attio CRM integration with 40 API tools (records, notes, tasks, objects, lists, list entries, comments, threads, webhooks, workspace members)
  • Add 18 webhook triggers with event filtering via isAttioPayloadMatch in webhook processor
  • Add OAuth configuration for Attio
  • Add block definition with operation dropdown, conditional fields, and advanced mode for rarely-used params
  • Add auto-generated docs

Type of Change

  • New feature

Testing

Tested manually

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
Copy link

vercel bot commented Feb 24, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 24, 2026 9:53pm

Request Review

Copy link

@cursor cursor bot left a comment

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 and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 24, 2026

Greptile Summary

Adds comprehensive Attio CRM integration with 40 API tools covering records, notes, tasks, objects, lists, list entries, comments, threads, webhooks, and workspace members. Includes 18 webhook triggers with intelligent event filtering via isAttioPayloadMatch in the webhook processor. The implementation follows established project patterns with proper OAuth 2.0 configuration, type safety, conditional UI fields, and wand AI assistance for complex JSON inputs.

Key additions:

  • Block configuration with operation dropdown and 900+ lines of conditional field logic
  • OAuth provider config in oauth.ts and user authentication flow in auth.ts
  • Event filtering in webhook processor to route specific Attio events to appropriate triggers
  • Comprehensive TypeScript types (1100+ lines) defining all API shapes
  • Auto-generated documentation

Architecture highlights:

  • All 40 tools follow consistent patterns with hidden OAuth tokens and proper error handling
  • Triggers use shared utility functions for outputs and event matching
  • Block uses tools.config.params for type coercion (avoiding premature coercion in tools.config.tool)
  • Proper use of mode: 'advanced' for rarely-used parameters

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation follows established patterns consistently across all 77 files. Code adheres to project conventions for integrations (tools → block → icon → triggers). OAuth uses proper scopes and refresh tokens. Webhook filtering prevents incorrect trigger execution. Type safety is comprehensive. No security vulnerabilities detected.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/attio.ts Comprehensive block config with 40 operations, proper conditional fields, and wand AI assistance for complex inputs
apps/sim/lib/oauth/oauth.ts Adds Attio OAuth provider with correct scopes and refresh token support
apps/sim/lib/auth/auth.ts Implements Attio OAuth 2.0 flow with proper user info fetching from workspace members endpoint
apps/sim/lib/webhooks/processor.ts Adds event filtering for Attio webhooks using isAttioPayloadMatch to route specific event types to correct triggers
apps/sim/tools/attio/types.ts Defines comprehensive TypeScript types and output schemas for all 40 Attio API operations
apps/sim/triggers/attio/utils.ts Implements event filtering logic mapping 17 trigger types to Attio event names with fallback to generic webhook

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User Initiates OAuth] --> B[auth.ts: Attio OAuth Flow]
    B --> C[Fetch User from Workspace Members API]
    C --> D[Create OAuth Credential]
    
    D --> E[User Configures Attio Block]
    E --> F[Block Registry: 40 Operations]
    
    F --> G{Operation Type}
    G -->|Record Ops| H[Tools: CRUD Records]
    G -->|Note/Task Ops| I[Tools: Notes & Tasks]
    G -->|List Ops| J[Tools: Lists & Entries]
    G -->|Webhook Ops| K[Tools: Webhook Management]
    
    H --> L[Execute via Tool Registry]
    I --> L
    J --> L
    K --> L
    
    L --> M[API Call to Attio]
    
    N[Attio Sends Webhook] --> O[Webhook Processor]
    O --> P{Check Provider}
    P -->|Attio| Q[isAttioPayloadMatch]
    Q --> R{Event Matches Trigger?}
    R -->|Yes| S[Execute Workflow]
    R -->|No| T[Skip Execution]
    
    S --> U[Trigger Outputs Available]
Loading

Last reviewed commit: edf3c0d

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

77 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 merged commit 60f9eb2 into staging Feb 24, 2026
3 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/tools branch February 24, 2026 21:56
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