Skip to content

Conversation

@Shubhamxshah
Copy link

@Shubhamxshah Shubhamxshah commented Dec 30, 2025

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

Screenshot from 2025-12-30 18-26-19 Screenshot from 2025-12-30 17-15-20 Screenshot from 2025-12-30 17-31-23

icecrasher321 and others added 18 commits December 18, 2025 16:23
…dioai#2481)

The realtime service network policy was missing the custom egress rules section
that allows configuration of additional egress rules via values.yaml. This caused
the realtime pods to be unable to connect to external databases (e.g., PostgreSQL
on port 5432) when using external database configurations.

The app network policy already had this section, but the realtime network policy
was missing it, creating an inconsistency and preventing the realtime service
from accessing external databases configured via networkPolicy.egress values.

This fix adds the same custom egress rules template section to the realtime
network policy, matching the app network policy behavior and allowing users to
configure database connectivity via values.yaml.
@vercel
Copy link

vercel bot commented Dec 30, 2025

@Shubhamxshah is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 30, 2025

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-only per 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 triggerUuid and fallback pattern
  • Implemented comprehensive block configuration with canonicalParamId for field reuse across operations
  • Added 6 API routes for fetching Monday.com resources with proper validation

Architecture:

  • Follows established patterns for selector dependencies (dependsOn arrays 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
Loading

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.

Additional Comments (28)

  1. apps/sim/app/api/tools/monday/columns/route.ts, line 39 (link)

    logic: parseInt can return NaN if boardId is invalid, which could cause GraphQL query issues. Should this validate the parsed integer or handle NaN cases?

  2. apps/sim/app/api/tools/monday/columns/route.ts, line 55 (link)

    logic: Exposing internal error messages to clients could leak sensitive information

  3. apps/sim/app/api/tools/monday/items/route.ts, line 71 (link)

    logic: Using any type violates project TypeScript rules. Define a proper type interface for Monday.com items or import from types file.

    Context Used: Context from dashboard - TypeScript conventions and type safety (source)

  4. apps/sim/lib/workflows/executor/execution-core.ts, line 158 (link)

    style: Using (sb as any).value bypasses TypeScript type safety. Consider defining proper types for subblock structure.

    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!

    Context Used: Context from dashboard - TypeScript conventions and type safety (source)

  5. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate.ts, line 148-157 (link)

    syntax: Debug logging should use logger instead of console.log

    Context Used: Context from dashboard - Global coding standards that apply to all files (source)

  6. apps/sim/triggers/monday/new_item.ts, line 5 (link)

    style: Logger created but never used in the file

    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!

  7. apps/sim/tools/monday/update_item.ts, line 18 (link)

    logic: API key should use 'user-only' visibility, not 'hidden'. User-provided credentials require 'user-only' per security guidelines.

    Context Used: Rule from dashboard - API keys and other user-provided credentials should use 'user-only' visibility, not 'hidden'. Only f... (source)

  8. apps/sim/tools/monday/types.ts, line 138-146 (link)

    style: MondayResponse duplicates ToolResponse pattern - consider using specific response interfaces instead. Is this generic type needed when you already have specific response interfaces for each operation?

    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!

  9. apps/sim/tools/monday/graphql.ts, line 175-196 (link)

    style: LIST_ITEMS_NO_FILTER appears identical to LIST_ITEMS. Consider removing duplicate or clarifying the difference. What's the intended difference between LIST_ITEMS and LIST_ITEMS_NO_FILTER?

    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!

  10. apps/sim/app/api/tools/monday/subitems/route.ts, line 70 (link)

    style: Using any type violates TypeScript rules. Should define proper interface for subitem structure

    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!

    Context Used: Context from dashboard - TypeScript conventions and type safety (source)

  11. apps/sim/tools/monday/list_items.ts, line 18 (link)

    logic: API key should use 'user-only' visibility, not 'hidden'. Monday.com API keys are user-provided credentials.

    Context Used: Rule from dashboard - API keys and other user-provided credentials should use 'user-only' visibility, not 'hidden'. Only f... (source)

  12. apps/sim/tools/monday/list_items.ts, line 89 (link)

    style: Type assertion any should be replaced with proper Monday.com item type

    Context Used: Context from dashboard - TypeScript conventions and type safety (source)

  13. apps/sim/app/api/tools/monday/status-options/route.ts, line 69 (link)

    style: The any type should be replaced with a proper interface for the label object

    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!

    Context Used: Context from dashboard - TypeScript conventions and type safety (source)

  14. apps/sim/hooks/selectors/resolution.ts, line 132-139 (link)

    style: Multiple board ID patterns suggest inconsistent naming conventions across the codebase. Are these different ID variants necessary for backward compatibility or could they be standardized?

    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!

  15. apps/sim/tools/monday/create_item.ts, line 18 (link)

    style: Consider using 'user-only' visibility instead of 'hidden' for API keys that users manually provide, per established guidelines

    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!

    Context Used: Rule from dashboard - API keys and other user-provided credentials should use 'user-only' visibility, not 'hidden'. Only f... (source). Is this API key provided manually by users or injected by the OAuth system?

  16. apps/sim/app/api/tools/monday/boards/route.ts, line 2 (link)

    style: Import should use the established pattern @/lib/logs/console/logger instead of @sim/logger to follow the repository's import conventions

    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!

    Context Used: Context from dashboard - Import patterns for the Sim application (source)

  17. apps/sim/app/api/tools/monday/boards/route.ts, line 18 (link)

    style: Missing TSDoc documentation for the POST function - should describe the endpoint's purpose, parameters, and return type

    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!

    Context Used: Context from dashboard - Global coding standards that apply to all files (source)

  18. apps/sim/tools/monday/get_item.ts, line 18 (link)

    style: API keys should use 'user-only' visibility, not 'hidden'. 'hidden' is reserved for framework-injected tokens like OAuth tokens.

    Context Used: Rule from dashboard - API keys and other user-provided credentials should use 'user-only' visibility, not 'hidden'. Only f... (source)

  19. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx, line 404-414 (link)

    syntax: Using console.log violates the global logging standard. Use logger.info/warn/error instead.

    Context Used: Context from dashboard - Global coding standards that apply to all files (source)

  20. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx, line 672-677 (link)

    syntax: Using console.log violates the global logging standard. Use logger.info/warn/error instead.

    Context Used: Context from dashboard - Global coding standards that apply to all files (source)

  21. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox.tsx, line 71-79 (link)

    syntax: Remove console.log statement - should use logger.info/warn/error instead

    Context Used: Context from dashboard - Global coding standards that apply to all files (source)

  22. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox.tsx, line 48-54 (link)

    style: Consider memoizing this object to prevent unnecessary re-renders

    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!

  23. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-selector/file-selector-input.tsx, line 52-65 (link)

    style: These Monday.com hooks introduce substantial duplication and inconsistent naming patterns. Multiple variants for the same values (snake_case vs camelCase, operation-specific suffixes) suggest the data structure could be normalized.

    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!

  24. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-selector/file-selector-input.tsx, line 75-99 (link)

    style: The cascading fallback logic for Monday.com values creates a complex precedence chain that could be error-prone. Consider standardizing on a single naming convention to avoid this complexity.

    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!

  25. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-selector/file-selector-input.tsx, line 164-177 (link)

    style: Monday.com dependency validation logic hardcodes specific selector keys, making it brittle to changes in the selector registry. Consider deriving these requirements from the selector configuration instead.

    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!

  26. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/sub-block/components/file-selector/file-selector-input.tsx, line 34 (link)

    syntax: Remove console.log statement - use logger instead per project standards

    Context Used: Context from dashboard - Global coding standards that apply to all files (source)

  27. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/sub-block/components/file-selector/file-selector-input.tsx, line 150-166 (link)

    syntax: Remove console.log statements and replace with logger.info for debugging

    Context Used: Context from dashboard - Global coding standards that apply to all files (source)

  28. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/sub-block/components/file-selector/file-selector-input.tsx, line 226-232 (link)

    syntax: Remove console.log statement - use logger instead

    Context Used: Context from dashboard - Global coding standards that apply to all files (source)

32 files reviewed, 28 comments

Edit Code Review Agent Settings | Greptile

@Shubhamxshah
Copy link
Author

@greptile

@Shubhamxshah
Copy link
Author

@waleedlatif1 @emir-karabeg please review this.

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.

4 participants