Skip to content

feat(triggers): add Atlassian triggers for Jira, JSM, and Confluence#4211

Merged
waleedlatif1 merged 5 commits intostagingfrom
waleedlatif1/atlassian-triggers
Apr 17, 2026
Merged

feat(triggers): add Atlassian triggers for Jira, JSM, and Confluence#4211
waleedlatif1 merged 5 commits intostagingfrom
waleedlatif1/atlassian-triggers

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Add 9 new Jira triggers: sprint created/started/closed, project created, version released, comment updated/deleted, worklog updated/deleted
  • Add 5 new JSM triggers from scratch: request created/updated/commented/resolved, generic webhook with dedicated provider handler
  • Add 7 new Confluence triggers: comment updated, attachment updated, page/blog restored, space removed, page permissions updated, user created
  • Add JSM webhook provider handler with HMAC validation reusing Jira's signature verification
  • Add x-atlassian-webhook-identifier to idempotency service for native Atlassian dedup
  • Add extractIdempotencyId to Confluence handler
  • Fix Jira generic webhook to pass through full payload for non-issue events (sprint, project, version)
  • Fix output schemas across all services: add description field (ADF format), updateAuthor on comments/worklogs, document emailAddress as Jira Server only

Type of Change

  • New feature

Testing

Tested manually. Type check passes. All trigger IDs verified consistent across utils, registry, block wiring, and barrel exports.

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

vercel bot commented Apr 17, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 17, 2026 2:43am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 17, 2026

PR Summary

Medium Risk
Adds multiple new webhook triggers and a new provider handler plus changes to idempotency key extraction; risk is mainly around correct event matching/deduplication and ensuring generic webhook payloads remain backward compatible.

Overview
Expands Atlassian automation coverage by adding new webhook triggers for Confluence (attachment/comment updates, restores, space removal, permission changes, user created), Jira (comment/worklog updated/deleted, sprint lifecycle, project created, version released), and introducing Jira Service Management (JSM) triggers (request created/updated/commented/resolved + generic webhook).

Updates the webhook processing pipeline to support these events: registers a new jsm webhook provider (reusing Jira HMAC verification), enhances Jira/Confluence formatInput to route additional event types and enrich generic webhook payloads, and improves deduplication by recognizing X-Atlassian-Webhook-Identifier and adding provider-specific extractIdempotencyId logic.

Docs and integration metadata are updated to reflect the new trigger counts/options, and trigger output schemas are extended (e.g., user fields, ADF comment bodies, additional entities like sprint/project/version).

Reviewed by Cursor Bugbot for commit 0684382. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 17, 2026

Greptile Summary

This PR adds 21 new Atlassian webhook triggers across Jira (9), JSM (5), and Confluence (7), introduces a dedicated JSM webhook provider handler that reuses Jira's HMAC validation, and extends idempotency deduplication with the x-atlassian-webhook-identifier header. It also fixes the generic Jira webhook to pass through sprint/project/version payloads and improves output schemas with ADF-aware descriptions and updateAuthor fields.

All findings are P2 (non-blocking style/accuracy suggestions). The implementation is consistent with existing trigger patterns and registry wiring.

Confidence Score: 5/5

Safe to merge — no P0/P1 issues; all findings are P2 style/accuracy suggestions

21 new triggers are correctly wired across utils, registry, block definitions, and barrel exports. Event matching, idempotency extraction, and HMAC reuse are all implemented consistently with existing patterns. The two P2 findings (trigger description mismatch for user_reactivated, TriggerOutput.description ambiguity) are non-blocking and do not affect runtime behavior.

apps/sim/triggers/confluence/utils.ts (user_created event map), apps/sim/triggers/types.ts (description type dual use)

Important Files Changed

