feat(monday): add full Monday.com integration#4210
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview Introduces a new OAuth provider ( Adds Monday webhook trigger support (9 trigger types) with a provider handler that supports challenge verification, automatic subscription create/delete via GraphQL, idempotency via Reviewed by Cursor Bugbot for commit 0bf1850. Configure here. |
Greptile SummaryThis PR adds a full Monday.com integration: 13 tools (CRUD on boards/items/groups/subitems/updates), a 13-operation block with OAuth credential and board/group selectors, 9 webhook triggers with auto-subscription lifecycle, and supporting OAuth/auth/security infrastructure. Previously flagged issues (groups-route GraphQL injection, Confidence Score: 5/5Safe to merge — all previously flagged P1 security issues are resolved; only two P2 findings remain. All three previously flagged issues (groups-route GraphQL injection, get_items unescaped groupId, search_items unguarded JSON.parse) are confirmed fixed. The remaining findings are P2: a scope-description display regression for Pipedrive (cosmetic, no functional impact) and an orphaned TSDoc comment. Neither blocks correctness or security. apps/sim/lib/oauth/utils.ts (scope key collision) and apps/sim/lib/core/security/input-validation.ts (orphaned JSDoc) Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant SimUI
participant SimAPI as Sim API
participant MondayAPI as Monday.com API
Note over User,MondayAPI: Workflow Deployment (Trigger Subscription)
User->>SimUI: Deploy workflow with Monday trigger
SimUI->>SimAPI: createSubscription(boardId, triggerId, credentialId)
SimAPI->>SimAPI: validateMondayNumericId(boardId)
SimAPI->>SimAPI: resolveAccessToken(credentialId)
SimAPI->>MondayAPI: create_webhook(board_id, url, event)
MondayAPI-->>SimAPI: POST challenge {challenge: abc}
SimAPI->>SimAPI: handleChallenge echo back
SimAPI-->>MondayAPI: {challenge: abc} 200 OK
MondayAPI-->>SimAPI: {id: ext-webhook-id}
SimAPI-->>SimUI: externalId stored in providerConfig
Note over User,MondayAPI: Webhook Event
MondayAPI->>SimAPI: POST event {event: {..., triggerUuid}}
SimAPI->>SimAPI: extractIdempotencyId(triggerUuid)
SimAPI->>SimAPI: formatInput flatten event fields
SimAPI->>SimUI: trigger workflow execution
Note over User,MondayAPI: Workflow Undeployment
User->>SimUI: Undeploy workflow
SimUI->>SimAPI: deleteSubscription(externalId, credentialId)
SimAPI->>SimAPI: validateMondayNumericId(externalId)
SimAPI->>MondayAPI: delete_webhook(id: externalId)
MondayAPI-->>SimAPI: deleted confirmation
Reviews (7): Last reviewed commit: "fix(monday): align list_boards limit des..." | Re-trigger Greptile |
608c00b to
ccf86a6
Compare
ccf86a6 to
cf2e03e
Compare
…gers, and OAuth Adds a comprehensive Monday.com integration: - 13 tools: list/get boards, CRUD items, search, subitems, updates, groups, move, archive - Block with operation dropdown, board/group selectors, OAuth credential, advanced mode - 9 webhook triggers with auto-subscription lifecycle (create/delete via GraphQL API) - OAuth config with 7 scopes (boards, updates, webhooks, me:read) - Provider handler with challenge verification, formatInput, idempotency - Docs, icon, selectors, and all registry wiring Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cf2e03e to
1723d73
Compare
|
@greptile |
|
@cursor review |
The DeleteSubscriptionContext type has userId as unknown, causing a TypeScript error when passing it to getOAuthToken which expects string. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…n with established patterns - Use JSON.stringify() for groupId in get_items.ts (matches create_item.ts and move_item_to_group.ts) - Use JSON.stringify() for notificationUrl in webhook provider - Remove non-standard getOAuthToken fallback in deleteSubscription to match Airtable/Webflow pattern (credential resolution only, warn and return on failure) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
Parse and re-stringify the columns param to ensure well-formed JSON before interpolating into the GraphQL query, preventing injection via malformed input. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
… queries - Add sanitizeNumericId() helper to tools/monday/utils.ts for consistent validation across all tool body builders - Apply to all 13 instances of boardId, itemId, parentItemId interpolation across 11 tool files, preventing GraphQL injection via crafted IDs - Wrap JSON.parse in search_items.ts with try-catch for user-friendly error on malformed column filter JSON Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
…arams - Refactor sanitizeNumericId to delegate to validateMondayNumericId from input-validation.ts, eliminating duplicated regex logic - Add sanitizeLimit helper for safe integer coercion with bounds - Apply sanitizeLimit to limit/page params in list_boards, get_items, and search_items for consistent validation across all GraphQL params Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
The param description said "max 100" but sanitizeLimit caps at 500, which is what Monday.com's API supports for boards. Updated both the tool description and docs to say "max 500". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0bf1850. Configure here.
Summary
Test plan