Feat/monday.com
Summary
This PR adds comprehensive Monday.com integration to the SIM platform, enabling users to create, update, retrieve, and list items on Monday.com boards directly through workflows.
Key Features:
- 4 core operations: Create Item, Update Item, Get Item, and List Items
- 2 triggers: New Item and Column Changed events
- Dynamic selectors for boards, groups, items, and sub-items with dependent field loading
- Full GraphQL API client for Monday.com with proper authentication
- Support for column values, sub-items, and status options
- API routes for fetching Monday.com resources (boards, columns, groups, items, status options, subitems)
Technical Implementation:
- Added Monday block configuration with conditional fields based on selected operation
- Implemented 4 tools with full type safety and error handling
- Added file-selector enhancements to support dependent field resolution
- Created comprehensive type definitions for Monday.com API responses
- Integrated selector registry for dynamic board/item/group selection
Type of Change
- Bug fix
- New feature
- Breaking change
- Documentation
- Other: ___________
Testing
All Monday.com API endpoints have been tested including:
- Creating items with and without group assignment
- Updating items and sub-items with column values
- Retrieving individual items with all fields
- Listing items with optional group filtering and limits
- Board, column, group, and item selection workflows
- API key authentication and error handling
- Dependent field resolution (board → group → item hierarchy)
Focus areas for reviewers:
- Monday.com GraphQL query construction and error handling (apps/sim/tools/monday/graphql.ts)
- Selector resolution logic for dependent fields (apps/sim/hooks/selectors/)
- API route implementations for fetching Monday.com resources (apps/sim/app/api/tools/monday/*)
- Block configuration and conditional field rendering (apps/sim/blocks/blocks/monday.ts)
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) for monday.com
Screenshots/Videos
@Shubhamxshah is attempting to deploy a commit to the Sim Team on Vercel.
A member of the Team first needs to authorize it.
Greptile Summary
Added comprehensive Monday.com integration with 4 tools (create, update, get, list items), 2 triggers (new item, column changed), and complete selector infrastructure for dynamic field loading.
Key Changes:
- Implemented GraphQL client with proper error handling and API versioning (
apps/sim/tools/monday/graphql.ts:20-47) - Added 4 tools with correct API key visibility (
user-onlyper custom rule 2851870a) - Created 6 selector definitions for dependent field resolution (boards → groups/columns → items → subitems)
- Integrated webhook challenge handling for Monday.com verification (
apps/sim/lib/webhooks/processor.ts:112-115) - Added provider identifier extraction for webhook idempotency using
triggerUuidand fallback pattern - Implemented comprehensive block configuration with
canonicalParamIdfor field reuse across operations - Added 6 API routes for fetching Monday.com resources with proper validation
Architecture:
- Follows established patterns for selector dependencies (
dependsOnarrays in block config) - Uses
serviceId: 'monday'with field ID-based routing in selector resolution - Client-side group filtering in list_items tool (
apps/sim/tools/monday/list_items.ts:88-90) - Proper separation: tools for operations, triggers for webhooks, API routes for selectors
Confidence Score: 5/5
- Safe to merge - well-structured integration following established patterns with proper error handling
- Code follows all architectural patterns from existing integrations (Slack, Jira, Linear), uses correct visibility settings per custom rules, implements proper error handling throughout, and includes comprehensive type safety. No logical errors, security issues, or breaking changes detected.
- No files require special attention
Important Files Changed
| Filename | Overview |
|---|---|
| apps/sim/tools/monday/graphql.ts | Added GraphQL client and query definitions for Monday.com API with proper error handling |
| apps/sim/tools/monday/create_item.ts | Implemented create item tool with correct API key visibility (user-only) and proper error handling |
| apps/sim/tools/monday/update_item.ts | Implemented update item tool with subitem support, using correct visibility settings |
| apps/sim/blocks/blocks/monday.ts | Comprehensive block configuration with conditional fields, canonicalParamId mappings, and trigger integration |
| apps/sim/triggers/monday/new_item.ts | Implemented new item trigger with webhook configuration and setup instructions |
| apps/sim/triggers/monday/column_changed.ts | Implemented column changed trigger with optional specific value filtering and webhook support |
| apps/sim/hooks/selectors/registry.ts | Added 6 Monday.com selector definitions (boards, columns, groups, items, subitems, status-options) with proper dependencies |
| apps/sim/hooks/selectors/resolution.ts | Added Monday.com selector resolution logic with proper field ID mappings for all operations |
Sequence Diagram
sequenceDiagram
participant User
participant UI as Block UI
participant API as API Routes
participant MondayAPI as Monday.com API
participant Selector as Selector Registry
participant Tool as Tool Executor
participant Webhook as Webhook Processor
Note over User,Webhook: Tool Operation Flow
User->>UI: Configure Monday block
UI->>API: POST /api/tools/monday/boards
API->>MondayAPI: GraphQL: GET_BOARDS
MondayAPI-->>API: Return boards list
API-->>UI: Return formatted boards
UI->>User: Display board selector
User->>UI: Select board
UI->>Selector: Resolve dependent selectors
Selector->>API: POST /api/tools/monday/groups
API->>MondayAPI: GraphQL: GET_BOARD_GROUPS
MondayAPI-->>API: Return groups
API-->>Selector: Return formatted groups
Selector-->>UI: Update dependent fields
User->>UI: Configure item details
UI->>Tool: Execute operation
Tool->>MondayAPI: GraphQL mutation/query
MondayAPI-->>Tool: Return item data
Tool-->>UI: Return success/error
UI-->>User: Display result
Note over User,Webhook: Trigger Flow
User->>UI: Configure Monday trigger
UI->>User: Display webhook URL
User->>MondayAPI: Configure webhook in Monday
MondayAPI->>Webhook: POST challenge verification
Webhook-->>MondayAPI: Return challenge response
MondayAPI->>Webhook: POST new item event
Webhook->>Webhook: Extract provider identifier
Webhook->>Webhook: Check idempotency
Webhook->>Tool: Execute workflow
Tool-->>Webhook: Workflow completed
Webhook-->>MondayAPI: Return 200 OK
@greptile
@waleedlatif1 @emir-karabeg please review this.