Filename Overview
apps/sim/lib/webhooks/providers/jsm.ts New JSM provider handler reusing Jira HMAC verification; matchEvent and extractIdempotencyId are correct and consistent with the Jira handler pattern
apps/sim/lib/webhooks/providers/jira.ts Extends formatInput to handle sprint/project/version triggers and fixes generic webhook passthrough; idempotency ID now includes timestamp to avoid collisions across same-entity updates
apps/sim/triggers/types.ts TriggerOutput.description broadened from string to string
apps/sim/triggers/jsm/utils.ts New JSM utilities with correct isJsmEventMatch logic; jsm_request_resolved correctly uses changelog status check with case-insensitive comparison
apps/sim/triggers/jira/utils.ts Dead jiraWebhookSubBlocks config removed; new extract functions use proper unknown types; isJiraEventMatch extended for all new event types
apps/sim/triggers/confluence/utils.ts New extract functions correctly typed as Record<string,unknown>; confluence_user_created maps to user_reactivated as well, which the trigger name does not reflect
apps/sim/lib/core/idempotency/service.ts Adds x-atlassian-webhook-identifier to the idempotency header chain; correctly placed before the generic idempotency-key fallback
apps/sim/triggers/registry.ts All 21 new triggers correctly registered; IDs are consistent with trigger configs and block wiring
apps/sim/lib/webhooks/providers/confluence.ts Adds extractIdempotencyId; correctly routes page_permissions_updated and user_created to dedicated extract functions before the generic webhook fallback

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Atlassian Webhook POST] --> B{Provider?}
    B -->|jira| C[jiraHandler]
    B -->|jsm| D[jsmHandler]
    B -->|confluence| E[confluenceHandler]

    C --> C1{triggerId?}
    C1 -->|comment_*| C2[extractCommentData]
    C1 -->|worklog_*| C3[extractWorklogData]
    C1 -->|sprint_*| C4[extractSprintData]
    C1 -->|project_created| C5[extractProjectData]
    C1 -->|version_released| C6[extractVersionData]
    C1 -->|jira_webhook / none| C7[full payload passthrough]
    C1 -->|issue_*| C8[extractIssueData]

    D --> D1{triggerId?}
    D1 -->|jsm_request_commented| D2[extractCommentData]
    D1 -->|jsm_webhook / none| D3[full payload passthrough]
    D1 -->|jsm_request_resolved| D5{changelog status resolved/done/closed?}
    D1 -->|other| D4[extractRequestData]
    D5 -->|yes| D6[fire trigger]
    D5 -->|no| D7[skip]

    E --> E1{triggerId?}
    E1 -->|confluence_label_*| E2[extractLabelData]
    E1 -->|page_permissions_updated| E3[extractPagePermissionsData]
    E1 -->|user_created| E4[extractUserData]
    E1 -->|confluence_webhook| E5[full payload passthrough]
    E1 -->|other| E6[extractPageData]

    C2 & C3 & C4 & C5 & C6 & C7 & C8 --> F[Workflow Execution]
    D2 & D3 & D4 & D6 --> F
    E2 & E3 & E4 & E5 & E6 --> F
Loading

Reviews (4): Last reviewed commit: "fix(triggers): correct comment.body type..." | Re-trigger Greptile

Comment thread apps/sim/app/workspace/[workspaceId]/home/home.tsx Outdated
Comment thread apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx Outdated
Comment thread apps/sim/triggers/confluence/utils.ts Outdated
Comment thread apps/sim/triggers/jsm/utils.ts
Comment thread apps/sim/lib/webhooks/providers/jsm.ts
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/atlassian-triggers branch from 0da0481 to 27c6424 Compare April 17, 2026 02:01
- Jira: add 9 new triggers (sprint created/started/closed, project created, version released, comment updated/deleted, worklog updated/deleted)
- JSM: add 5 triggers from scratch (request created/updated/commented/resolved, generic webhook)
- Confluence: add 7 new triggers (comment updated, attachment updated, page/blog restored, space removed, page permissions updated, user created)
- Add JSM webhook provider handler with HMAC validation and changelog-based event matching
- Add Atlassian webhook identifier to idempotency service for native dedup
- Add extractIdempotencyId to Confluence handler
- Fix Jira generic webhook to pass through full payload for non-issue events
- Fix output schemas: add description (ADF), updateAuthor, resolution, components, fixVersions, worklog timestamps, note emailAddress as Jira Server only
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/atlassian-triggers branch from 27c6424 to 48e69b3 Compare April 17, 2026 02:04
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/lib/webhooks/providers/jsm.ts
… cast

JSM extractIdempotencyId now prioritizes comment.id over issue.id for
comment_created events, matching Jira's documented webhook payload
structure. Also fixes type cast for confluence extract function calls.
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/triggers/jsm/webhook.ts Outdated
Comment thread apps/sim/triggers/jira/utils.ts Outdated
…escription type

- JSM webhook comment.body changed from string to json (ADF format)
- Widened TriggerOutput.description to accept TriggerOutput objects,
  removing unsafe `as unknown as string` casts for Jira description fields
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@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.

✅ 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 0684382. Configure here.

@waleedlatif1 waleedlatif1 merged commit 2266bb3 into staging Apr 17, 2026
14 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/atlassian-triggers branch April 17, 2026 02:59
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