Skip to content

Commit 2266bb3

Browse files
authored
feat(triggers): add Atlassian triggers for Jira, JSM, and Confluence (#4211)
* feat(triggers): add Atlassian triggers for Jira, JSM, and Confluence - 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 * fix(triggers): replace any with Record<string, unknown> in confluence extract functions * lint * fix(triggers): use comment.id in JSM idempotency, fix confluence type 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. * fix(triggers): correct comment.body type to json, fix TriggerOutput description 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
1 parent a589c8e commit 2266bb3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3629
-119
lines changed

apps/docs/content/docs/en/triggers/confluence.mdx

Lines changed: 217 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
1010
color="#E0E0E0"
1111
/>
1212

13-
Confluence provides 16 triggers for automating workflows based on events.
13+
Confluence provides 23 triggers for automating workflows based on events.
1414

1515
## Triggers
1616

@@ -98,6 +98,49 @@ Trigger workflow when an attachment is removed in Confluence
9898
| `files` | file[] | Attachment file content downloaded from Confluence \(if includeFileContent is enabled with credentials\) |
9999

100100

101+
---
102+
103+
### Confluence Attachment Updated
104+
105+
Trigger workflow when an attachment is updated in Confluence
106+
107+
#### Configuration
108+
109+
| Parameter | Type | Required | Description |
110+
| --------- | ---- | -------- | ----------- |
111+
| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature |
112+
| `confluenceDomain` | string | No | Your Confluence Cloud domain |
113+
| `confluenceEmail` | string | No | Your Atlassian account email. Required together with API token to download attachment files. |
114+
| `confluenceApiToken` | string | No | API token from https://id.atlassian.com/manage-profile/security/api-tokens. Required to download attachment file content. |
115+
| `includeFileContent` | boolean | No | Download and include actual file content from attachments. Requires email, API token, and domain. |
116+
117+
#### Output
118+
119+
| Parameter | Type | Description |
120+
| --------- | ---- | ----------- |
121+
| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) |
122+
| `userAccountId` | string | Account ID of the user who triggered the event |
123+
| `accountType` | string | Account type \(e.g., customer\) |
124+
| `id` | number | Content ID |
125+
| `title` | string | Content title |
126+
| `contentType` | string | Content type \(page, blogpost, comment, attachment\) |
127+
| `version` | number | Version number |
128+
| `spaceKey` | string | Space key the content belongs to |
129+
| `creatorAccountId` | string | Account ID of the creator |
130+
| `lastModifierAccountId` | string | Account ID of the last modifier |
131+
| `self` | string | URL link to the content |
132+
| `creationDate` | number | Creation timestamp \(Unix epoch milliseconds\) |
133+
| `modificationDate` | number | Last modification timestamp \(Unix epoch milliseconds\) |
134+
| `attachment` | object | attachment output from the tool |
135+
|`mediaType` | string | MIME type of the attachment |
136+
|`fileSize` | number | File size in bytes |
137+
|`parent` | object | parent output from the tool |
138+
|`id` | number | Container page/blog ID |
139+
|`title` | string | Container page/blog title |
140+
|`contentType` | string | Container content type |
141+
| `files` | file[] | Attachment file content downloaded from Confluence \(if includeFileContent is enabled with credentials\) |
142+
143+
101144
---
102145

103146
### Confluence Blog Post Created
@@ -142,6 +185,28 @@ Trigger workflow when a blog post is removed in Confluence
142185
| `accountType` | string | Account type \(e.g., customer\) |
143186

144187

188+
---
189+
190+
### Confluence Blog Post Restored
191+
192+
Trigger workflow when a blog post is restored from trash in Confluence
193+
194+
#### Configuration
195+
196+
| Parameter | Type | Required | Description |
197+
| --------- | ---- | -------- | ----------- |
198+
| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature |
199+
| `confluenceDomain` | string | No | Your Confluence Cloud domain |
200+
201+
#### Output
202+
203+
| Parameter | Type | Description |
204+
| --------- | ---- | ----------- |
205+
| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) |
206+
| `userAccountId` | string | Account ID of the user who triggered the event |
207+
| `accountType` | string | Account type \(e.g., customer\) |
208+
209+
145210
---
146211

147212
### Confluence Blog Post Updated
@@ -242,6 +307,45 @@ Trigger workflow when a comment is removed in Confluence
242307
|`self` | string | URL link to the parent content |
243308

244309

310+
---
311+
312+
### Confluence Comment Updated
313+
314+
Trigger workflow when a comment is updated in Confluence
315+
316+
#### Configuration
317+
318+
| Parameter | Type | Required | Description |
319+
| --------- | ---- | -------- | ----------- |
320+
| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature |
321+
| `confluenceDomain` | string | No | Your Confluence Cloud domain |
322+
323+
#### Output
324+
325+
| Parameter | Type | Description |
326+
| --------- | ---- | ----------- |
327+
| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) |
328+
| `userAccountId` | string | Account ID of the user who triggered the event |
329+
| `accountType` | string | Account type \(e.g., customer\) |
330+
| `id` | number | Content ID |
331+
| `title` | string | Content title |
332+
| `contentType` | string | Content type \(page, blogpost, comment, attachment\) |
333+
| `version` | number | Version number |
334+
| `spaceKey` | string | Space key the content belongs to |
335+
| `creatorAccountId` | string | Account ID of the creator |
336+
| `lastModifierAccountId` | string | Account ID of the last modifier |
337+
| `self` | string | URL link to the content |
338+
| `creationDate` | number | Creation timestamp \(Unix epoch milliseconds\) |
339+
| `modificationDate` | number | Last modification timestamp \(Unix epoch milliseconds\) |
340+
| `comment` | object | comment output from the tool |
341+
|`parent` | object | parent output from the tool |
342+
|`id` | number | Parent page/blog ID |
343+
|`title` | string | Parent page/blog title |
344+
|`contentType` | string | Parent content type \(page or blogpost\) |
345+
|`spaceKey` | string | Space key of the parent |
346+
|`self` | string | URL link to the parent content |
347+
348+
245349
---
246350

