diff --git a/apps/docs/content/docs/en/triggers/confluence.mdx b/apps/docs/content/docs/en/triggers/confluence.mdx index e0e9420af8b..c2b6ca0dfa3 100644 --- a/apps/docs/content/docs/en/triggers/confluence.mdx +++ b/apps/docs/content/docs/en/triggers/confluence.mdx @@ -10,7 +10,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card" color="#E0E0E0" /> -Confluence provides 16 triggers for automating workflows based on events. +Confluence provides 23 triggers for automating workflows based on events. ## Triggers @@ -98,6 +98,49 @@ Trigger workflow when an attachment is removed in Confluence | `files` | file[] | Attachment file content downloaded from Confluence \(if includeFileContent is enabled with credentials\) | +--- + +### Confluence Attachment Updated + +Trigger workflow when an attachment is updated in Confluence + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature | +| `confluenceDomain` | string | No | Your Confluence Cloud domain | +| `confluenceEmail` | string | No | Your Atlassian account email. Required together with API token to download attachment files. | +| `confluenceApiToken` | string | No | API token from https://id.atlassian.com/manage-profile/security/api-tokens. Required to download attachment file content. | +| `includeFileContent` | boolean | No | Download and include actual file content from attachments. Requires email, API token, and domain. | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) | +| `userAccountId` | string | Account ID of the user who triggered the event | +| `accountType` | string | Account type \(e.g., customer\) | +| `id` | number | Content ID | +| `title` | string | Content title | +| `contentType` | string | Content type \(page, blogpost, comment, attachment\) | +| `version` | number | Version number | +| `spaceKey` | string | Space key the content belongs to | +| `creatorAccountId` | string | Account ID of the creator | +| `lastModifierAccountId` | string | Account ID of the last modifier | +| `self` | string | URL link to the content | +| `creationDate` | number | Creation timestamp \(Unix epoch milliseconds\) | +| `modificationDate` | number | Last modification timestamp \(Unix epoch milliseconds\) | +| `attachment` | object | attachment output from the tool | +| ↳ `mediaType` | string | MIME type of the attachment | +| ↳ `fileSize` | number | File size in bytes | +| ↳ `parent` | object | parent output from the tool | +| ↳ `id` | number | Container page/blog ID | +| ↳ `title` | string | Container page/blog title | +| ↳ `contentType` | string | Container content type | +| `files` | file[] | Attachment file content downloaded from Confluence \(if includeFileContent is enabled with credentials\) | + + --- ### Confluence Blog Post Created @@ -142,6 +185,28 @@ Trigger workflow when a blog post is removed in Confluence | `accountType` | string | Account type \(e.g., customer\) | +--- + +### Confluence Blog Post Restored + +Trigger workflow when a blog post is restored from trash in Confluence + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature | +| `confluenceDomain` | string | No | Your Confluence Cloud domain | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) | +| `userAccountId` | string | Account ID of the user who triggered the event | +| `accountType` | string | Account type \(e.g., customer\) | + + --- ### Confluence Blog Post Updated @@ -242,6 +307,45 @@ Trigger workflow when a comment is removed in Confluence | ↳ `self` | string | URL link to the parent content | +--- + +### Confluence Comment Updated + +Trigger workflow when a comment is updated in Confluence + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature | +| `confluenceDomain` | string | No | Your Confluence Cloud domain | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) | +| `userAccountId` | string | Account ID of the user who triggered the event | +| `accountType` | string | Account type \(e.g., customer\) | +| `id` | number | Content ID | +| `title` | string | Content title | +| `contentType` | string | Content type \(page, blogpost, comment, attachment\) | +| `version` | number | Version number | +| `spaceKey` | string | Space key the content belongs to | +| `creatorAccountId` | string | Account ID of the creator | +| `lastModifierAccountId` | string | Account ID of the last modifier | +| `self` | string | URL link to the content | +| `creationDate` | number | Creation timestamp \(Unix epoch milliseconds\) | +| `modificationDate` | number | Last modification timestamp \(Unix epoch milliseconds\) | +| `comment` | object | comment output from the tool | +| ↳ `parent` | object | parent output from the tool | +| ↳ `id` | number | Parent page/blog ID | +| ↳ `title` | string | Parent page/blog title | +| ↳ `contentType` | string | Parent content type \(page or blogpost\) | +| ↳ `spaceKey` | string | Space key of the parent | +| ↳ `self` | string | URL link to the parent content | + + --- ### Confluence Label Added @@ -346,6 +450,40 @@ Trigger workflow when a page is moved in Confluence | `accountType` | string | Account type \(e.g., customer\) | +--- + +### Confluence Page Permissions Updated + +Trigger workflow when page permissions are changed in Confluence + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature | +| `confluenceDomain` | string | No | Your Confluence Cloud domain | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) | +| `userAccountId` | string | Account ID of the user who triggered the event | +| `accountType` | string | Account type \(e.g., customer\) | +| `id` | number | Content ID | +| `title` | string | Content title | +| `contentType` | string | Content type \(page, blogpost, comment, attachment\) | +| `version` | number | Version number | +| `spaceKey` | string | Space key the content belongs to | +| `creatorAccountId` | string | Account ID of the creator | +| `lastModifierAccountId` | string | Account ID of the last modifier | +| `self` | string | URL link to the content | +| `creationDate` | number | Creation timestamp \(Unix epoch milliseconds\) | +| `modificationDate` | number | Last modification timestamp \(Unix epoch milliseconds\) | +| `page` | object | page output from the tool | +| ↳ `permissions` | json | Updated permissions object for the page | + + --- ### Confluence Page Removed @@ -368,6 +506,28 @@ Trigger workflow when a page is removed or trashed in Confluence | `accountType` | string | Account type \(e.g., customer\) | +--- + +### Confluence Page Restored + +Trigger workflow when a page is restored from trash in Confluence + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature | +| `confluenceDomain` | string | No | Your Confluence Cloud domain | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) | +| `userAccountId` | string | Account ID of the user who triggered the event | +| `accountType` | string | Account type \(e.g., customer\) | + + --- ### Confluence Page Updated @@ -416,6 +576,32 @@ Trigger workflow when a new space is created in Confluence | ↳ `self` | string | URL link to the space | +--- + +### Confluence Space Removed + +Trigger workflow when a space is removed in Confluence + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature | +| `confluenceDomain` | string | No | Your Confluence Cloud domain | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) | +| `userAccountId` | string | Account ID of the user who triggered the event | +| `accountType` | string | Account type \(e.g., customer\) | +| `space` | object | space output from the tool | +| ↳ `key` | string | Space key | +| ↳ `name` | string | Space name | +| ↳ `self` | string | URL link to the space | + + --- ### Confluence Space Updated @@ -442,6 +628,35 @@ Trigger workflow when a space is updated in Confluence | ↳ `self` | string | URL link to the space | +--- + +### Confluence User Created + +Trigger workflow when a new user is added to Confluence + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Confluence using HMAC signature | +| `confluenceDomain` | string | No | Your Confluence Cloud domain | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `timestamp` | number | Timestamp of the webhook event \(Unix epoch milliseconds\) | +| `userAccountId` | string | Account ID of the user who triggered the event | +| `accountType` | string | Account type \(e.g., customer\) | +| `user` | object | user output from the tool | +| ↳ `accountId` | string | Account ID of the new user | +| ↳ `accountType` | string | Account type \(e.g., atlassian, app\) | +| ↳ `displayName` | string | Display name of the user | +| ↳ `emailAddress` | string | Email address of the user \(may not be available due to GDPR/privacy settings\) | +| ↳ `publicName` | string | Public name of the user | +| ↳ `self` | string | URL link to the user profile | + + --- ### Confluence Webhook (All Events) @@ -472,5 +687,6 @@ Trigger workflow on any Confluence webhook event | `space` | json | Space object \(present in space events\) | | `label` | json | Label object \(present in label events\) | | `content` | json | Content object \(present in label events\) | +| `user` | json | User object \(present in user events\) | | `files` | file[] | Attachment file content \(present in attachment events when includeFileContent is enabled\) | diff --git a/apps/docs/content/docs/en/triggers/jira.mdx b/apps/docs/content/docs/en/triggers/jira.mdx index 08ac88bc82f..eff9d92990c 100644 --- a/apps/docs/content/docs/en/triggers/jira.mdx +++ b/apps/docs/content/docs/en/triggers/jira.mdx @@ -10,10 +10,182 @@ import { BlockInfoCard } from "@/components/ui/block-info-card" color="#E0E0E0" /> -Jira provides 6 triggers for automating workflows based on events. +Jira provides 15 triggers for automating workflows based on events. ## Triggers +### Jira Comment Deleted + +Trigger workflow when a comment is deleted from a Jira issue + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which comment deletions trigger this workflow using JQL | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `issue` | object | issue output from the tool | +| ↳ `id` | string | Jira issue ID | +| ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | +| ↳ `self` | string | REST API URL for this issue | +| ↳ `fields` | object | fields output from the tool | +| ↳ `votes` | json | Votes on this issue | +| ↳ `labels` | array | Array of labels applied to this issue | +| ↳ `status` | object | status output from the tool | +| ↳ `name` | string | Status name | +| ↳ `id` | string | Status ID | +| ↳ `statusCategory` | json | Status category information | +| ↳ `created` | string | Issue creation date \(ISO format\) | +| ↳ `creator` | object | creator output from the tool | +| ↳ `displayName` | string | Creator display name | +| ↳ `accountId` | string | Creator account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `duedate` | string | Due date for the issue | +| ↳ `project` | object | project output from the tool | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `id` | string | Project ID | +| ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | +| ↳ `updated` | string | Last updated date \(ISO format\) | +| ↳ `watches` | json | Watchers information | +| ↳ `assignee` | object | assignee output from the tool | +| ↳ `displayName` | string | Assignee display name | +| ↳ `accountId` | string | Assignee account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `priority` | object | priority output from the tool | +| ↳ `name` | string | Priority name | +| ↳ `id` | string | Priority ID | +| ↳ `progress` | json | Progress tracking information | +| ↳ `reporter` | object | reporter output from the tool | +| ↳ `displayName` | string | Reporter display name | +| ↳ `accountId` | string | Reporter account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `security` | string | Security level | +| ↳ `subtasks` | array | Array of subtask objects | +| ↳ `versions` | array | Array of affected versions | +| ↳ `issuetype` | object | issuetype output from the tool | +| ↳ `name` | string | Issue type name | +| ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | +| `comment` | object | comment output from the tool | +| ↳ `id` | string | Comment ID | +| ↳ `body` | json | Comment body in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | +| ↳ `author` | object | author output from the tool | +| ↳ `displayName` | string | Comment author display name | +| ↳ `accountId` | string | Comment author account ID | +| ↳ `emailAddress` | string | Comment author email address | +| ↳ `updateAuthor` | object | updateAuthor output from the tool | +| ↳ `displayName` | string | Display name of the user who last updated the comment | +| ↳ `accountId` | string | Account ID of the user who last updated the comment | +| ↳ `created` | string | Comment creation date \(ISO format\) | +| ↳ `updated` | string | Comment last updated date \(ISO format\) | +| ↳ `self` | string | REST API URL for this comment | + + +--- + +### Jira Comment Updated + +Trigger workflow when a comment is updated on a Jira issue + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which comment updates trigger this workflow using JQL | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `issue` | object | issue output from the tool | +| ↳ `id` | string | Jira issue ID | +| ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | +| ↳ `self` | string | REST API URL for this issue | +| ↳ `fields` | object | fields output from the tool | +| ↳ `votes` | json | Votes on this issue | +| ↳ `labels` | array | Array of labels applied to this issue | +| ↳ `status` | object | status output from the tool | +| ↳ `name` | string | Status name | +| ↳ `id` | string | Status ID | +| ↳ `statusCategory` | json | Status category information | +| ↳ `created` | string | Issue creation date \(ISO format\) | +| ↳ `creator` | object | creator output from the tool | +| ↳ `displayName` | string | Creator display name | +| ↳ `accountId` | string | Creator account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `duedate` | string | Due date for the issue | +| ↳ `project` | object | project output from the tool | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `id` | string | Project ID | +| ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | +| ↳ `updated` | string | Last updated date \(ISO format\) | +| ↳ `watches` | json | Watchers information | +| ↳ `assignee` | object | assignee output from the tool | +| ↳ `displayName` | string | Assignee display name | +| ↳ `accountId` | string | Assignee account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `priority` | object | priority output from the tool | +| ↳ `name` | string | Priority name | +| ↳ `id` | string | Priority ID | +| ↳ `progress` | json | Progress tracking information | +| ↳ `reporter` | object | reporter output from the tool | +| ↳ `displayName` | string | Reporter display name | +| ↳ `accountId` | string | Reporter account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `security` | string | Security level | +| ↳ `subtasks` | array | Array of subtask objects | +| ↳ `versions` | array | Array of affected versions | +| ↳ `issuetype` | object | issuetype output from the tool | +| ↳ `name` | string | Issue type name | +| ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | +| `comment` | object | comment output from the tool | +| ↳ `id` | string | Comment ID | +| ↳ `body` | json | Comment body in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | +| ↳ `author` | object | author output from the tool | +| ↳ `displayName` | string | Comment author display name | +| ↳ `accountId` | string | Comment author account ID | +| ↳ `emailAddress` | string | Comment author email address | +| ↳ `updateAuthor` | object | updateAuthor output from the tool | +| ↳ `displayName` | string | Display name of the user who last updated the comment | +| ↳ `accountId` | string | Account ID of the user who last updated the comment | +| ↳ `created` | string | Comment creation date \(ISO format\) | +| ↳ `updated` | string | Comment last updated date \(ISO format\) | +| ↳ `self` | string | REST API URL for this comment | + + +--- + ### Jira Issue Commented Trigger workflow when a comment is added to a Jira issue @@ -31,6 +203,10 @@ Trigger workflow when a comment is added to a Jira issue | --------- | ---- | ----------- | | `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | | `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | | `issue` | object | issue output from the tool | | ↳ `id` | string | Jira issue ID | | ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | @@ -46,19 +222,20 @@ Trigger workflow when a comment is added to a Jira issue | ↳ `creator` | object | creator output from the tool | | ↳ `displayName` | string | Creator display name | | ↳ `accountId` | string | Creator account ID | -| ↳ `emailAddress` | string | Creator email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `duedate` | string | Due date for the issue | | ↳ `project` | object | project output from the tool | | ↳ `key` | string | Project key | | ↳ `name` | string | Project name | | ↳ `id` | string | Project ID | | ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | | ↳ `updated` | string | Last updated date \(ISO format\) | | ↳ `watches` | json | Watchers information | | ↳ `assignee` | object | assignee output from the tool | | ↳ `displayName` | string | Assignee display name | | ↳ `accountId` | string | Assignee account ID | -| ↳ `emailAddress` | string | Assignee email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `priority` | object | priority output from the tool | | ↳ `name` | string | Priority name | | ↳ `id` | string | Priority ID | @@ -66,22 +243,31 @@ Trigger workflow when a comment is added to a Jira issue | ↳ `reporter` | object | reporter output from the tool | | ↳ `displayName` | string | Reporter display name | | ↳ `accountId` | string | Reporter account ID | -| ↳ `emailAddress` | string | Reporter email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `security` | string | Security level | | ↳ `subtasks` | array | Array of subtask objects | | ↳ `versions` | array | Array of affected versions | | ↳ `issuetype` | object | issuetype output from the tool | | ↳ `name` | string | Issue type name | | ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | | `comment` | object | comment output from the tool | | ↳ `id` | string | Comment ID | -| ↳ `body` | string | Comment text/body | +| ↳ `body` | json | Comment body in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | | ↳ `author` | object | author output from the tool | | ↳ `displayName` | string | Comment author display name | | ↳ `accountId` | string | Comment author account ID | | ↳ `emailAddress` | string | Comment author email address | +| ↳ `updateAuthor` | object | updateAuthor output from the tool | +| ↳ `displayName` | string | Display name of the user who last updated the comment | +| ↳ `accountId` | string | Account ID of the user who last updated the comment | | ↳ `created` | string | Comment creation date \(ISO format\) | | ↳ `updated` | string | Comment last updated date \(ISO format\) | +| ↳ `self` | string | REST API URL for this comment | --- @@ -103,6 +289,10 @@ Trigger workflow when a new issue is created in Jira | --------- | ---- | ----------- | | `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | | `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | | `issue` | object | issue output from the tool | | ↳ `id` | string | Jira issue ID | | ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | @@ -118,19 +308,20 @@ Trigger workflow when a new issue is created in Jira | ↳ `creator` | object | creator output from the tool | | ↳ `displayName` | string | Creator display name | | ↳ `accountId` | string | Creator account ID | -| ↳ `emailAddress` | string | Creator email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `duedate` | string | Due date for the issue | | ↳ `project` | object | project output from the tool | | ↳ `key` | string | Project key | | ↳ `name` | string | Project name | | ↳ `id` | string | Project ID | | ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | | ↳ `updated` | string | Last updated date \(ISO format\) | | ↳ `watches` | json | Watchers information | | ↳ `assignee` | object | assignee output from the tool | | ↳ `displayName` | string | Assignee display name | | ↳ `accountId` | string | Assignee account ID | -| ↳ `emailAddress` | string | Assignee email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `priority` | object | priority output from the tool | | ↳ `name` | string | Priority name | | ↳ `id` | string | Priority ID | @@ -138,13 +329,18 @@ Trigger workflow when a new issue is created in Jira | ↳ `reporter` | object | reporter output from the tool | | ↳ `displayName` | string | Reporter display name | | ↳ `accountId` | string | Reporter account ID | -| ↳ `emailAddress` | string | Reporter email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `security` | string | Security level | | ↳ `subtasks` | array | Array of subtask objects | | ↳ `versions` | array | Array of affected versions | | ↳ `issuetype` | object | issuetype output from the tool | | ↳ `name` | string | Issue type name | | ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | | `issue_event_type_name` | string | Issue event type name from Jira \(only present in issue events\) | @@ -167,6 +363,10 @@ Trigger workflow when an issue is deleted in Jira | --------- | ---- | ----------- | | `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | | `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | | `issue` | object | issue output from the tool | | ↳ `id` | string | Jira issue ID | | ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | @@ -182,19 +382,20 @@ Trigger workflow when an issue is deleted in Jira | ↳ `creator` | object | creator output from the tool | | ↳ `displayName` | string | Creator display name | | ↳ `accountId` | string | Creator account ID | -| ↳ `emailAddress` | string | Creator email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `duedate` | string | Due date for the issue | | ↳ `project` | object | project output from the tool | | ↳ `key` | string | Project key | | ↳ `name` | string | Project name | | ↳ `id` | string | Project ID | | ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | | ↳ `updated` | string | Last updated date \(ISO format\) | | ↳ `watches` | json | Watchers information | | ↳ `assignee` | object | assignee output from the tool | | ↳ `displayName` | string | Assignee display name | | ↳ `accountId` | string | Assignee account ID | -| ↳ `emailAddress` | string | Assignee email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `priority` | object | priority output from the tool | | ↳ `name` | string | Priority name | | ↳ `id` | string | Priority ID | @@ -202,13 +403,18 @@ Trigger workflow when an issue is deleted in Jira | ↳ `reporter` | object | reporter output from the tool | | ↳ `displayName` | string | Reporter display name | | ↳ `accountId` | string | Reporter account ID | -| ↳ `emailAddress` | string | Reporter email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `security` | string | Security level | | ↳ `subtasks` | array | Array of subtask objects | | ↳ `versions` | array | Array of affected versions | | ↳ `issuetype` | object | issuetype output from the tool | | ↳ `name` | string | Issue type name | | ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | | `issue_event_type_name` | string | Issue event type name from Jira \(only present in issue events\) | @@ -232,6 +438,10 @@ Trigger workflow when an issue is updated in Jira | --------- | ---- | ----------- | | `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | | `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | | `issue` | object | issue output from the tool | | ↳ `id` | string | Jira issue ID | | ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | @@ -247,19 +457,20 @@ Trigger workflow when an issue is updated in Jira | ↳ `creator` | object | creator output from the tool | | ↳ `displayName` | string | Creator display name | | ↳ `accountId` | string | Creator account ID | -| ↳ `emailAddress` | string | Creator email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `duedate` | string | Due date for the issue | | ↳ `project` | object | project output from the tool | | ↳ `key` | string | Project key | | ↳ `name` | string | Project name | | ↳ `id` | string | Project ID | | ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | | ↳ `updated` | string | Last updated date \(ISO format\) | | ↳ `watches` | json | Watchers information | | ↳ `assignee` | object | assignee output from the tool | | ↳ `displayName` | string | Assignee display name | | ↳ `accountId` | string | Assignee account ID | -| ↳ `emailAddress` | string | Assignee email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `priority` | object | priority output from the tool | | ↳ `name` | string | Priority name | | ↳ `id` | string | Priority ID | @@ -267,18 +478,194 @@ Trigger workflow when an issue is updated in Jira | ↳ `reporter` | object | reporter output from the tool | | ↳ `displayName` | string | Reporter display name | | ↳ `accountId` | string | Reporter account ID | -| ↳ `emailAddress` | string | Reporter email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `security` | string | Security level | | ↳ `subtasks` | array | Array of subtask objects | | ↳ `versions` | array | Array of affected versions | | ↳ `issuetype` | object | issuetype output from the tool | | ↳ `name` | string | Issue type name | | ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | | `issue_event_type_name` | string | Issue event type name from Jira \(only present in issue events\) | | `changelog` | object | changelog output from the tool | | ↳ `id` | string | Changelog ID | +--- + +### Jira Project Created + +Trigger workflow when a project is created in Jira + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(project_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `project` | object | project output from the tool | +| ↳ `id` | string | Project ID | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `self` | string | REST API URL for this project | +| ↳ `projectTypeKey` | string | Project type \(e.g., software, business\) | +| ↳ `lead` | object | lead output from the tool | +| ↳ `displayName` | string | Project lead display name | +| ↳ `accountId` | string | Project lead account ID | + + +--- + +### Jira Sprint Closed + +Trigger workflow when a sprint is closed in Jira + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., sprint_started, sprint_closed\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `sprint` | object | sprint output from the tool | +| ↳ `id` | number | Sprint ID | +| ↳ `self` | string | REST API URL for this sprint | +| ↳ `state` | string | Sprint state \(future, active, closed\) | +| ↳ `name` | string | Sprint name | +| ↳ `startDate` | string | Sprint start date \(ISO format\) | +| ↳ `endDate` | string | Sprint end date \(ISO format\) | +| ↳ `completeDate` | string | Sprint completion date \(ISO format\) | +| ↳ `originBoardId` | number | Board ID the sprint belongs to | +| ↳ `goal` | string | Sprint goal | +| ↳ `createdDate` | string | Sprint creation date \(ISO format\) | + + +--- + +### Jira Sprint Created + +Trigger workflow when a sprint is created in Jira + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., sprint_started, sprint_closed\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `sprint` | object | sprint output from the tool | +| ↳ `id` | number | Sprint ID | +| ↳ `self` | string | REST API URL for this sprint | +| ↳ `state` | string | Sprint state \(future, active, closed\) | +| ↳ `name` | string | Sprint name | +| ↳ `startDate` | string | Sprint start date \(ISO format\) | +| ↳ `endDate` | string | Sprint end date \(ISO format\) | +| ↳ `completeDate` | string | Sprint completion date \(ISO format\) | +| ↳ `originBoardId` | number | Board ID the sprint belongs to | +| ↳ `goal` | string | Sprint goal | +| ↳ `createdDate` | string | Sprint creation date \(ISO format\) | + + +--- + +### Jira Sprint Started + +Trigger workflow when a sprint is started in Jira + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., sprint_started, sprint_closed\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `sprint` | object | sprint output from the tool | +| ↳ `id` | number | Sprint ID | +| ↳ `self` | string | REST API URL for this sprint | +| ↳ `state` | string | Sprint state \(future, active, closed\) | +| ↳ `name` | string | Sprint name | +| ↳ `startDate` | string | Sprint start date \(ISO format\) | +| ↳ `endDate` | string | Sprint end date \(ISO format\) | +| ↳ `completeDate` | string | Sprint completion date \(ISO format\) | +| ↳ `originBoardId` | number | Board ID the sprint belongs to | +| ↳ `goal` | string | Sprint goal | +| ↳ `createdDate` | string | Sprint creation date \(ISO format\) | + + +--- + +### Jira Version Released + +Trigger workflow when a version is released in Jira + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(jira:version_released\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `version` | object | version output from the tool | +| ↳ `id` | string | Version ID | +| ↳ `name` | string | Version name | +| ↳ `self` | string | REST API URL for this version | +| ↳ `released` | boolean | Whether the version is released | +| ↳ `releaseDate` | string | Release date \(ISO format\) | +| ↳ `projectId` | number | Project ID the version belongs to | +| ↳ `description` | string | Version description | +| ↳ `archived` | boolean | Whether the version is archived | + + --- ### Jira Webhook (All Events) @@ -337,6 +724,190 @@ Trigger workflow when time is logged on a Jira issue | --------- | ---- | ----------- | | `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | | `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `issue` | object | issue output from the tool | +| ↳ `id` | string | Jira issue ID | +| ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | +| ↳ `self` | string | REST API URL for this issue | +| ↳ `fields` | object | fields output from the tool | +| ↳ `votes` | json | Votes on this issue | +| ↳ `labels` | array | Array of labels applied to this issue | +| ↳ `status` | object | status output from the tool | +| ↳ `name` | string | Status name | +| ↳ `id` | string | Status ID | +| ↳ `statusCategory` | json | Status category information | +| ↳ `created` | string | Issue creation date \(ISO format\) | +| ↳ `creator` | object | creator output from the tool | +| ↳ `displayName` | string | Creator display name | +| ↳ `accountId` | string | Creator account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `duedate` | string | Due date for the issue | +| ↳ `project` | object | project output from the tool | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `id` | string | Project ID | +| ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | +| ↳ `updated` | string | Last updated date \(ISO format\) | +| ↳ `watches` | json | Watchers information | +| ↳ `assignee` | object | assignee output from the tool | +| ↳ `displayName` | string | Assignee display name | +| ↳ `accountId` | string | Assignee account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `priority` | object | priority output from the tool | +| ↳ `name` | string | Priority name | +| ↳ `id` | string | Priority ID | +| ↳ `progress` | json | Progress tracking information | +| ↳ `reporter` | object | reporter output from the tool | +| ↳ `displayName` | string | Reporter display name | +| ↳ `accountId` | string | Reporter account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `security` | string | Security level | +| ↳ `subtasks` | array | Array of subtask objects | +| ↳ `versions` | array | Array of affected versions | +| ↳ `issuetype` | object | issuetype output from the tool | +| ↳ `name` | string | Issue type name | +| ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | +| `worklog` | object | worklog output from the tool | +| ↳ `id` | string | Worklog entry ID | +| ↳ `author` | object | author output from the tool | +| ↳ `displayName` | string | Worklog author display name | +| ↳ `accountId` | string | Worklog author account ID | +| ↳ `emailAddress` | string | Worklog author email address | +| ↳ `updateAuthor` | object | updateAuthor output from the tool | +| ↳ `displayName` | string | Display name of the user who last updated the worklog | +| ↳ `accountId` | string | Account ID of the user who last updated the worklog | +| ↳ `timeSpent` | string | Time spent \(e.g., "2h 30m"\) | +| ↳ `timeSpentSeconds` | number | Time spent in seconds | +| ↳ `comment` | string | Worklog comment/description | +| ↳ `started` | string | When the work was started \(ISO format\) | +| ↳ `created` | string | When the worklog entry was created \(ISO format\) | +| ↳ `updated` | string | When the worklog entry was last updated \(ISO format\) | +| ↳ `issueId` | string | ID of the issue this worklog belongs to | +| ↳ `self` | string | REST API URL for this worklog entry | + + +--- + +### Jira Worklog Deleted + +Trigger workflow when a worklog entry is deleted from a Jira issue + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which worklog deletions trigger this workflow using JQL | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | +| `issue` | object | issue output from the tool | +| ↳ `id` | string | Jira issue ID | +| ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | +| ↳ `self` | string | REST API URL for this issue | +| ↳ `fields` | object | fields output from the tool | +| ↳ `votes` | json | Votes on this issue | +| ↳ `labels` | array | Array of labels applied to this issue | +| ↳ `status` | object | status output from the tool | +| ↳ `name` | string | Status name | +| ↳ `id` | string | Status ID | +| ↳ `statusCategory` | json | Status category information | +| ↳ `created` | string | Issue creation date \(ISO format\) | +| ↳ `creator` | object | creator output from the tool | +| ↳ `displayName` | string | Creator display name | +| ↳ `accountId` | string | Creator account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `duedate` | string | Due date for the issue | +| ↳ `project` | object | project output from the tool | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `id` | string | Project ID | +| ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | +| ↳ `updated` | string | Last updated date \(ISO format\) | +| ↳ `watches` | json | Watchers information | +| ↳ `assignee` | object | assignee output from the tool | +| ↳ `displayName` | string | Assignee display name | +| ↳ `accountId` | string | Assignee account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `priority` | object | priority output from the tool | +| ↳ `name` | string | Priority name | +| ↳ `id` | string | Priority ID | +| ↳ `progress` | json | Progress tracking information | +| ↳ `reporter` | object | reporter output from the tool | +| ↳ `displayName` | string | Reporter display name | +| ↳ `accountId` | string | Reporter account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `security` | string | Security level | +| ↳ `subtasks` | array | Array of subtask objects | +| ↳ `versions` | array | Array of affected versions | +| ↳ `issuetype` | object | issuetype output from the tool | +| ↳ `name` | string | Issue type name | +| ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | +| `worklog` | object | worklog output from the tool | +| ↳ `id` | string | Worklog entry ID | +| ↳ `author` | object | author output from the tool | +| ↳ `displayName` | string | Worklog author display name | +| ↳ `accountId` | string | Worklog author account ID | +| ↳ `emailAddress` | string | Worklog author email address | +| ↳ `updateAuthor` | object | updateAuthor output from the tool | +| ↳ `displayName` | string | Display name of the user who last updated the worklog | +| ↳ `accountId` | string | Account ID of the user who last updated the worklog | +| ↳ `timeSpent` | string | Time spent \(e.g., "2h 30m"\) | +| ↳ `timeSpentSeconds` | number | Time spent in seconds | +| ↳ `comment` | string | Worklog comment/description | +| ↳ `started` | string | When the work was started \(ISO format\) | +| ↳ `created` | string | When the worklog entry was created \(ISO format\) | +| ↳ `updated` | string | When the worklog entry was last updated \(ISO format\) | +| ↳ `issueId` | string | ID of the issue this worklog belongs to | +| ↳ `self` | string | REST API URL for this worklog entry | + + +--- + +### Jira Worklog Updated + +Trigger workflow when a worklog entry is updated on a Jira issue + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which worklog updates trigger this workflow using JQL | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, comment_created, worklog_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| ↳ `emailAddress` | string | Email address of the user who triggered the event | | `issue` | object | issue output from the tool | | ↳ `id` | string | Jira issue ID | | ↳ `key` | string | Jira issue key \(e.g., PROJ-123\) | @@ -352,19 +923,20 @@ Trigger workflow when time is logged on a Jira issue | ↳ `creator` | object | creator output from the tool | | ↳ `displayName` | string | Creator display name | | ↳ `accountId` | string | Creator account ID | -| ↳ `emailAddress` | string | Creator email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `duedate` | string | Due date for the issue | | ↳ `project` | object | project output from the tool | | ↳ `key` | string | Project key | | ↳ `name` | string | Project name | | ↳ `id` | string | Project ID | | ↳ `summary` | string | Issue summary/title | +| ↳ `description` | json | Issue description in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | | ↳ `updated` | string | Last updated date \(ISO format\) | | ↳ `watches` | json | Watchers information | | ↳ `assignee` | object | assignee output from the tool | | ↳ `displayName` | string | Assignee display name | | ↳ `accountId` | string | Assignee account ID | -| ↳ `emailAddress` | string | Assignee email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `priority` | object | priority output from the tool | | ↳ `name` | string | Priority name | | ↳ `id` | string | Priority ID | @@ -372,21 +944,33 @@ Trigger workflow when time is logged on a Jira issue | ↳ `reporter` | object | reporter output from the tool | | ↳ `displayName` | string | Reporter display name | | ↳ `accountId` | string | Reporter account ID | -| ↳ `emailAddress` | string | Reporter email address | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | | ↳ `security` | string | Security level | | ↳ `subtasks` | array | Array of subtask objects | | ↳ `versions` | array | Array of affected versions | | ↳ `issuetype` | object | issuetype output from the tool | | ↳ `name` | string | Issue type name | | ↳ `id` | string | Issue type ID | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| ↳ `components` | array | Array of component objects associated with this issue | +| ↳ `fixVersions` | array | Array of fix version objects for this issue | | `worklog` | object | worklog output from the tool | | ↳ `id` | string | Worklog entry ID | | ↳ `author` | object | author output from the tool | | ↳ `displayName` | string | Worklog author display name | | ↳ `accountId` | string | Worklog author account ID | | ↳ `emailAddress` | string | Worklog author email address | +| ↳ `updateAuthor` | object | updateAuthor output from the tool | +| ↳ `displayName` | string | Display name of the user who last updated the worklog | +| ↳ `accountId` | string | Account ID of the user who last updated the worklog | | ↳ `timeSpent` | string | Time spent \(e.g., "2h 30m"\) | | ↳ `timeSpentSeconds` | number | Time spent in seconds | | ↳ `comment` | string | Worklog comment/description | | ↳ `started` | string | When the work was started \(ISO format\) | +| ↳ `created` | string | When the worklog entry was created \(ISO format\) | +| ↳ `updated` | string | When the worklog entry was last updated \(ISO format\) | +| ↳ `issueId` | string | ID of the issue this worklog belongs to | +| ↳ `self` | string | REST API URL for this worklog entry | diff --git a/apps/docs/content/docs/en/triggers/jsm.mdx b/apps/docs/content/docs/en/triggers/jsm.mdx new file mode 100644 index 00000000000..6aabf82cade --- /dev/null +++ b/apps/docs/content/docs/en/triggers/jsm.mdx @@ -0,0 +1,314 @@ +--- +title: Jsm +description: Available Jsm triggers for automating workflows +--- + +import { BlockInfoCard } from "@/components/ui/block-info-card" + + + +Jsm provides 5 triggers for automating workflows based on events. + +## Triggers + +### JSM Request Commented + +Trigger workflow when a comment is added to a Jira Service Management request + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which service desk requests trigger this workflow using JQL \(Jira Query Language\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, jira:issue_updated, comment_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| `issue` | object | issue output from the tool | +| ↳ `id` | string | Jira issue ID | +| ↳ `key` | string | Issue key \(e.g., SD-123\) | +| ↳ `self` | string | REST API URL for this issue | +| ↳ `fields` | object | fields output from the tool | +| ↳ `summary` | string | Request summary/title | +| ↳ `status` | object | status output from the tool | +| ↳ `name` | string | Current status name | +| ↳ `id` | string | Status ID | +| ↳ `statusCategory` | json | Status category information | +| ↳ `priority` | object | priority output from the tool | +| ↳ `name` | string | Priority name | +| ↳ `id` | string | Priority ID | +| ↳ `issuetype` | object | issuetype output from the tool | +| ↳ `name` | string | Issue type name \(e.g., Service Request, Incident\) | +| ↳ `id` | string | Issue type ID | +| ↳ `project` | object | project output from the tool | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `id` | string | Project ID | +| ↳ `reporter` | object | reporter output from the tool | +| ↳ `displayName` | string | Reporter display name | +| ↳ `accountId` | string | Reporter account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `assignee` | object | assignee output from the tool | +| ↳ `displayName` | string | Assignee display name | +| ↳ `accountId` | string | Assignee account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `creator` | object | creator output from the tool | +| ↳ `displayName` | string | Creator display name | +| ↳ `accountId` | string | Creator account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `created` | string | Request creation date \(ISO format\) | +| ↳ `updated` | string | Last updated date \(ISO format\) | +| ↳ `duedate` | string | Due date for the request | +| ↳ `labels` | array | Array of labels applied to this request | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| `comment` | object | comment output from the tool | +| ↳ `id` | string | Comment ID | +| ↳ `body` | json | Comment body in Atlassian Document Format \(ADF\). On Jira Server this may be a plain string. | +| ↳ `author` | object | author output from the tool | +| ↳ `displayName` | string | Comment author display name | +| ↳ `accountId` | string | Comment author account ID | +| ↳ `emailAddress` | string | Comment author email address | +| ↳ `updateAuthor` | object | updateAuthor output from the tool | +| ↳ `displayName` | string | Display name of the user who last updated the comment | +| ↳ `accountId` | string | Account ID of the user who last updated the comment | +| ↳ `created` | string | Comment creation date \(ISO format\) | +| ↳ `updated` | string | Comment last updated date \(ISO format\) | + + +--- + +### JSM Request Created + +Trigger workflow when a new service request is created in Jira Service Management + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which service desk requests trigger this workflow using JQL \(Jira Query Language\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, jira:issue_updated, comment_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| `issue` | object | issue output from the tool | +| ↳ `id` | string | Jira issue ID | +| ↳ `key` | string | Issue key \(e.g., SD-123\) | +| ↳ `self` | string | REST API URL for this issue | +| ↳ `fields` | object | fields output from the tool | +| ↳ `summary` | string | Request summary/title | +| ↳ `status` | object | status output from the tool | +| ↳ `name` | string | Current status name | +| ↳ `id` | string | Status ID | +| ↳ `statusCategory` | json | Status category information | +| ↳ `priority` | object | priority output from the tool | +| ↳ `name` | string | Priority name | +| ↳ `id` | string | Priority ID | +| ↳ `issuetype` | object | issuetype output from the tool | +| ↳ `name` | string | Issue type name \(e.g., Service Request, Incident\) | +| ↳ `id` | string | Issue type ID | +| ↳ `project` | object | project output from the tool | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `id` | string | Project ID | +| ↳ `reporter` | object | reporter output from the tool | +| ↳ `displayName` | string | Reporter display name | +| ↳ `accountId` | string | Reporter account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `assignee` | object | assignee output from the tool | +| ↳ `displayName` | string | Assignee display name | +| ↳ `accountId` | string | Assignee account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `creator` | object | creator output from the tool | +| ↳ `displayName` | string | Creator display name | +| ↳ `accountId` | string | Creator account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `created` | string | Request creation date \(ISO format\) | +| ↳ `updated` | string | Last updated date \(ISO format\) | +| ↳ `duedate` | string | Due date for the request | +| ↳ `labels` | array | Array of labels applied to this request | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| `issue_event_type_name` | string | Issue event type name from Jira | + + +--- + +### JSM Request Resolved + +Trigger workflow when a service request is resolved in Jira Service Management + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which service desk requests trigger this workflow using JQL \(Jira Query Language\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, jira:issue_updated, comment_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| `issue` | object | issue output from the tool | +| ↳ `id` | string | Jira issue ID | +| ↳ `key` | string | Issue key \(e.g., SD-123\) | +| ↳ `self` | string | REST API URL for this issue | +| ↳ `fields` | object | fields output from the tool | +| ↳ `summary` | string | Request summary/title | +| ↳ `status` | object | status output from the tool | +| ↳ `name` | string | Current status name | +| ↳ `id` | string | Status ID | +| ↳ `statusCategory` | json | Status category information | +| ↳ `priority` | object | priority output from the tool | +| ↳ `name` | string | Priority name | +| ↳ `id` | string | Priority ID | +| ↳ `issuetype` | object | issuetype output from the tool | +| ↳ `name` | string | Issue type name \(e.g., Service Request, Incident\) | +| ↳ `id` | string | Issue type ID | +| ↳ `project` | object | project output from the tool | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `id` | string | Project ID | +| ↳ `reporter` | object | reporter output from the tool | +| ↳ `displayName` | string | Reporter display name | +| ↳ `accountId` | string | Reporter account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `assignee` | object | assignee output from the tool | +| ↳ `displayName` | string | Assignee display name | +| ↳ `accountId` | string | Assignee account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `creator` | object | creator output from the tool | +| ↳ `displayName` | string | Creator display name | +| ↳ `accountId` | string | Creator account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `created` | string | Request creation date \(ISO format\) | +| ↳ `updated` | string | Last updated date \(ISO format\) | +| ↳ `duedate` | string | Due date for the request | +| ↳ `labels` | array | Array of labels applied to this request | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| `issue_event_type_name` | string | Issue event type name from Jira | +| `changelog` | object | changelog output from the tool | +| ↳ `id` | string | Changelog ID | + + +--- + +### JSM Request Updated + +Trigger workflow when a service request is updated in Jira Service Management + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which service desk requests trigger this workflow using JQL \(Jira Query Language\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `webhookEvent` | string | The webhook event type \(e.g., jira:issue_created, jira:issue_updated, comment_created\) | +| `timestamp` | number | Timestamp of the webhook event | +| `user` | object | user output from the tool | +| ↳ `displayName` | string | Display name of the user who triggered the event | +| ↳ `accountId` | string | Account ID of the user who triggered the event | +| `issue` | object | issue output from the tool | +| ↳ `id` | string | Jira issue ID | +| ↳ `key` | string | Issue key \(e.g., SD-123\) | +| ↳ `self` | string | REST API URL for this issue | +| ↳ `fields` | object | fields output from the tool | +| ↳ `summary` | string | Request summary/title | +| ↳ `status` | object | status output from the tool | +| ↳ `name` | string | Current status name | +| ↳ `id` | string | Status ID | +| ↳ `statusCategory` | json | Status category information | +| ↳ `priority` | object | priority output from the tool | +| ↳ `name` | string | Priority name | +| ↳ `id` | string | Priority ID | +| ↳ `issuetype` | object | issuetype output from the tool | +| ↳ `name` | string | Issue type name \(e.g., Service Request, Incident\) | +| ↳ `id` | string | Issue type ID | +| ↳ `project` | object | project output from the tool | +| ↳ `key` | string | Project key | +| ↳ `name` | string | Project name | +| ↳ `id` | string | Project ID | +| ↳ `reporter` | object | reporter output from the tool | +| ↳ `displayName` | string | Reporter display name | +| ↳ `accountId` | string | Reporter account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `assignee` | object | assignee output from the tool | +| ↳ `displayName` | string | Assignee display name | +| ↳ `accountId` | string | Assignee account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `creator` | object | creator output from the tool | +| ↳ `displayName` | string | Creator display name | +| ↳ `accountId` | string | Creator account ID | +| ↳ `emailAddress` | string | Email address \(Jira Server only — not available in Jira Cloud webhook payloads\) | +| ↳ `created` | string | Request creation date \(ISO format\) | +| ↳ `updated` | string | Last updated date \(ISO format\) | +| ↳ `duedate` | string | Due date for the request | +| ↳ `labels` | array | Array of labels applied to this request | +| ↳ `resolution` | object | resolution output from the tool | +| ↳ `name` | string | Resolution name \(e.g., Done, Fixed\) | +| ↳ `id` | string | Resolution ID | +| `issue_event_type_name` | string | Issue event type name from Jira | +| `changelog` | object | changelog output from the tool | +| ↳ `id` | string | Changelog ID | + + +--- + +### JSM Webhook (All Events) + +Trigger workflow on any Jira Service Management webhook event + +#### Configuration + +| Parameter | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `webhookSecret` | string | No | Optional secret to validate webhook deliveries from Jira using HMAC signature | +| `jqlFilter` | string | No | Filter which service desk requests trigger this workflow using JQL \(Jira Query Language\) | + +#### Output + +| Parameter | Type | Description | +| --------- | ---- | ----------- | +| `changelog` | object | changelog output from the tool | +| ↳ `id` | string | Changelog ID | +| `comment` | object | comment output from the tool | +| ↳ `id` | string | Comment ID | +| ↳ `body` | string | Comment text/body | +| ↳ `author` | object | author output from the tool | +| ↳ `displayName` | string | Comment author display name | +| ↳ `accountId` | string | Comment author account ID | +| ↳ `emailAddress` | string | Comment author email address | +| ↳ `created` | string | Comment creation date \(ISO format\) | +| ↳ `updated` | string | Comment last updated date \(ISO format\) | + diff --git a/apps/docs/content/docs/en/triggers/meta.json b/apps/docs/content/docs/en/triggers/meta.json index d04467626b1..dee4f37eda8 100644 --- a/apps/docs/content/docs/en/triggers/meta.json +++ b/apps/docs/content/docs/en/triggers/meta.json @@ -27,6 +27,7 @@ "imap", "intercom", "jira", + "jsm", "lemlist", "linear", "microsoft-teams", diff --git a/apps/sim/app/(landing)/integrations/data/integrations.json b/apps/sim/app/(landing)/integrations/data/integrations.json index 7a2f6cd107f..5caf72bffdb 100644 --- a/apps/sim/app/(landing)/integrations/data/integrations.json +++ b/apps/sim/app/(landing)/integrations/data/integrations.json @@ -2522,6 +2522,16 @@ "name": "Confluence Page Moved", "description": "Trigger workflow when a page is moved in Confluence" }, + { + "id": "confluence_page_restored", + "name": "Confluence Page Restored", + "description": "Trigger workflow when a page is restored from trash in Confluence" + }, + { + "id": "confluence_page_permissions_updated", + "name": "Confluence Page Permissions Updated", + "description": "Trigger workflow when page permissions are changed in Confluence" + }, { "id": "confluence_comment_created", "name": "Confluence Comment Created", @@ -2532,6 +2542,11 @@ "name": "Confluence Comment Removed", "description": "Trigger workflow when a comment is removed in Confluence" }, + { + "id": "confluence_comment_updated", + "name": "Confluence Comment Updated", + "description": "Trigger workflow when a comment is updated in Confluence" + }, { "id": "confluence_blog_created", "name": "Confluence Blog Post Created", @@ -2547,6 +2562,11 @@ "name": "Confluence Blog Post Removed", "description": "Trigger workflow when a blog post is removed in Confluence" }, + { + "id": "confluence_blog_restored", + "name": "Confluence Blog Post Restored", + "description": "Trigger workflow when a blog post is restored from trash in Confluence" + }, { "id": "confluence_attachment_created", "name": "Confluence Attachment Created", @@ -2557,6 +2577,11 @@ "name": "Confluence Attachment Removed", "description": "Trigger workflow when an attachment is removed in Confluence" }, + { + "id": "confluence_attachment_updated", + "name": "Confluence Attachment Updated", + "description": "Trigger workflow when an attachment is updated in Confluence" + }, { "id": "confluence_space_created", "name": "Confluence Space Created", @@ -2567,6 +2592,11 @@ "name": "Confluence Space Updated", "description": "Trigger workflow when a space is updated in Confluence" }, + { + "id": "confluence_space_removed", + "name": "Confluence Space Removed", + "description": "Trigger workflow when a space is removed in Confluence" + }, { "id": "confluence_label_added", "name": "Confluence Label Added", @@ -2577,13 +2607,18 @@ "name": "Confluence Label Removed", "description": "Trigger workflow when a label is removed from content in Confluence" }, + { + "id": "confluence_user_created", + "name": "Confluence User Created", + "description": "Trigger workflow when a new user is added to Confluence" + }, { "id": "confluence_webhook", "name": "Confluence Webhook (All Events)", "description": "Trigger workflow on any Confluence webhook event" } ], - "triggerCount": 16, + "triggerCount": 23, "authType": "oauth", "category": "tools", "integrationTypes": ["documents", "productivity", "search"], @@ -6797,18 +6832,63 @@ "name": "Jira Issue Commented", "description": "Trigger workflow when a comment is added to a Jira issue" }, + { + "id": "jira_comment_updated", + "name": "Jira Comment Updated", + "description": "Trigger workflow when a comment is updated on a Jira issue" + }, + { + "id": "jira_comment_deleted", + "name": "Jira Comment Deleted", + "description": "Trigger workflow when a comment is deleted from a Jira issue" + }, { "id": "jira_worklog_created", "name": "Jira Worklog Created", "description": "Trigger workflow when time is logged on a Jira issue" }, + { + "id": "jira_worklog_updated", + "name": "Jira Worklog Updated", + "description": "Trigger workflow when a worklog entry is updated on a Jira issue" + }, + { + "id": "jira_worklog_deleted", + "name": "Jira Worklog Deleted", + "description": "Trigger workflow when a worklog entry is deleted from a Jira issue" + }, + { + "id": "jira_sprint_created", + "name": "Jira Sprint Created", + "description": "Trigger workflow when a sprint is created in Jira" + }, + { + "id": "jira_sprint_started", + "name": "Jira Sprint Started", + "description": "Trigger workflow when a sprint is started in Jira" + }, + { + "id": "jira_sprint_closed", + "name": "Jira Sprint Closed", + "description": "Trigger workflow when a sprint is closed in Jira" + }, + { + "id": "jira_project_created", + "name": "Jira Project Created", + "description": "Trigger workflow when a project is created in Jira" + }, + { + "id": "jira_version_released", + "name": "Jira Version Released", + "description": "Trigger workflow when a version is released in Jira" + }, { "id": "jira_webhook", "name": "Jira Webhook (All Events)", "description": "Trigger workflow on any Jira webhook event" } ], - "triggerCount": 6, + "triggerCount": 15, "authType": "oauth", "category": "tools", "integrationTypes": ["productivity", "customer-support"], @@ -6962,8 +7042,34 @@ } ], "operationCount": 34, - "triggers": [], - "triggerCount": 0, + "triggers": [ + { + "id": "jsm_request_created", + "name": "JSM Request Created", + "description": "Trigger workflow when a new service request is created in Jira Service Management" + }, + { + "id": "jsm_request_updated", + "name": "JSM Request Updated", + "description": "Trigger workflow when a service request is updated in Jira Service Management" + }, + { + "id": "jsm_request_commented", + "name": "JSM Request Commented", + "description": "Trigger workflow when a comment is added to a Jira Service Management request" + }, + { + "id": "jsm_request_resolved", + "name": "JSM Request Resolved", + "description": "Trigger workflow when a service request is resolved in Jira Service Management" + }, + { + "id": "jsm_webhook", + "name": "JSM Webhook (All Events)", + "description": "Trigger workflow on any Jira Service Management webhook event" + } + ], + "triggerCount": 5, "authType": "oauth", "category": "tools", "integrationTypes": ["customer-support", "developer-tools", "productivity"], diff --git a/apps/sim/blocks/blocks/confluence.ts b/apps/sim/blocks/blocks/confluence.ts index e66efd70a08..81ab5c02c7a 100644 --- a/apps/sim/blocks/blocks/confluence.ts +++ b/apps/sim/blocks/blocks/confluence.ts @@ -979,17 +979,24 @@ export const ConfluenceV2Block: BlockConfig = { ...getTrigger('confluence_page_updated').subBlocks, ...getTrigger('confluence_page_removed').subBlocks, ...getTrigger('confluence_page_moved').subBlocks, + ...getTrigger('confluence_page_restored').subBlocks, + ...getTrigger('confluence_page_permissions_updated').subBlocks, ...getTrigger('confluence_comment_created').subBlocks, ...getTrigger('confluence_comment_removed').subBlocks, + ...getTrigger('confluence_comment_updated').subBlocks, ...getTrigger('confluence_blog_created').subBlocks, ...getTrigger('confluence_blog_updated').subBlocks, ...getTrigger('confluence_blog_removed').subBlocks, + ...getTrigger('confluence_blog_restored').subBlocks, ...getTrigger('confluence_attachment_created').subBlocks, ...getTrigger('confluence_attachment_removed').subBlocks, + ...getTrigger('confluence_attachment_updated').subBlocks, ...getTrigger('confluence_space_created').subBlocks, ...getTrigger('confluence_space_updated').subBlocks, + ...getTrigger('confluence_space_removed').subBlocks, ...getTrigger('confluence_label_added').subBlocks, ...getTrigger('confluence_label_removed').subBlocks, + ...getTrigger('confluence_user_created').subBlocks, ...getTrigger('confluence_webhook').subBlocks, ], triggers: { @@ -999,17 +1006,24 @@ export const ConfluenceV2Block: BlockConfig = { 'confluence_page_updated', 'confluence_page_removed', 'confluence_page_moved', + 'confluence_page_restored', + 'confluence_page_permissions_updated', 'confluence_comment_created', 'confluence_comment_removed', + 'confluence_comment_updated', 'confluence_blog_created', 'confluence_blog_updated', 'confluence_blog_removed', + 'confluence_blog_restored', 'confluence_attachment_created', 'confluence_attachment_removed', + 'confluence_attachment_updated', 'confluence_space_created', 'confluence_space_updated', + 'confluence_space_removed', 'confluence_label_added', 'confluence_label_removed', + 'confluence_user_created', 'confluence_webhook', ], }, diff --git a/apps/sim/blocks/blocks/jira.ts b/apps/sim/blocks/blocks/jira.ts index b1eaf339d14..e1d8e6d206b 100644 --- a/apps/sim/blocks/blocks/jira.ts +++ b/apps/sim/blocks/blocks/jira.ts @@ -702,7 +702,16 @@ Return ONLY the comment text - no explanations.`, ...getTrigger('jira_issue_updated').subBlocks, ...getTrigger('jira_issue_deleted').subBlocks, ...getTrigger('jira_issue_commented').subBlocks, + ...getTrigger('jira_comment_updated').subBlocks, + ...getTrigger('jira_comment_deleted').subBlocks, ...getTrigger('jira_worklog_created').subBlocks, + ...getTrigger('jira_worklog_updated').subBlocks, + ...getTrigger('jira_worklog_deleted').subBlocks, + ...getTrigger('jira_sprint_created').subBlocks, + ...getTrigger('jira_sprint_started').subBlocks, + ...getTrigger('jira_sprint_closed').subBlocks, + ...getTrigger('jira_project_created').subBlocks, + ...getTrigger('jira_version_released').subBlocks, ...getTrigger('jira_webhook').subBlocks, ], tools: { @@ -1268,6 +1277,9 @@ Return ONLY the comment text - no explanations.`, time_spent: { type: 'string', description: 'Time spent (for worklog events)' }, changelog: { type: 'json', description: 'Changelog object (for update events)' }, issue: { type: 'json', description: 'Complete issue object from webhook' }, + sprint: { type: 'json', description: 'Sprint object (for sprint events)' }, + project: { type: 'json', description: 'Project object (for project events)' }, + version: { type: 'json', description: 'Version object (for version events)' }, jira: { type: 'json', description: 'Complete webhook payload' }, user: { type: 'json', description: 'User object who triggered the event' }, webhook: { type: 'json', description: 'Webhook metadata' }, @@ -1279,7 +1291,16 @@ Return ONLY the comment text - no explanations.`, 'jira_issue_updated', 'jira_issue_deleted', 'jira_issue_commented', + 'jira_comment_updated', + 'jira_comment_deleted', 'jira_worklog_created', + 'jira_worklog_updated', + 'jira_worklog_deleted', + 'jira_sprint_created', + 'jira_sprint_started', + 'jira_sprint_closed', + 'jira_project_created', + 'jira_version_released', 'jira_webhook', ], }, diff --git a/apps/sim/blocks/blocks/jira_service_management.ts b/apps/sim/blocks/blocks/jira_service_management.ts index 9c75d4c0e4b..3a9ed8c07a1 100644 --- a/apps/sim/blocks/blocks/jira_service_management.ts +++ b/apps/sim/blocks/blocks/jira_service_management.ts @@ -3,6 +3,7 @@ import { getScopesForService } from '@/lib/oauth/utils' import type { BlockConfig } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' import type { JsmResponse } from '@/tools/jsm/types' +import { getTrigger } from '@/triggers' export const JiraServiceManagementBlock: BlockConfig = { type: 'jira_service_management', @@ -564,6 +565,11 @@ Return ONLY the comment text - no explanations.`, ], }, }, + ...getTrigger('jsm_request_created').subBlocks, + ...getTrigger('jsm_request_updated').subBlocks, + ...getTrigger('jsm_request_commented').subBlocks, + ...getTrigger('jsm_request_resolved').subBlocks, + ...getTrigger('jsm_webhook').subBlocks, ], tools: { access: [ @@ -1246,4 +1252,14 @@ Return ONLY the comment text - no explanations.`, sourceIssueIdOrKey: { type: 'string', description: 'Source issue ID or key' }, targetIssueIdOrKey: { type: 'string', description: 'Target issue ID or key' }, }, + triggers: { + enabled: true, + available: [ + 'jsm_request_created', + 'jsm_request_updated', + 'jsm_request_commented', + 'jsm_request_resolved', + 'jsm_webhook', + ], + }, } diff --git a/apps/sim/lib/core/idempotency/service.ts b/apps/sim/lib/core/idempotency/service.ts index b9920f49e81..5f19d4c89de 100644 --- a/apps/sim/lib/core/idempotency/service.ts +++ b/apps/sim/lib/core/idempotency/service.ts @@ -454,6 +454,7 @@ export class IdempotencyService { normalizedHeaders?.['linear-delivery'] || normalizedHeaders?.['greenhouse-event-id'] || normalizedHeaders?.['x-zm-request-id'] || + normalizedHeaders?.['x-atlassian-webhook-identifier'] || normalizedHeaders?.['idempotency-key'] if (webhookIdHeader) { diff --git a/apps/sim/lib/webhooks/providers/confluence.ts b/apps/sim/lib/webhooks/providers/confluence.ts index 79fda7c0529..cfb35bf920f 100644 --- a/apps/sim/lib/webhooks/providers/confluence.ts +++ b/apps/sim/lib/webhooks/providers/confluence.ts @@ -27,6 +27,8 @@ export const confluenceHandler: WebhookProviderHandler = { extractAttachmentData, extractSpaceData, extractLabelData, + extractPagePermissionsData, + extractUserData, } = await import('@/triggers/confluence/utils') const providerConfig = (webhook.providerConfig as Record) || {} const triggerId = providerConfig.triggerId as string | undefined @@ -45,6 +47,12 @@ export const confluenceHandler: WebhookProviderHandler = { if (triggerId?.startsWith('confluence_label_')) { return { input: extractLabelData(body) } } + if (triggerId === 'confluence_page_permissions_updated') { + return { input: extractPagePermissionsData(body as Record) } + } + if (triggerId === 'confluence_user_created') { + return { input: extractUserData(body as Record) } + } if (triggerId === 'confluence_webhook') { const b = body as Record return { @@ -59,12 +67,35 @@ export const confluenceHandler: WebhookProviderHandler = { space: b.space || null, label: b.label || null, content: b.content || null, + user: b.user || null, }, } } return { input: extractPageData(body) } }, + extractIdempotencyId(body: unknown) { + const obj = body as Record + const event = obj.event as string | undefined + const timestamp = obj.timestamp ?? '' + const page = obj.page as Record | undefined + const comment = obj.comment as Record | undefined + const attachment = obj.attachment as Record | undefined + const blog = (obj.blog || obj.blogpost) as Record | undefined + const space = obj.space as Record | undefined + const user = obj.user as Record | undefined + + const entityId = + comment?.id || attachment?.id || blog?.id || page?.id || space?.id || user?.accountId + if (event && entityId) { + return `confluence:${event}:${entityId}:${timestamp}` + } + if (event && timestamp) { + return `confluence:${event}:${timestamp}` + } + return null + }, + async matchEvent({ webhook, workflow, body, requestId, providerConfig }: EventMatchContext) { const triggerId = providerConfig.triggerId as string | undefined const obj = body as Record diff --git a/apps/sim/lib/webhooks/providers/jira.ts b/apps/sim/lib/webhooks/providers/jira.ts index 1520238d11e..0b5a80f073f 100644 --- a/apps/sim/lib/webhooks/providers/jira.ts +++ b/apps/sim/lib/webhooks/providers/jira.ts @@ -30,11 +30,8 @@ export function validateJiraSignature(secret: string, signature: string, body: s const providedSignature = signature.substring(7) const computedHash = crypto.createHmac('sha256', secret).update(body, 'utf8').digest('hex') logger.debug('Jira signature comparison', { - computedSignature: `${computedHash.substring(0, 10)}...`, - providedSignature: `${providedSignature.substring(0, 10)}...`, computedLength: computedHash.length, providedLength: providedSignature.length, - match: computedHash === providedSignature, }) return safeCompare(computedHash, providedSignature) } catch (error) { @@ -52,17 +49,64 @@ export const jiraHandler: WebhookProviderHandler = { }), async formatInput({ body, webhook }: FormatInputContext): Promise { - const { extractIssueData, extractCommentData, extractWorklogData } = await import( - '@/triggers/jira/utils' - ) + const { + extractIssueData, + extractCommentData, + extractWorklogData, + extractSprintData, + extractProjectData, + extractVersionData, + } = await import('@/triggers/jira/utils') const providerConfig = (webhook.providerConfig as Record) || {} const triggerId = providerConfig.triggerId as string | undefined - if (triggerId === 'jira_issue_commented') { + + if ( + triggerId === 'jira_issue_commented' || + triggerId === 'jira_comment_updated' || + triggerId === 'jira_comment_deleted' + ) { return { input: extractCommentData(body) } } - if (triggerId === 'jira_worklog_created') { + if ( + triggerId === 'jira_worklog_created' || + triggerId === 'jira_worklog_updated' || + triggerId === 'jira_worklog_deleted' + ) { return { input: extractWorklogData(body) } } + if ( + triggerId === 'jira_sprint_created' || + triggerId === 'jira_sprint_started' || + triggerId === 'jira_sprint_closed' + ) { + return { input: extractSprintData(body) } + } + if (triggerId === 'jira_project_created') { + return { input: extractProjectData(body) } + } + if (triggerId === 'jira_version_released') { + return { input: extractVersionData(body) } + } + + if (!triggerId || triggerId === 'jira_webhook') { + const obj = body as Record + return { + input: { + webhookEvent: obj.webhookEvent, + timestamp: obj.timestamp, + user: obj.user || null, + issue_event_type_name: obj.issue_event_type_name, + issue: obj.issue || {}, + changelog: obj.changelog, + comment: obj.comment, + worklog: obj.worklog, + sprint: obj.sprint, + project: obj.project, + version: obj.version, + }, + } + } + return { input: extractIssueData(body) } }, @@ -95,9 +139,16 @@ export const jiraHandler: WebhookProviderHandler = { extractIdempotencyId(body: unknown) { const obj = body as Record const issue = obj.issue as Record | undefined + const comment = obj.comment as Record | undefined + const worklog = obj.worklog as Record | undefined const project = obj.project as Record | undefined - if (obj.webhookEvent && (issue?.id || project?.id)) { - return `${obj.webhookEvent}:${issue?.id || project?.id}` + const sprint = obj.sprint as Record | undefined + const version = obj.version as Record | undefined + const entityId = + comment?.id || worklog?.id || issue?.id || project?.id || sprint?.id || version?.id + if (obj.webhookEvent && entityId) { + const ts = obj.timestamp ?? '' + return `${obj.webhookEvent}:${entityId}:${ts}` } return null }, diff --git a/apps/sim/lib/webhooks/providers/jsm.ts b/apps/sim/lib/webhooks/providers/jsm.ts new file mode 100644 index 00000000000..9d1a785f904 --- /dev/null +++ b/apps/sim/lib/webhooks/providers/jsm.ts @@ -0,0 +1,96 @@ +import { createLogger } from '@sim/logger' +import { validateJiraSignature } from '@/lib/webhooks/providers/jira' +import type { + EventMatchContext, + FormatInputContext, + FormatInputResult, + WebhookProviderHandler, +} from '@/lib/webhooks/providers/types' +import { createHmacVerifier } from '@/lib/webhooks/providers/utils' + +const logger = createLogger('WebhookProvider:JSM') + +/** + * Jira Service Management webhook handler. + * + * JSM uses the Jira webhook infrastructure. The handler reuses the same HMAC + * signature validation as Jira and adds JSM-specific event matching logic + * to route events to the correct trigger based on event type and changelog context. + */ +export const jsmHandler: WebhookProviderHandler = { + verifyAuth: createHmacVerifier({ + configKey: 'webhookSecret', + headerName: 'X-Hub-Signature', + validateFn: validateJiraSignature, + providerLabel: 'JSM', + }), + + async formatInput({ body, webhook }: FormatInputContext): Promise { + const { extractRequestData, extractCommentData } = await import('@/triggers/jsm/utils') + const providerConfig = (webhook.providerConfig as Record) || {} + const triggerId = providerConfig.triggerId as string | undefined + + if (triggerId === 'jsm_request_commented') { + return { input: extractCommentData(body as Record) } + } + + // For the generic webhook, pass through the full payload so no data is lost + if (!triggerId || triggerId === 'jsm_webhook') { + const obj = body as Record + return { + input: { + webhookEvent: obj.webhookEvent, + timestamp: obj.timestamp, + user: obj.user || null, + issue_event_type_name: obj.issue_event_type_name, + issue: obj.issue || {}, + changelog: obj.changelog, + comment: obj.comment, + }, + } + } + + return { input: extractRequestData(body as Record) } + }, + + async matchEvent({ webhook, workflow, body, requestId, providerConfig }: EventMatchContext) { + const triggerId = providerConfig.triggerId as string | undefined + const obj = body as Record + + if (triggerId && triggerId !== 'jsm_webhook') { + const webhookEvent = obj.webhookEvent as string | undefined + const issueEventTypeName = obj.issue_event_type_name as string | undefined + const changelog = obj.changelog as + | { items?: Array<{ field?: string; toString?: string }> } + | undefined + + const { isJsmEventMatch } = await import('@/triggers/jsm/utils') + if (!isJsmEventMatch(triggerId, webhookEvent || '', issueEventTypeName, changelog)) { + logger.debug( + `[${requestId}] JSM event mismatch for trigger ${triggerId}. Event: ${webhookEvent}. Skipping execution.`, + { + webhookId: webhook.id, + workflowId: workflow.id, + triggerId, + receivedEvent: webhookEvent, + } + ) + return false + } + } + + return true + }, + + extractIdempotencyId(body: unknown) { + const obj = body as Record + const comment = obj.comment as Record | undefined + const issue = obj.issue as Record | undefined + const entityId = comment?.id || issue?.id + if (obj.webhookEvent && entityId) { + const ts = obj.timestamp ?? '' + return `jsm:${obj.webhookEvent}:${entityId}:${ts}` + } + return null + }, +} diff --git a/apps/sim/lib/webhooks/providers/registry.ts b/apps/sim/lib/webhooks/providers/registry.ts index 332add6598f..d03be765f7c 100644 --- a/apps/sim/lib/webhooks/providers/registry.ts +++ b/apps/sim/lib/webhooks/providers/registry.ts @@ -20,6 +20,7 @@ import { hubspotHandler } from '@/lib/webhooks/providers/hubspot' import { imapHandler } from '@/lib/webhooks/providers/imap' import { intercomHandler } from '@/lib/webhooks/providers/intercom' import { jiraHandler } from '@/lib/webhooks/providers/jira' +import { jsmHandler } from '@/lib/webhooks/providers/jsm' import { lemlistHandler } from '@/lib/webhooks/providers/lemlist' import { linearHandler } from '@/lib/webhooks/providers/linear' import { microsoftTeamsHandler } from '@/lib/webhooks/providers/microsoft-teams' @@ -65,6 +66,7 @@ const PROVIDER_HANDLERS: Record = { imap: imapHandler, intercom: intercomHandler, jira: jiraHandler, + jsm: jsmHandler, lemlist: lemlistHandler, linear: linearHandler, resend: resendHandler, diff --git a/apps/sim/triggers/confluence/attachment_updated.ts b/apps/sim/triggers/confluence/attachment_updated.ts new file mode 100644 index 00000000000..47487554bc8 --- /dev/null +++ b/apps/sim/triggers/confluence/attachment_updated.ts @@ -0,0 +1,41 @@ +import { ConfluenceIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildAttachmentOutputs, + buildConfluenceAttachmentExtraFields, + confluenceSetupInstructions, + confluenceTriggerOptions, +} from '@/triggers/confluence/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Confluence Attachment Updated Trigger + * + * Triggers when an attachment is updated (new version uploaded) in Confluence. + */ +export const confluenceAttachmentUpdatedTrigger: TriggerConfig = { + id: 'confluence_attachment_updated', + name: 'Confluence Attachment Updated', + provider: 'confluence', + description: 'Trigger workflow when an attachment is updated in Confluence', + version: '1.0.0', + icon: ConfluenceIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'confluence_attachment_updated', + triggerOptions: confluenceTriggerOptions, + setupInstructions: confluenceSetupInstructions('attachment_updated'), + extraFields: buildConfluenceAttachmentExtraFields('confluence_attachment_updated'), + }), + + outputs: buildAttachmentOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/confluence/blog_restored.ts b/apps/sim/triggers/confluence/blog_restored.ts new file mode 100644 index 00000000000..6c66649407b --- /dev/null +++ b/apps/sim/triggers/confluence/blog_restored.ts @@ -0,0 +1,41 @@ +import { ConfluenceIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildBlogOutputs, + buildConfluenceExtraFields, + confluenceSetupInstructions, + confluenceTriggerOptions, +} from '@/triggers/confluence/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Confluence Blog Post Restored Trigger + * + * Triggers when a blog post is restored from trash in Confluence. + */ +export const confluenceBlogRestoredTrigger: TriggerConfig = { + id: 'confluence_blog_restored', + name: 'Confluence Blog Post Restored', + provider: 'confluence', + description: 'Trigger workflow when a blog post is restored from trash in Confluence', + version: '1.0.0', + icon: ConfluenceIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'confluence_blog_restored', + triggerOptions: confluenceTriggerOptions, + setupInstructions: confluenceSetupInstructions('blog_restored'), + extraFields: buildConfluenceExtraFields('confluence_blog_restored'), + }), + + outputs: buildBlogOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/confluence/comment_updated.ts b/apps/sim/triggers/confluence/comment_updated.ts new file mode 100644 index 00000000000..84c499fe106 --- /dev/null +++ b/apps/sim/triggers/confluence/comment_updated.ts @@ -0,0 +1,41 @@ +import { ConfluenceIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildCommentOutputs, + buildConfluenceExtraFields, + confluenceSetupInstructions, + confluenceTriggerOptions, +} from '@/triggers/confluence/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Confluence Comment Updated Trigger + * + * Triggers when a comment on a page or blog post is updated/edited in Confluence. + */ +export const confluenceCommentUpdatedTrigger: TriggerConfig = { + id: 'confluence_comment_updated', + name: 'Confluence Comment Updated', + provider: 'confluence', + description: 'Trigger workflow when a comment is updated in Confluence', + version: '1.0.0', + icon: ConfluenceIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'confluence_comment_updated', + triggerOptions: confluenceTriggerOptions, + setupInstructions: confluenceSetupInstructions('comment_updated'), + extraFields: buildConfluenceExtraFields('confluence_comment_updated'), + }), + + outputs: buildCommentOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/confluence/index.ts b/apps/sim/triggers/confluence/index.ts index ea5c16fa97d..4efe33e7cfd 100644 --- a/apps/sim/triggers/confluence/index.ts +++ b/apps/sim/triggers/confluence/index.ts @@ -5,17 +5,24 @@ export { confluenceAttachmentCreatedTrigger } from './attachment_created' export { confluenceAttachmentRemovedTrigger } from './attachment_removed' +export { confluenceAttachmentUpdatedTrigger } from './attachment_updated' export { confluenceBlogCreatedTrigger } from './blog_created' export { confluenceBlogRemovedTrigger } from './blog_removed' +export { confluenceBlogRestoredTrigger } from './blog_restored' export { confluenceBlogUpdatedTrigger } from './blog_updated' export { confluenceCommentCreatedTrigger } from './comment_created' export { confluenceCommentRemovedTrigger } from './comment_removed' +export { confluenceCommentUpdatedTrigger } from './comment_updated' export { confluenceLabelAddedTrigger } from './label_added' export { confluenceLabelRemovedTrigger } from './label_removed' export { confluencePageCreatedTrigger } from './page_created' export { confluencePageMovedTrigger } from './page_moved' +export { confluencePagePermissionsUpdatedTrigger } from './page_permissions_updated' export { confluencePageRemovedTrigger } from './page_removed' +export { confluencePageRestoredTrigger } from './page_restored' export { confluencePageUpdatedTrigger } from './page_updated' export { confluenceSpaceCreatedTrigger } from './space_created' +export { confluenceSpaceRemovedTrigger } from './space_removed' export { confluenceSpaceUpdatedTrigger } from './space_updated' +export { confluenceUserCreatedTrigger } from './user_created' export { confluenceWebhookTrigger } from './webhook' diff --git a/apps/sim/triggers/confluence/page_permissions_updated.ts b/apps/sim/triggers/confluence/page_permissions_updated.ts new file mode 100644 index 00000000000..a078c5c2c17 --- /dev/null +++ b/apps/sim/triggers/confluence/page_permissions_updated.ts @@ -0,0 +1,41 @@ +import { ConfluenceIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildConfluenceExtraFields, + buildPagePermissionsOutputs, + confluenceSetupInstructions, + confluenceTriggerOptions, +} from '@/triggers/confluence/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Confluence Page Permissions Updated Trigger + * + * Triggers when page permissions are changed in Confluence. + */ +export const confluencePagePermissionsUpdatedTrigger: TriggerConfig = { + id: 'confluence_page_permissions_updated', + name: 'Confluence Page Permissions Updated', + provider: 'confluence', + description: 'Trigger workflow when page permissions are changed in Confluence', + version: '1.0.0', + icon: ConfluenceIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'confluence_page_permissions_updated', + triggerOptions: confluenceTriggerOptions, + setupInstructions: confluenceSetupInstructions('content_permissions_updated'), + extraFields: buildConfluenceExtraFields('confluence_page_permissions_updated'), + }), + + outputs: buildPagePermissionsOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/confluence/page_restored.ts b/apps/sim/triggers/confluence/page_restored.ts new file mode 100644 index 00000000000..d0676d52c7e --- /dev/null +++ b/apps/sim/triggers/confluence/page_restored.ts @@ -0,0 +1,41 @@ +import { ConfluenceIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildConfluenceExtraFields, + buildPageOutputs, + confluenceSetupInstructions, + confluenceTriggerOptions, +} from '@/triggers/confluence/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Confluence Page Restored Trigger + * + * Triggers when a page is restored from trash in Confluence. + */ +export const confluencePageRestoredTrigger: TriggerConfig = { + id: 'confluence_page_restored', + name: 'Confluence Page Restored', + provider: 'confluence', + description: 'Trigger workflow when a page is restored from trash in Confluence', + version: '1.0.0', + icon: ConfluenceIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'confluence_page_restored', + triggerOptions: confluenceTriggerOptions, + setupInstructions: confluenceSetupInstructions('page_restored'), + extraFields: buildConfluenceExtraFields('confluence_page_restored'), + }), + + outputs: buildPageOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/confluence/space_removed.ts b/apps/sim/triggers/confluence/space_removed.ts new file mode 100644 index 00000000000..ccbb6205872 --- /dev/null +++ b/apps/sim/triggers/confluence/space_removed.ts @@ -0,0 +1,41 @@ +import { ConfluenceIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildConfluenceExtraFields, + buildSpaceOutputs, + confluenceSetupInstructions, + confluenceTriggerOptions, +} from '@/triggers/confluence/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Confluence Space Removed Trigger + * + * Triggers when a space is deleted/removed in Confluence. + */ +export const confluenceSpaceRemovedTrigger: TriggerConfig = { + id: 'confluence_space_removed', + name: 'Confluence Space Removed', + provider: 'confluence', + description: 'Trigger workflow when a space is removed in Confluence', + version: '1.0.0', + icon: ConfluenceIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'confluence_space_removed', + triggerOptions: confluenceTriggerOptions, + setupInstructions: confluenceSetupInstructions('space_removed'), + extraFields: buildConfluenceExtraFields('confluence_space_removed'), + }), + + outputs: buildSpaceOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/confluence/user_created.ts b/apps/sim/triggers/confluence/user_created.ts new file mode 100644 index 00000000000..753beb7e862 --- /dev/null +++ b/apps/sim/triggers/confluence/user_created.ts @@ -0,0 +1,41 @@ +import { ConfluenceIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildConfluenceExtraFields, + buildUserOutputs, + confluenceSetupInstructions, + confluenceTriggerOptions, +} from '@/triggers/confluence/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Confluence User Created Trigger + * + * Triggers when a new user is added to Confluence. + */ +export const confluenceUserCreatedTrigger: TriggerConfig = { + id: 'confluence_user_created', + name: 'Confluence User Created', + provider: 'confluence', + description: 'Trigger workflow when a new user is added to Confluence', + version: '1.0.0', + icon: ConfluenceIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'confluence_user_created', + triggerOptions: confluenceTriggerOptions, + setupInstructions: confluenceSetupInstructions('user_created'), + extraFields: buildConfluenceExtraFields('confluence_user_created'), + }), + + outputs: buildUserOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/confluence/utils.ts b/apps/sim/triggers/confluence/utils.ts index 95f0caf87ea..cc722457a97 100644 --- a/apps/sim/triggers/confluence/utils.ts +++ b/apps/sim/triggers/confluence/utils.ts @@ -17,6 +17,13 @@ export const confluenceTriggerOptions = [ { label: 'Space Updated', id: 'confluence_space_updated' }, { label: 'Label Added', id: 'confluence_label_added' }, { label: 'Label Removed', id: 'confluence_label_removed' }, + { label: 'Comment Updated', id: 'confluence_comment_updated' }, + { label: 'Attachment Updated', id: 'confluence_attachment_updated' }, + { label: 'Page Restored', id: 'confluence_page_restored' }, + { label: 'Blog Post Restored', id: 'confluence_blog_restored' }, + { label: 'Space Removed', id: 'confluence_space_removed' }, + { label: 'Page Permissions Updated', id: 'confluence_page_permissions_updated' }, + { label: 'User Created', id: 'confluence_user_created' }, { label: 'Generic Webhook (All Events)', id: 'confluence_webhook' }, ] @@ -234,6 +241,39 @@ export function buildLabelOutputs(): Record { } } +/** Page permissions outputs for permission change events. */ +export function buildPagePermissionsOutputs(): Record { + return { + ...buildBaseWebhookOutputs(), + page: { + ...buildContentEntityFields(), + permissions: { + type: 'json', + description: 'Updated permissions object for the page', + }, + }, + } +} + +/** User-related outputs for user events. */ +export function buildUserOutputs(): Record { + return { + ...buildBaseWebhookOutputs(), + user: { + accountId: { type: 'string', description: 'Account ID of the new user' }, + accountType: { type: 'string', description: 'Account type (e.g., atlassian, app)' }, + displayName: { type: 'string', description: 'Display name of the user' }, + emailAddress: { + type: 'string', + description: + 'Email address of the user (may not be available due to GDPR/privacy settings)', + }, + publicName: { type: 'string', description: 'Public name of the user' }, + self: { type: 'string', description: 'URL link to the user profile' }, + }, + } +} + /** Combined outputs for the generic webhook trigger (all events). */ export function buildGenericWebhookOutputs(): Record { return { @@ -245,6 +285,7 @@ export function buildGenericWebhookOutputs(): Record { space: { type: 'json', description: 'Space object (present in space events)' }, label: { type: 'json', description: 'Label object (present in label events)' }, content: { type: 'json', description: 'Content object (present in label events)' }, + user: { type: 'json', description: 'User object (present in user events)' }, files: { type: 'file[]', description: @@ -308,6 +349,24 @@ export function extractLabelData(body: any) { } } +export function extractPagePermissionsData(body: Record) { + return { + timestamp: body.timestamp, + userAccountId: body.userAccountId, + accountType: body.accountType, + page: body.page || {}, + } +} + +export function extractUserData(body: Record) { + return { + timestamp: body.timestamp, + userAccountId: body.userAccountId, + accountType: body.accountType, + user: body.user || {}, + } +} + /** * Maps trigger IDs to the exact Confluence event strings they accept. * Admin REST API webhooks include an `event` field (e.g. `"event": "page_created"`). @@ -329,6 +388,13 @@ const TRIGGER_EVENT_MAP: Record = { confluence_space_updated: ['space_updated'], confluence_label_added: ['label_added', 'label_created'], confluence_label_removed: ['label_removed', 'label_deleted'], + confluence_comment_updated: ['comment_updated'], + confluence_attachment_updated: ['attachment_updated'], + confluence_page_restored: ['page_restored'], + confluence_blog_restored: ['blog_restored'], + confluence_space_removed: ['space_removed'], + confluence_page_permissions_updated: ['content_permissions_updated'], + confluence_user_created: ['user_created', 'user_reactivated'], } const TRIGGER_CATEGORY_MAP: Record = { @@ -347,6 +413,13 @@ const TRIGGER_CATEGORY_MAP: Record = { confluence_space_updated: 'space', confluence_label_added: 'label', confluence_label_removed: 'label', + confluence_comment_updated: 'comment', + confluence_attachment_updated: 'attachment', + confluence_page_restored: 'page', + confluence_blog_restored: 'blog', + confluence_space_removed: 'space', + confluence_page_permissions_updated: 'page', + confluence_user_created: 'user', } /** @@ -360,6 +433,7 @@ function inferEntityCategory(body: Record): string | null { if (body.label) return 'label' if (body.page) return 'page' if (body.space) return 'space' + if (body.user) return 'user' return null } diff --git a/apps/sim/triggers/jira/comment_deleted.ts b/apps/sim/triggers/jira/comment_deleted.ts new file mode 100644 index 00000000000..4988edfbfbc --- /dev/null +++ b/apps/sim/triggers/jira/comment_deleted.ts @@ -0,0 +1,83 @@ +import { JiraIcon } from '@/components/icons' +import { buildCommentOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Comment Deleted Trigger + * Triggers when a comment on an issue is deleted + */ +export const jiraCommentDeletedTrigger: TriggerConfig = { + id: 'jira_comment_deleted', + name: 'Jira Comment Deleted', + provider: 'jira', + description: 'Trigger workflow when a comment is deleted from a Jira issue', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_comment_deleted', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_comment_deleted', + }, + }, + { + id: 'jqlFilter', + title: 'JQL Filter', + type: 'long-input', + placeholder: 'project = PROJ AND issuetype = Bug', + description: 'Filter which comment deletions trigger this workflow using JQL', + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_comment_deleted', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('comment_deleted'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_comment_deleted', + }, + }, + ], + + outputs: buildCommentOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jira/comment_updated.ts b/apps/sim/triggers/jira/comment_updated.ts new file mode 100644 index 00000000000..0d5ffa279c4 --- /dev/null +++ b/apps/sim/triggers/jira/comment_updated.ts @@ -0,0 +1,83 @@ +import { JiraIcon } from '@/components/icons' +import { buildCommentOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Comment Updated Trigger + * Triggers when a comment on an issue is updated + */ +export const jiraCommentUpdatedTrigger: TriggerConfig = { + id: 'jira_comment_updated', + name: 'Jira Comment Updated', + provider: 'jira', + description: 'Trigger workflow when a comment is updated on a Jira issue', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_comment_updated', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_comment_updated', + }, + }, + { + id: 'jqlFilter', + title: 'JQL Filter', + type: 'long-input', + placeholder: 'project = PROJ AND issuetype = Bug', + description: 'Filter which comment updates trigger this workflow using JQL', + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_comment_updated', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('comment_updated'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_comment_updated', + }, + }, + ], + + outputs: buildCommentOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jira/index.ts b/apps/sim/triggers/jira/index.ts index 06527d8620a..865792e9053 100644 --- a/apps/sim/triggers/jira/index.ts +++ b/apps/sim/triggers/jira/index.ts @@ -3,9 +3,18 @@ * Export all Jira webhook triggers */ +export { jiraCommentDeletedTrigger } from './comment_deleted' +export { jiraCommentUpdatedTrigger } from './comment_updated' export { jiraIssueCommentedTrigger } from './issue_commented' export { jiraIssueCreatedTrigger } from './issue_created' export { jiraIssueDeletedTrigger } from './issue_deleted' export { jiraIssueUpdatedTrigger } from './issue_updated' +export { jiraProjectCreatedTrigger } from './project_created' +export { jiraSprintClosedTrigger } from './sprint_closed' +export { jiraSprintCreatedTrigger } from './sprint_created' +export { jiraSprintStartedTrigger } from './sprint_started' +export { jiraVersionReleasedTrigger } from './version_released' export { jiraWebhookTrigger } from './webhook' export { jiraWorklogCreatedTrigger } from './worklog_created' +export { jiraWorklogDeletedTrigger } from './worklog_deleted' +export { jiraWorklogUpdatedTrigger } from './worklog_updated' diff --git a/apps/sim/triggers/jira/project_created.ts b/apps/sim/triggers/jira/project_created.ts new file mode 100644 index 00000000000..634adc2b3e6 --- /dev/null +++ b/apps/sim/triggers/jira/project_created.ts @@ -0,0 +1,70 @@ +import { JiraIcon } from '@/components/icons' +import { buildProjectCreatedOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Project Created Trigger + * Triggers when a project is created + */ +export const jiraProjectCreatedTrigger: TriggerConfig = { + id: 'jira_project_created', + name: 'Jira Project Created', + provider: 'jira', + description: 'Trigger workflow when a project is created in Jira', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_project_created', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_project_created', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('project_created'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_project_created', + }, + }, + ], + + outputs: buildProjectCreatedOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jira/sprint_closed.ts b/apps/sim/triggers/jira/sprint_closed.ts new file mode 100644 index 00000000000..45a25680891 --- /dev/null +++ b/apps/sim/triggers/jira/sprint_closed.ts @@ -0,0 +1,70 @@ +import { JiraIcon } from '@/components/icons' +import { buildSprintOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Sprint Closed Trigger + * Triggers when a sprint is closed/completed + */ +export const jiraSprintClosedTrigger: TriggerConfig = { + id: 'jira_sprint_closed', + name: 'Jira Sprint Closed', + provider: 'jira', + description: 'Trigger workflow when a sprint is closed in Jira', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_closed', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_closed', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('sprint_closed'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_closed', + }, + }, + ], + + outputs: buildSprintOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jira/sprint_created.ts b/apps/sim/triggers/jira/sprint_created.ts new file mode 100644 index 00000000000..c46d0db477d --- /dev/null +++ b/apps/sim/triggers/jira/sprint_created.ts @@ -0,0 +1,70 @@ +import { JiraIcon } from '@/components/icons' +import { buildSprintOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Sprint Created Trigger + * Triggers when a sprint is created + */ +export const jiraSprintCreatedTrigger: TriggerConfig = { + id: 'jira_sprint_created', + name: 'Jira Sprint Created', + provider: 'jira', + description: 'Trigger workflow when a sprint is created in Jira', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_created', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_created', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('sprint_created'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_created', + }, + }, + ], + + outputs: buildSprintOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jira/sprint_started.ts b/apps/sim/triggers/jira/sprint_started.ts new file mode 100644 index 00000000000..a12f83e78d0 --- /dev/null +++ b/apps/sim/triggers/jira/sprint_started.ts @@ -0,0 +1,70 @@ +import { JiraIcon } from '@/components/icons' +import { buildSprintOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Sprint Started Trigger + * Triggers when a sprint is started + */ +export const jiraSprintStartedTrigger: TriggerConfig = { + id: 'jira_sprint_started', + name: 'Jira Sprint Started', + provider: 'jira', + description: 'Trigger workflow when a sprint is started in Jira', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_started', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_started', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('sprint_started'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_sprint_started', + }, + }, + ], + + outputs: buildSprintOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jira/utils.ts b/apps/sim/triggers/jira/utils.ts index 5face582998..3cdcd1ef87e 100644 --- a/apps/sim/triggers/jira/utils.ts +++ b/apps/sim/triggers/jira/utils.ts @@ -1,4 +1,3 @@ -import type { SubBlockConfig } from '@/blocks/types' import type { TriggerOutput } from '@/triggers/types' /** @@ -9,74 +8,19 @@ export const jiraTriggerOptions = [ { label: 'Issue Updated', id: 'jira_issue_updated' }, { label: 'Issue Deleted', id: 'jira_issue_deleted' }, { label: 'Issue Commented', id: 'jira_issue_commented' }, + { label: 'Comment Updated', id: 'jira_comment_updated' }, + { label: 'Comment Deleted', id: 'jira_comment_deleted' }, { label: 'Worklog Created', id: 'jira_worklog_created' }, + { label: 'Worklog Updated', id: 'jira_worklog_updated' }, + { label: 'Worklog Deleted', id: 'jira_worklog_deleted' }, + { label: 'Sprint Created', id: 'jira_sprint_created' }, + { label: 'Sprint Started', id: 'jira_sprint_started' }, + { label: 'Sprint Closed', id: 'jira_sprint_closed' }, + { label: 'Project Created', id: 'jira_project_created' }, + { label: 'Version Released', id: 'jira_version_released' }, { label: 'Generic Webhook (All Events)', id: 'jira_webhook' }, ] -/** - * Common webhook subBlocks for Jira triggers - * Used across all Jira webhook-based triggers - */ -export const jiraWebhookSubBlocks: SubBlockConfig[] = [ - { - id: 'triggerCredentials', - title: 'Jira Credentials', - type: 'oauth-input', - serviceId: 'jira', - requiredScopes: [ - 'read:jira-work', - 'read:jira-user', - 'manage:jira-webhook', - 'read:webhook:jira', - 'write:webhook:jira', - 'delete:webhook:jira', - 'read:issue-event:jira', - 'read:issue:jira', - 'read:issue.changelog:jira', - 'read:comment:jira', - 'read:comment.property:jira', - 'read:issue.property:jira', - 'read:issue-worklog:jira', - 'read:project:jira', - 'read:field:jira', - 'read:jql:jira', - ], - placeholder: 'Select Jira account', - required: true, - mode: 'trigger', - }, - { - id: 'webhookUrlDisplay', - title: 'Webhook URL', - type: 'short-input', - readOnly: true, - showCopyButton: true, - useWebhookUrl: true, - placeholder: 'Webhook URL will be generated after saving', - mode: 'trigger', - description: 'Copy this URL and use it when configuring the webhook in Jira', - }, - { - id: 'webhookSecret', - title: 'Webhook Secret', - type: 'short-input', - placeholder: 'Enter webhook secret for validation', - description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', - password: true, - required: false, - mode: 'trigger', - }, - { - id: 'jiraDomain', - title: 'Jira Domain', - type: 'short-input', - placeholder: 'your-company.atlassian.net', - description: 'Your Jira Cloud domain', - required: false, - mode: 'trigger', - }, -] - /** * Generates setup instructions for Jira webhooks */ @@ -114,6 +58,20 @@ function buildBaseWebhookOutputs(): Record { type: 'number', description: 'Timestamp of the webhook event', }, + user: { + displayName: { + type: 'string', + description: 'Display name of the user who triggered the event', + }, + accountId: { + type: 'string', + description: 'Account ID of the user who triggered the event', + }, + emailAddress: { + type: 'string', + description: 'Email address of the user who triggered the event', + }, + }, issue: { id: { @@ -166,7 +124,8 @@ function buildBaseWebhookOutputs(): Record { }, emailAddress: { type: 'string', - description: 'Creator email address', + description: + 'Email address (Jira Server only — not available in Jira Cloud webhook payloads)', }, }, duedate: { @@ -191,6 +150,11 @@ function buildBaseWebhookOutputs(): Record { type: 'string', description: 'Issue summary/title', }, + description: { + type: 'json', + description: + 'Issue description in Atlassian Document Format (ADF). On Jira Server this may be a plain string.', + }, updated: { type: 'string', description: 'Last updated date (ISO format)', @@ -210,7 +174,8 @@ function buildBaseWebhookOutputs(): Record { }, emailAddress: { type: 'string', - description: 'Assignee email address', + description: + 'Email address (Jira Server only — not available in Jira Cloud webhook payloads)', }, }, priority: { @@ -238,7 +203,8 @@ function buildBaseWebhookOutputs(): Record { }, emailAddress: { type: 'string', - description: 'Reporter email address', + description: + 'Email address (Jira Server only — not available in Jira Cloud webhook payloads)', }, }, security: { @@ -263,6 +229,24 @@ function buildBaseWebhookOutputs(): Record { description: 'Issue type ID', }, }, + resolution: { + name: { + type: 'string', + description: 'Resolution name (e.g., Done, Fixed)', + }, + id: { + type: 'string', + description: 'Resolution ID', + }, + }, + components: { + type: 'array', + description: 'Array of component objects associated with this issue', + }, + fixVersions: { + type: 'array', + description: 'Array of fix version objects for this issue', + }, }, }, } @@ -309,8 +293,9 @@ export function buildCommentOutputs(): Record { description: 'Comment ID', }, body: { - type: 'string', - description: 'Comment text/body', + type: 'json', + description: + 'Comment body in Atlassian Document Format (ADF). On Jira Server this may be a plain string.', }, author: { displayName: { @@ -326,6 +311,16 @@ export function buildCommentOutputs(): Record { description: 'Comment author email address', }, }, + updateAuthor: { + displayName: { + type: 'string', + description: 'Display name of the user who last updated the comment', + }, + accountId: { + type: 'string', + description: 'Account ID of the user who last updated the comment', + }, + }, created: { type: 'string', description: 'Comment creation date (ISO format)', @@ -334,6 +329,10 @@ export function buildCommentOutputs(): Record { type: 'string', description: 'Comment last updated date (ISO format)', }, + self: { + type: 'string', + description: 'REST API URL for this comment', + }, }, } } @@ -361,6 +360,16 @@ export function buildWorklogOutputs(): Record { description: 'Worklog author email address', }, }, + updateAuthor: { + displayName: { + type: 'string', + description: 'Display name of the user who last updated the worklog', + }, + accountId: { + type: 'string', + description: 'Account ID of the user who last updated the worklog', + }, + }, timeSpent: { type: 'string', description: 'Time spent (e.g., "2h 30m")', @@ -377,6 +386,22 @@ export function buildWorklogOutputs(): Record { type: 'string', description: 'When the work was started (ISO format)', }, + created: { + type: 'string', + description: 'When the worklog entry was created (ISO format)', + }, + updated: { + type: 'string', + description: 'When the worklog entry was last updated (ISO format)', + }, + issueId: { + type: 'string', + description: 'ID of the issue this worklog belongs to', + }, + self: { + type: 'string', + description: 'REST API URL for this worklog entry', + }, }, } } @@ -391,9 +416,16 @@ export function isJiraEventMatch( jira_issue_updated: ['jira:issue_updated', 'issue_updated', 'issue_generic'], jira_issue_deleted: ['jira:issue_deleted', 'issue_deleted'], jira_issue_commented: ['comment_created'], + jira_comment_updated: ['comment_updated'], + jira_comment_deleted: ['comment_deleted'], jira_worklog_created: ['worklog_created'], jira_worklog_updated: ['worklog_updated'], jira_worklog_deleted: ['worklog_deleted'], + jira_sprint_created: ['sprint_created'], + jira_sprint_started: ['sprint_started'], + jira_sprint_closed: ['sprint_closed'], + jira_project_created: ['project_created'], + jira_version_released: ['jira:version_released'], // Generic webhook accepts all events jira_webhook: ['*'], } @@ -415,30 +447,273 @@ export function isJiraEventMatch( ) } -export function extractIssueData(body: any) { +export function extractIssueData(body: unknown) { + const obj = body as Record + return { + webhookEvent: obj.webhookEvent, + timestamp: obj.timestamp, + user: obj.user || null, + issue_event_type_name: obj.issue_event_type_name, + issue: obj.issue || {}, + changelog: obj.changelog, + } +} + +export function extractCommentData(body: unknown) { + const obj = body as Record return { - webhookEvent: body.webhookEvent, - timestamp: body.timestamp, - issue_event_type_name: body.issue_event_type_name, - issue: body.issue || {}, - changelog: body.changelog, + webhookEvent: obj.webhookEvent, + timestamp: obj.timestamp, + user: obj.user || null, + issue: obj.issue || {}, + comment: obj.comment || {}, } } -export function extractCommentData(body: any) { +export function extractWorklogData(body: unknown) { + const obj = body as Record return { - webhookEvent: body.webhookEvent, - timestamp: body.timestamp, - issue: body.issue || {}, - comment: body.comment || {}, + webhookEvent: obj.webhookEvent, + timestamp: obj.timestamp, + user: obj.user || null, + issue: obj.issue || {}, + worklog: obj.worklog || {}, } } -export function extractWorklogData(body: any) { +/** + * Builds output schema for sprint-related webhook events + */ +export function buildSprintOutputs(): Record { + return { + webhookEvent: { + type: 'string', + description: 'The webhook event type (e.g., sprint_started, sprint_closed)', + }, + timestamp: { + type: 'number', + description: 'Timestamp of the webhook event', + }, + user: { + displayName: { + type: 'string', + description: 'Display name of the user who triggered the event', + }, + accountId: { + type: 'string', + description: 'Account ID of the user who triggered the event', + }, + emailAddress: { + type: 'string', + description: 'Email address of the user who triggered the event', + }, + }, + sprint: { + id: { + type: 'number', + description: 'Sprint ID', + }, + self: { + type: 'string', + description: 'REST API URL for this sprint', + }, + state: { + type: 'string', + description: 'Sprint state (future, active, closed)', + }, + name: { + type: 'string', + description: 'Sprint name', + }, + startDate: { + type: 'string', + description: 'Sprint start date (ISO format)', + }, + endDate: { + type: 'string', + description: 'Sprint end date (ISO format)', + }, + completeDate: { + type: 'string', + description: 'Sprint completion date (ISO format)', + }, + originBoardId: { + type: 'number', + description: 'Board ID the sprint belongs to', + }, + goal: { + type: 'string', + description: 'Sprint goal', + }, + createdDate: { + type: 'string', + description: 'Sprint creation date (ISO format)', + }, + }, + } +} + +/** + * Builds output schema for project_created webhook events + */ +export function buildProjectCreatedOutputs(): Record { + return { + webhookEvent: { + type: 'string', + description: 'The webhook event type (project_created)', + }, + timestamp: { + type: 'number', + description: 'Timestamp of the webhook event', + }, + user: { + displayName: { + type: 'string', + description: 'Display name of the user who triggered the event', + }, + accountId: { + type: 'string', + description: 'Account ID of the user who triggered the event', + }, + emailAddress: { + type: 'string', + description: 'Email address of the user who triggered the event', + }, + }, + project: { + id: { + type: 'string', + description: 'Project ID', + }, + key: { + type: 'string', + description: 'Project key', + }, + name: { + type: 'string', + description: 'Project name', + }, + self: { + type: 'string', + description: 'REST API URL for this project', + }, + projectTypeKey: { + type: 'string', + description: 'Project type (e.g., software, business)', + }, + lead: { + displayName: { + type: 'string', + description: 'Project lead display name', + }, + accountId: { + type: 'string', + description: 'Project lead account ID', + }, + }, + }, + } +} + +/** + * Builds output schema for version_released webhook events + */ +export function buildVersionReleasedOutputs(): Record { + return { + webhookEvent: { + type: 'string', + description: 'The webhook event type (jira:version_released)', + }, + timestamp: { + type: 'number', + description: 'Timestamp of the webhook event', + }, + user: { + displayName: { + type: 'string', + description: 'Display name of the user who triggered the event', + }, + accountId: { + type: 'string', + description: 'Account ID of the user who triggered the event', + }, + emailAddress: { + type: 'string', + description: 'Email address of the user who triggered the event', + }, + }, + version: { + id: { + type: 'string', + description: 'Version ID', + }, + name: { + type: 'string', + description: 'Version name', + }, + self: { + type: 'string', + description: 'REST API URL for this version', + }, + released: { + type: 'boolean', + description: 'Whether the version is released', + }, + releaseDate: { + type: 'string', + description: 'Release date (ISO format)', + }, + projectId: { + type: 'number', + description: 'Project ID the version belongs to', + }, + description: { + type: 'string', + description: 'Version description', + }, + archived: { + type: 'boolean', + description: 'Whether the version is archived', + }, + }, + } +} + +/** + * Extracts sprint data from a Jira webhook payload + */ +export function extractSprintData(body: unknown) { + const obj = body as Record + return { + webhookEvent: obj.webhookEvent, + timestamp: obj.timestamp, + user: obj.user || null, + sprint: obj.sprint || {}, + } +} + +/** + * Extracts project data from a Jira webhook payload + */ +export function extractProjectData(body: unknown) { + const obj = body as Record + return { + webhookEvent: obj.webhookEvent, + timestamp: obj.timestamp, + user: obj.user || null, + project: obj.project || {}, + } +} + +/** + * Extracts version data from a Jira webhook payload + */ +export function extractVersionData(body: unknown) { + const obj = body as Record return { - webhookEvent: body.webhookEvent, - timestamp: body.timestamp, - issue: body.issue || {}, - worklog: body.worklog || {}, + webhookEvent: obj.webhookEvent, + timestamp: obj.timestamp, + user: obj.user || null, + version: obj.version || {}, } } diff --git a/apps/sim/triggers/jira/version_released.ts b/apps/sim/triggers/jira/version_released.ts new file mode 100644 index 00000000000..8085bb8e2ff --- /dev/null +++ b/apps/sim/triggers/jira/version_released.ts @@ -0,0 +1,70 @@ +import { JiraIcon } from '@/components/icons' +import { buildVersionReleasedOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Version Released Trigger + * Triggers when a version/release is released + */ +export const jiraVersionReleasedTrigger: TriggerConfig = { + id: 'jira_version_released', + name: 'Jira Version Released', + provider: 'jira', + description: 'Trigger workflow when a version is released in Jira', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_version_released', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_version_released', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('jira:version_released'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_version_released', + }, + }, + ], + + outputs: buildVersionReleasedOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jira/worklog_deleted.ts b/apps/sim/triggers/jira/worklog_deleted.ts new file mode 100644 index 00000000000..d2a1c17d14c --- /dev/null +++ b/apps/sim/triggers/jira/worklog_deleted.ts @@ -0,0 +1,83 @@ +import { JiraIcon } from '@/components/icons' +import { buildWorklogOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Worklog Deleted Trigger + * Triggers when a worklog entry is deleted from an issue + */ +export const jiraWorklogDeletedTrigger: TriggerConfig = { + id: 'jira_worklog_deleted', + name: 'Jira Worklog Deleted', + provider: 'jira', + description: 'Trigger workflow when a worklog entry is deleted from a Jira issue', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_worklog_deleted', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_worklog_deleted', + }, + }, + { + id: 'jqlFilter', + title: 'JQL Filter', + type: 'long-input', + placeholder: 'project = PROJ', + description: 'Filter which worklog deletions trigger this workflow using JQL', + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_worklog_deleted', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('worklog_deleted'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_worklog_deleted', + }, + }, + ], + + outputs: buildWorklogOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jira/worklog_updated.ts b/apps/sim/triggers/jira/worklog_updated.ts new file mode 100644 index 00000000000..5a26c7f7e33 --- /dev/null +++ b/apps/sim/triggers/jira/worklog_updated.ts @@ -0,0 +1,83 @@ +import { JiraIcon } from '@/components/icons' +import { buildWorklogOutputs, jiraSetupInstructions } from '@/triggers/jira/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Jira Worklog Updated Trigger + * Triggers when a worklog entry is updated on an issue + */ +export const jiraWorklogUpdatedTrigger: TriggerConfig = { + id: 'jira_worklog_updated', + name: 'Jira Worklog Updated', + provider: 'jira', + description: 'Trigger workflow when a worklog entry is updated on a Jira issue', + version: '1.0.0', + icon: JiraIcon, + + subBlocks: [ + { + id: 'webhookUrlDisplay', + title: 'Webhook URL', + type: 'short-input', + readOnly: true, + showCopyButton: true, + useWebhookUrl: true, + placeholder: 'Webhook URL will be generated', + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_worklog_updated', + }, + }, + { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_worklog_updated', + }, + }, + { + id: 'jqlFilter', + title: 'JQL Filter', + type: 'long-input', + placeholder: 'project = PROJ', + description: 'Filter which worklog updates trigger this workflow using JQL', + required: false, + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_worklog_updated', + }, + }, + { + id: 'triggerInstructions', + title: 'Setup Instructions', + hideFromPreview: true, + type: 'text', + defaultValue: jiraSetupInstructions('worklog_updated'), + mode: 'trigger', + condition: { + field: 'selectedTriggerId', + value: 'jira_worklog_updated', + }, + }, + ], + + outputs: buildWorklogOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jsm/index.ts b/apps/sim/triggers/jsm/index.ts new file mode 100644 index 00000000000..c76b4d0597d --- /dev/null +++ b/apps/sim/triggers/jsm/index.ts @@ -0,0 +1,10 @@ +/** + * Jira Service Management Triggers + * Export all JSM webhook triggers + */ + +export { jsmRequestCommentedTrigger } from './request_commented' +export { jsmRequestCreatedTrigger } from './request_created' +export { jsmRequestResolvedTrigger } from './request_resolved' +export { jsmRequestUpdatedTrigger } from './request_updated' +export { jsmWebhookTrigger } from './webhook' diff --git a/apps/sim/triggers/jsm/request_commented.ts b/apps/sim/triggers/jsm/request_commented.ts new file mode 100644 index 00000000000..4487c0c7e34 --- /dev/null +++ b/apps/sim/triggers/jsm/request_commented.ts @@ -0,0 +1,41 @@ +import { JiraServiceManagementIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildJsmCommentOutputs, + buildJsmExtraFields, + jsmSetupInstructions, + jsmTriggerOptions, +} from '@/triggers/jsm/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * JSM Request Commented Trigger + * + * Triggers when a comment is added to a service request (public or internal). + */ +export const jsmRequestCommentedTrigger: TriggerConfig = { + id: 'jsm_request_commented', + name: 'JSM Request Commented', + provider: 'jsm', + description: 'Trigger workflow when a comment is added to a Jira Service Management request', + version: '1.0.0', + icon: JiraServiceManagementIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'jsm_request_commented', + triggerOptions: jsmTriggerOptions, + setupInstructions: jsmSetupInstructions('comment_created'), + extraFields: buildJsmExtraFields('jsm_request_commented'), + }), + + outputs: buildJsmCommentOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jsm/request_created.ts b/apps/sim/triggers/jsm/request_created.ts new file mode 100644 index 00000000000..6a4691709f9 --- /dev/null +++ b/apps/sim/triggers/jsm/request_created.ts @@ -0,0 +1,43 @@ +import { JiraServiceManagementIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildJsmExtraFields, + buildJsmRequestOutputs, + jsmSetupInstructions, + jsmTriggerOptions, +} from '@/triggers/jsm/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * JSM Request Created Trigger + * + * Primary trigger — includes the dropdown for selecting trigger type. + * Triggers when a new service request is created in Jira Service Management. + */ +export const jsmRequestCreatedTrigger: TriggerConfig = { + id: 'jsm_request_created', + name: 'JSM Request Created', + provider: 'jsm', + description: 'Trigger workflow when a new service request is created in Jira Service Management', + version: '1.0.0', + icon: JiraServiceManagementIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'jsm_request_created', + triggerOptions: jsmTriggerOptions, + includeDropdown: true, + setupInstructions: jsmSetupInstructions('jira:issue_created'), + extraFields: buildJsmExtraFields('jsm_request_created'), + }), + + outputs: buildJsmRequestOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jsm/request_resolved.ts b/apps/sim/triggers/jsm/request_resolved.ts new file mode 100644 index 00000000000..2dd216efb64 --- /dev/null +++ b/apps/sim/triggers/jsm/request_resolved.ts @@ -0,0 +1,45 @@ +import { JiraServiceManagementIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildJsmExtraFields, + buildJsmRequestUpdatedOutputs, + jsmSetupInstructions, + jsmTriggerOptions, +} from '@/triggers/jsm/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * JSM Request Resolved Trigger + * + * Triggers when a service request is resolved (status changed to Resolved, Done, or Closed). + * This is a specialized issue_updated event filtered by changelog status changes. + */ +export const jsmRequestResolvedTrigger: TriggerConfig = { + id: 'jsm_request_resolved', + name: 'JSM Request Resolved', + provider: 'jsm', + description: 'Trigger workflow when a service request is resolved in Jira Service Management', + version: '1.0.0', + icon: JiraServiceManagementIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'jsm_request_resolved', + triggerOptions: jsmTriggerOptions, + setupInstructions: jsmSetupInstructions( + 'jira:issue_updated', + 'This trigger fires when a request status changes to Resolved, Done, or Closed.' + ), + extraFields: buildJsmExtraFields('jsm_request_resolved'), + }), + + outputs: buildJsmRequestUpdatedOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jsm/request_updated.ts b/apps/sim/triggers/jsm/request_updated.ts new file mode 100644 index 00000000000..fe078b9d5fc --- /dev/null +++ b/apps/sim/triggers/jsm/request_updated.ts @@ -0,0 +1,41 @@ +import { JiraServiceManagementIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildJsmExtraFields, + buildJsmRequestUpdatedOutputs, + jsmSetupInstructions, + jsmTriggerOptions, +} from '@/triggers/jsm/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * JSM Request Updated Trigger + * + * Triggers when a service request is updated in Jira Service Management. + */ +export const jsmRequestUpdatedTrigger: TriggerConfig = { + id: 'jsm_request_updated', + name: 'JSM Request Updated', + provider: 'jsm', + description: 'Trigger workflow when a service request is updated in Jira Service Management', + version: '1.0.0', + icon: JiraServiceManagementIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'jsm_request_updated', + triggerOptions: jsmTriggerOptions, + setupInstructions: jsmSetupInstructions('jira:issue_updated'), + extraFields: buildJsmExtraFields('jsm_request_updated'), + }), + + outputs: buildJsmRequestUpdatedOutputs(), + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/jsm/utils.ts b/apps/sim/triggers/jsm/utils.ts new file mode 100644 index 00000000000..984784bf9c6 --- /dev/null +++ b/apps/sim/triggers/jsm/utils.ts @@ -0,0 +1,412 @@ +import type { SubBlockConfig } from '@/blocks/types' +import type { TriggerOutput } from '@/triggers/types' + +/** + * Shared trigger dropdown options for all JSM triggers + */ +export const jsmTriggerOptions = [ + { label: 'Request Created', id: 'jsm_request_created' }, + { label: 'Request Updated', id: 'jsm_request_updated' }, + { label: 'Request Commented', id: 'jsm_request_commented' }, + { label: 'Request Resolved', id: 'jsm_request_resolved' }, + { label: 'Generic Webhook (All Events)', id: 'jsm_webhook' }, +] + +/** + * Generates setup instructions for JSM webhooks. + * JSM uses the Jira webhook infrastructure with service desk context. + */ +export function jsmSetupInstructions(eventType: string, additionalNotes?: string): string { + const instructions = [ + 'Note: You must have admin permissions in your Jira workspace to create webhooks. JSM uses the Jira webhook system. See the Jira webhook documentation for details.', + 'In Jira, navigate to Settings > System > WebHooks.', + 'Click "Create a WebHook" to add a new webhook.', + 'Paste the Webhook URL from above into the URL field.', + 'Optionally, enter the Webhook Secret from above into the secret field for added security.', + `Select the events you want to trigger this workflow. For this trigger, select ${eventType}.`, + 'Optionally add a JQL filter to restrict webhooks to your service desk project (e.g., project = SD).', + 'Click "Create" to activate the webhook.', + ] + + if (additionalNotes) { + instructions.push(additionalNotes) + } + + return instructions + .map( + (instruction, index) => + `
${index === 0 ? instruction : `${index}. ${instruction}`}
` + ) + .join('') +} + +/** + * Webhook secret field for JSM triggers + */ +function jsmWebhookSecretField(triggerId: string): SubBlockConfig { + return { + id: 'webhookSecret', + title: 'Webhook Secret', + type: 'short-input', + placeholder: 'Enter a strong secret', + description: 'Optional secret to validate webhook deliveries from Jira using HMAC signature', + password: true, + required: false, + mode: 'trigger', + condition: { field: 'selectedTriggerId', value: triggerId }, + } +} + +/** + * Extra fields for JSM triggers (webhook secret + JQL filter) + */ +export function buildJsmExtraFields(triggerId: string): SubBlockConfig[] { + return [ + jsmWebhookSecretField(triggerId), + { + id: 'jqlFilter', + title: 'JQL Filter', + type: 'long-input', + placeholder: 'project = SD AND issuetype = "Service Request"', + description: + 'Filter which service desk requests trigger this workflow using JQL (Jira Query Language)', + required: false, + mode: 'trigger', + condition: { field: 'selectedTriggerId', value: triggerId }, + }, + ] +} + +/** + * Base webhook output fields shared across all JSM triggers + */ +function buildBaseWebhookOutputs(): Record { + return { + webhookEvent: { + type: 'string', + description: + 'The webhook event type (e.g., jira:issue_created, jira:issue_updated, comment_created)', + }, + timestamp: { + type: 'number', + description: 'Timestamp of the webhook event', + }, + user: { + displayName: { + type: 'string', + description: 'Display name of the user who triggered the event', + }, + accountId: { + type: 'string', + description: 'Account ID of the user who triggered the event', + }, + }, + + issue: { + id: { + type: 'string', + description: 'Jira issue ID', + }, + key: { + type: 'string', + description: 'Issue key (e.g., SD-123)', + }, + self: { + type: 'string', + description: 'REST API URL for this issue', + }, + fields: { + summary: { + type: 'string', + description: 'Request summary/title', + }, + status: { + name: { + type: 'string', + description: 'Current status name', + }, + id: { + type: 'string', + description: 'Status ID', + }, + statusCategory: { + type: 'json', + description: 'Status category information', + }, + }, + priority: { + name: { + type: 'string', + description: 'Priority name', + }, + id: { + type: 'string', + description: 'Priority ID', + }, + }, + issuetype: { + name: { + type: 'string', + description: 'Issue type name (e.g., Service Request, Incident)', + }, + id: { + type: 'string', + description: 'Issue type ID', + }, + }, + project: { + key: { + type: 'string', + description: 'Project key', + }, + name: { + type: 'string', + description: 'Project name', + }, + id: { + type: 'string', + description: 'Project ID', + }, + }, + reporter: { + displayName: { + type: 'string', + description: 'Reporter display name', + }, + accountId: { + type: 'string', + description: 'Reporter account ID', + }, + emailAddress: { + type: 'string', + description: + 'Email address (Jira Server only — not available in Jira Cloud webhook payloads)', + }, + }, + assignee: { + displayName: { + type: 'string', + description: 'Assignee display name', + }, + accountId: { + type: 'string', + description: 'Assignee account ID', + }, + emailAddress: { + type: 'string', + description: + 'Email address (Jira Server only — not available in Jira Cloud webhook payloads)', + }, + }, + creator: { + displayName: { + type: 'string', + description: 'Creator display name', + }, + accountId: { + type: 'string', + description: 'Creator account ID', + }, + emailAddress: { + type: 'string', + description: + 'Email address (Jira Server only — not available in Jira Cloud webhook payloads)', + }, + }, + created: { + type: 'string', + description: 'Request creation date (ISO format)', + }, + updated: { + type: 'string', + description: 'Last updated date (ISO format)', + }, + duedate: { + type: 'string', + description: 'Due date for the request', + }, + labels: { + type: 'array', + description: 'Array of labels applied to this request', + }, + resolution: { + name: { + type: 'string', + description: 'Resolution name (e.g., Done, Fixed)', + }, + id: { + type: 'string', + description: 'Resolution ID', + }, + }, + }, + }, + } +} + +/** + * Outputs for request created triggers + */ +export function buildJsmRequestOutputs(): Record { + return { + ...buildBaseWebhookOutputs(), + issue_event_type_name: { + type: 'string', + description: 'Issue event type name from Jira', + }, + } +} + +/** + * Outputs for request updated/resolved triggers (includes changelog) + */ +export function buildJsmRequestUpdatedOutputs(): Record { + return { + ...buildBaseWebhookOutputs(), + issue_event_type_name: { + type: 'string', + description: 'Issue event type name from Jira', + }, + changelog: { + id: { + type: 'string', + description: 'Changelog ID', + }, + items: { + type: 'array', + description: + 'Array of changed items. Each item contains field, fieldtype, from, fromString, to, toString', + }, + }, + } +} + +/** + * Outputs for comment triggers + */ +export function buildJsmCommentOutputs(): Record { + return { + ...buildBaseWebhookOutputs(), + + comment: { + id: { + type: 'string', + description: 'Comment ID', + }, + body: { + type: 'json', + description: + 'Comment body in Atlassian Document Format (ADF). On Jira Server this may be a plain string.', + }, + author: { + displayName: { + type: 'string', + description: 'Comment author display name', + }, + accountId: { + type: 'string', + description: 'Comment author account ID', + }, + emailAddress: { + type: 'string', + description: 'Comment author email address', + }, + }, + updateAuthor: { + displayName: { + type: 'string', + description: 'Display name of the user who last updated the comment', + }, + accountId: { + type: 'string', + description: 'Account ID of the user who last updated the comment', + }, + }, + created: { + type: 'string', + description: 'Comment creation date (ISO format)', + }, + updated: { + type: 'string', + description: 'Comment last updated date (ISO format)', + }, + }, + } +} + +/** + * Checks whether a JSM webhook event matches the configured trigger. + * + * JSM events come through Jira's webhook system. The matching logic considers: + * - The webhook event type (jira:issue_created, jira:issue_updated, comment_created) + * - The issue_event_type_name for finer-grained matching + * - Changelog items for approval, SLA, and resolution events + */ +export function isJsmEventMatch( + triggerId: string, + webhookEvent: string, + issueEventTypeName?: string, + changelog?: { items?: Array<{ field?: string; toString?: string }> } +): boolean { + switch (triggerId) { + case 'jsm_request_created': + return webhookEvent === 'jira:issue_created' || issueEventTypeName === 'issue_created' + + case 'jsm_request_updated': + return ( + webhookEvent === 'jira:issue_updated' || + issueEventTypeName === 'issue_updated' || + issueEventTypeName === 'issue_generic' + ) + + case 'jsm_request_commented': + return webhookEvent === 'comment_created' + + case 'jsm_request_resolved': { + if (webhookEvent !== 'jira:issue_updated' && issueEventTypeName !== 'issue_updated') { + return false + } + const resolvedItems = changelog?.items ?? [] + return resolvedItems.some( + (item) => + item.field === 'status' && + (item.toString?.toLowerCase() === 'resolved' || + item.toString?.toLowerCase() === 'done' || + item.toString?.toLowerCase() === 'closed') + ) + } + + case 'jsm_webhook': + return true + + default: + return false + } +} + +/** + * Extracts request data from a JSM webhook payload + */ +export function extractRequestData(body: Record) { + return { + webhookEvent: body.webhookEvent, + timestamp: body.timestamp, + user: body.user || null, + issue_event_type_name: body.issue_event_type_name, + issue: body.issue || {}, + changelog: body.changelog, + } +} + +/** + * Extracts comment data from a JSM webhook payload + */ +export function extractCommentData(body: Record) { + return { + webhookEvent: body.webhookEvent, + timestamp: body.timestamp, + user: body.user || null, + issue: body.issue || {}, + comment: body.comment || {}, + } +} diff --git a/apps/sim/triggers/jsm/webhook.ts b/apps/sim/triggers/jsm/webhook.ts new file mode 100644 index 00000000000..3ef23743178 --- /dev/null +++ b/apps/sim/triggers/jsm/webhook.ts @@ -0,0 +1,87 @@ +import { JiraServiceManagementIcon } from '@/components/icons' +import { buildTriggerSubBlocks } from '@/triggers' +import { + buildJsmExtraFields, + buildJsmRequestOutputs, + jsmSetupInstructions, + jsmTriggerOptions, +} from '@/triggers/jsm/utils' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Generic JSM Webhook Trigger + * + * Captures all Jira Service Management webhook events. + */ +export const jsmWebhookTrigger: TriggerConfig = { + id: 'jsm_webhook', + name: 'JSM Webhook (All Events)', + provider: 'jsm', + description: 'Trigger workflow on any Jira Service Management webhook event', + version: '1.0.0', + icon: JiraServiceManagementIcon, + + subBlocks: buildTriggerSubBlocks({ + triggerId: 'jsm_webhook', + triggerOptions: jsmTriggerOptions, + setupInstructions: jsmSetupInstructions('All Events'), + extraFields: buildJsmExtraFields('jsm_webhook'), + }), + + outputs: { + ...buildJsmRequestOutputs(), + changelog: { + id: { + type: 'string', + description: 'Changelog ID', + }, + items: { + type: 'array', + description: + 'Array of changed items. Each item contains field, fieldtype, from, fromString, to, toString', + }, + }, + comment: { + id: { + type: 'string', + description: 'Comment ID', + }, + body: { + type: 'json', + description: + 'Comment body in Atlassian Document Format (ADF). On Jira Server this may be a plain string.', + }, + author: { + displayName: { + type: 'string', + description: 'Comment author display name', + }, + accountId: { + type: 'string', + description: 'Comment author account ID', + }, + emailAddress: { + type: 'string', + description: 'Comment author email address', + }, + }, + created: { + type: 'string', + description: 'Comment creation date (ISO format)', + }, + updated: { + type: 'string', + description: 'Comment last updated date (ISO format)', + }, + }, + }, + + webhook: { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-Hub-Signature': 'sha256=...', + 'X-Atlassian-Webhook-Identifier': 'unique-webhook-id', + }, + }, +} diff --git a/apps/sim/triggers/registry.ts b/apps/sim/triggers/registry.ts index c1895086494..adc44a9e649 100644 --- a/apps/sim/triggers/registry.ts +++ b/apps/sim/triggers/registry.ts @@ -56,19 +56,26 @@ import { import { confluenceAttachmentCreatedTrigger, confluenceAttachmentRemovedTrigger, + confluenceAttachmentUpdatedTrigger, confluenceBlogCreatedTrigger, confluenceBlogRemovedTrigger, + confluenceBlogRestoredTrigger, confluenceBlogUpdatedTrigger, confluenceCommentCreatedTrigger, confluenceCommentRemovedTrigger, + confluenceCommentUpdatedTrigger, confluenceLabelAddedTrigger, confluenceLabelRemovedTrigger, confluencePageCreatedTrigger, confluencePageMovedTrigger, + confluencePagePermissionsUpdatedTrigger, confluencePageRemovedTrigger, + confluencePageRestoredTrigger, confluencePageUpdatedTrigger, confluenceSpaceCreatedTrigger, + confluenceSpaceRemovedTrigger, confluenceSpaceUpdatedTrigger, + confluenceUserCreatedTrigger, confluenceWebhookTrigger, } from '@/triggers/confluence' import { fathomNewMeetingTrigger, fathomWebhookTrigger } from '@/triggers/fathom' @@ -153,13 +160,29 @@ import { intercomWebhookTrigger, } from '@/triggers/intercom' import { + jiraCommentDeletedTrigger, + jiraCommentUpdatedTrigger, jiraIssueCommentedTrigger, jiraIssueCreatedTrigger, jiraIssueDeletedTrigger, jiraIssueUpdatedTrigger, + jiraProjectCreatedTrigger, + jiraSprintClosedTrigger, + jiraSprintCreatedTrigger, + jiraSprintStartedTrigger, + jiraVersionReleasedTrigger, jiraWebhookTrigger, jiraWorklogCreatedTrigger, + jiraWorklogDeletedTrigger, + jiraWorklogUpdatedTrigger, } from '@/triggers/jira' +import { + jsmRequestCommentedTrigger, + jsmRequestCreatedTrigger, + jsmRequestResolvedTrigger, + jsmRequestUpdatedTrigger, + jsmWebhookTrigger, +} from '@/triggers/jsm' import { lemlistEmailBouncedTrigger, lemlistEmailClickedTrigger, @@ -337,6 +360,13 @@ export const TRIGGER_REGISTRY: TriggerRegistry = { confluence_space_updated: confluenceSpaceUpdatedTrigger, confluence_label_added: confluenceLabelAddedTrigger, confluence_label_removed: confluenceLabelRemovedTrigger, + confluence_comment_updated: confluenceCommentUpdatedTrigger, + confluence_attachment_updated: confluenceAttachmentUpdatedTrigger, + confluence_page_restored: confluencePageRestoredTrigger, + confluence_blog_restored: confluenceBlogRestoredTrigger, + confluence_space_removed: confluenceSpaceRemovedTrigger, + confluence_page_permissions_updated: confluencePagePermissionsUpdatedTrigger, + confluence_user_created: confluenceUserCreatedTrigger, generic_webhook: genericWebhookTrigger, greenhouse_candidate_hired: greenhouseCandidateHiredTrigger, greenhouse_new_application: greenhouseNewApplicationTrigger, @@ -383,7 +413,21 @@ export const TRIGGER_REGISTRY: TriggerRegistry = { jira_issue_updated: jiraIssueUpdatedTrigger, jira_issue_deleted: jiraIssueDeletedTrigger, jira_issue_commented: jiraIssueCommentedTrigger, + jira_comment_updated: jiraCommentUpdatedTrigger, + jira_comment_deleted: jiraCommentDeletedTrigger, jira_worklog_created: jiraWorklogCreatedTrigger, + jira_worklog_updated: jiraWorklogUpdatedTrigger, + jira_worklog_deleted: jiraWorklogDeletedTrigger, + jira_sprint_created: jiraSprintCreatedTrigger, + jira_sprint_started: jiraSprintStartedTrigger, + jira_sprint_closed: jiraSprintClosedTrigger, + jira_project_created: jiraProjectCreatedTrigger, + jira_version_released: jiraVersionReleasedTrigger, + jsm_request_created: jsmRequestCreatedTrigger, + jsm_request_updated: jsmRequestUpdatedTrigger, + jsm_request_commented: jsmRequestCommentedTrigger, + jsm_request_resolved: jsmRequestResolvedTrigger, + jsm_webhook: jsmWebhookTrigger, lemlist_webhook: lemlistWebhookTrigger, lemlist_email_replied: lemlistEmailRepliedTrigger, lemlist_email_opened: lemlistEmailOpenedTrigger, diff --git a/apps/sim/triggers/types.ts b/apps/sim/triggers/types.ts index 69e5a5d2fbd..2fb5498c92b 100644 --- a/apps/sim/triggers/types.ts +++ b/apps/sim/triggers/types.ts @@ -1,6 +1,6 @@ export interface TriggerOutput { type?: string - description?: string + description?: string | TriggerOutput [key: string]: TriggerOutput | string | undefined }