247351
### Confluence Label Added
@@ -346,6 +450,40 @@ Trigger workflow when a page is moved in Confluence
346450
| `accountType` | string | Account type \(e.g., customer\) |
347451

348452

453+
---
454+
455+
### Confluence Page Permissions Updated
456+
457+
Trigger workflow when page permissions are changed in Confluence
458+
459+
#### Configuration
460+
461+
| Parameter | Type | Required | Description |
462+
| --------- | ---- | -------- | ----------- |
463+
| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature |
464+
| `confluenceDomain` | string | No | Your Confluence Cloud domain |
465+
466+
#### Output
467+
468+
| Parameter | Type | Description |
469+
| --------- | ---- | ----------- |
470+
| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) |
471+
| `userAccountId` | string | Account ID of the user who triggered the event |
472+
| `accountType` | string | Account type \(e.g., customer\) |
473+
| `id` | number | Content ID |
474+
| `title` | string | Content title |
475+
| `contentType` | string | Content type \(page, blogpost, comment, attachment\) |
476+
| `version` | number | Version number |
477+
| `spaceKey` | string | Space key the content belongs to |
478+
| `creatorAccountId` | string | Account ID of the creator |
479+
| `lastModifierAccountId` | string | Account ID of the last modifier |
480+
| `self` | string | URL link to the content |
481+
| `creationDate` | number | Creation timestamp \(Unix epoch milliseconds\) |
482+
| `modificationDate` | number | Last modification timestamp \(Unix epoch milliseconds\) |
483+
| `page` | object | page output from the tool |
484+
|`permissions` | json | Updated permissions object for the page |
485+
486+
349487
---
350488

351489
### Confluence Page Removed
@@ -368,6 +506,28 @@ Trigger workflow when a page is removed or trashed in Confluence
368506
| `accountType` | string | Account type \(e.g., customer\) |
369507

370508

509+
---
510+
511+
### Confluence Page Restored
512+
513+
Trigger workflow when a page is restored from trash in Confluence
514+
515+
#### Configuration
516+
517+
| Parameter | Type | Required | Description |
518+
| --------- | ---- | -------- | ----------- |
519+
| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature |
520+
| `confluenceDomain` | string | No | Your Confluence Cloud domain |
521+
522+
#### Output
523+
524+
| Parameter | Type | Description |
525+
| --------- | ---- | ----------- |
526+
| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) |
527+
| `userAccountId` | string | Account ID of the user who triggered the event |
528+
| `accountType` | string | Account type \(e.g., customer\) |
529+
530+
371531
---
372532

373533
### Confluence Page Updated
@@ -416,6 +576,32 @@ Trigger workflow when a new space is created in Confluence
416576
|`self` | string | URL link to the space |
417577

418578

579+
---
580+
581+
### Confluence Space Removed
582+
583+
Trigger workflow when a space is removed in Confluence
584+
585+
#### Configuration
586+
587+
| Parameter | Type | Required | Description |
588+
| --------- | ---- | -------- | ----------- |
589+
| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature |
590+
| `confluenceDomain` | string | No | Your Confluence Cloud domain |
591+
592+
#### Output
593+
594+
| Parameter | Type | Description |
595+
| --------- | ---- | ----------- |
596+
| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) |
597+
| `userAccountId` | string | Account ID of the user who triggered the event |
598+
| `accountType` | string | Account type \(e.g., customer\) |
599+
| `space` | object | space output from the tool |
600+
|`key` | string | Space key |
601+
|`name` | string | Space name |
602+
|`self` | string | URL link to the space |
603+
604+
419605
---
420606

421607
### Confluence Space Updated
@@ -442,6 +628,35 @@ Trigger workflow when a space is updated in Confluence
442628
|`self` | string | URL link to the space |
443629

444630

631+
---
632+
633+
### Confluence User Created
634+
635+
Trigger workflow when a new user is added to Confluence
636+
637+
#### Configuration
638+
639+
| Parameter | Type | Required | Description |
640+
| --------- | ---- | -------- | ----------- |
641+
| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature |
642+
| `confluenceDomain` | string | No | Your Confluence Cloud domain |
643+
644+
#### Output
645+
646+
| Parameter | Type | Description |
647+
| --------- | ---- | ----------- |
648+
| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) |
649+
| `userAccountId` | string | Account ID of the user who triggered the event |
650+
| `accountType` | string | Account type \(e.g., customer\) |
651+
| `user` | object | user output from the tool |
652+
|`accountId` | string | Account ID of the new user |
653+
|`accountType` | string | Account type \(e.g., atlassian, app\) |
654+
|`displayName` | string | Display name of the user |
655+
|`emailAddress` | string | Email address of the user \(may not be available due to GDPR/privacy settings\) |
656+
|`publicName` | string | Public name of the user |
657+
|`self` | string | URL link to the user profile |
658+
659+
445660
---
446661

447662
### Confluence Webhook (All Events)
@@ -472,5 +687,6 @@ Trigger workflow on any Confluence webhook event
472687
| `space` | json | Space object \(present in space events\) |
473688
| `label` | json | Label object \(present in label events\) |
474689
| `content` | json | Content object \(present in label events\) |
690+
| `user` | json | User object \(present in user events\) |
475691
| `files` | file[] | Attachment file content \(present in attachment events when includeFileContent is enabled\) |
476692

0 commit comments

Comments
 (0)