{ "kind": "open-flow-workflow", "version": 1, "name": "Create or Comment Jira Issues for Splunk Alerts", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_4991cfad6cf78de5": { "name": "Receive a Splunk alert", "kind": "webhook", "bodyFields": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "inputs" }, { "jsonSchema": { "type": "string" }, "nullable": true, "handle": "description" }, { "jsonSchema": { "type": "string" }, "nullable": true, "handle": "messageBody" }, { "jsonSchema": { "type": "string" }, "nullable": true, "handle": "timestamp" } ], "method": "POST", "options": { "responseData": "{}", "responseHeaders": { "Content-Type": "application/json" }, "responseStatusCode": 200 } }, "n_b270bf7183798d4f": { "inputs": { "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_4991cfad6cf78de5", "output": "body" } ] }, "headers": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_4991cfad6cf78de5", "output": "headers" } ] }, "secret": { "kind": "unset" }, "fieldId": { "kind": "value", "value": "YOUR_CUSTOM_FIELD_ID" }, "projectId": { "kind": "value", "value": "YOUR_PROJECT_ID" }, "issueTypeId": { "kind": "value", "value": "YOUR_ISSUE_TYPE_ID" } }, "name": "Validate and prepare the alert", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "headers" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "secret" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "fieldId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "projectId" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "issueTypeId" } ], "outputs": [ { "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira Query Language string used to search issues." }, "nullable": false, "handle": "jql" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira project ID." }, "nullable": true, "handle": "projectId" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira issue type ID." }, "nullable": true, "handle": "issueTypeId" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira issue summary." }, "nullable": false, "handle": "summary" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "Plain text description converted to the connected deployment's document format." }, "nullable": true, "handle": "description" }, { "jsonSchema": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "Additional Jira issue fields by field key." }, "nullable": true, "handle": "extraFields" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "Plain text comment body converted to the connected deployment's document format." }, "nullable": false, "handle": "comment" } ], "name": "Validate and prepare the alert", "moduleId": "n_8d72c3b97b19fccc", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a6b775522cdca5c7": { "inputs": { "jql": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b270bf7183798d4f", "output": "jql" } ] }, "limit": { "kind": "value", "value": 50 } }, "name": "Search Jira for matching hosts", "kind": "task", "task": { "inputs": [ { "description": "The Jira Query Language string used to search issues.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira Query Language string used to search issues." }, "nullable": false, "handle": "jql" }, { "description": "Maximum number of items to return in one Jira page.", "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 100, "description": "Maximum number of items to return in one Jira page." }, "nullable": true, "handle": "limit", "value": null }, { "description": "Opaque pagination cursor returned by a previous Jira response.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Opaque pagination cursor returned by a previous Jira response." }, "nullable": true, "handle": "cursor", "value": null }, { "description": "Additional Jira issue fields to include in the response.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "A Jira field ID or name." }, "minItems": 1, "description": "Additional Jira issue fields to include in the response." }, "nullable": true, "handle": "includeFields", "value": null }, { "description": "Additional Jira issue expand tokens to include in the response.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "A Jira expand token." }, "minItems": 1, "description": "Additional Jira issue expand tokens to include in the response." }, "nullable": true, "handle": "expand", "value": null } ], "outputs": [ { "description": "The Jira issues returned by this page.", "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The Jira issue ID." }, "key": { "type": "string", "description": "The Jira issue key." }, "self": { "type": "string", "description": "The Jira API URL for this issue." }, "summary": { "type": "string", "description": "The Jira issue summary." }, "description": { "type": "object", "properties": { "type": { "const": "doc", "description": "The ADF root node type." }, "version": { "type": "integer", "description": "The ADF document version." }, "content": { "type": "array", "items": { "description": "An ADF top-level node." }, "description": "The ADF top-level content nodes." } }, "required": [ "type", "version", "content" ], "additionalProperties": true, "description": "The normalized Jira issue description in ADF." }, "status": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue status." }, "issueType": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue type." }, "project": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira project ID." }, "key": { "type": "string", "description": "The Jira project key." }, "name": { "type": "string", "description": "The Jira project name." }, "self": { "type": "string", "description": "The Jira API URL for this project." }, "description": { "type": "string", "description": "The Jira project description." }, "projectTypeKey": { "type": "string", "description": "The Jira project type key." }, "simplified": { "type": "boolean", "description": "Whether the project uses a simplified workflow." }, "style": { "type": "string", "description": "The Jira project style." }, "url": { "type": "string", "description": "The Jira project URL." }, "lead": { "type": "object", "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira project lead." }, "projectCategory": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira project category." }, "avatarUrls": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "Jira avatar URLs keyed by size." }, "raw": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira project payload." } }, "required": [ "id", "key", "name" ], "additionalProperties": true, "description": "The Jira issue project." }, "assignee": { "type": [ "object", "null" ], "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira issue assignee." }, "reporter": { "type": [ "object", "null" ], "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira issue reporter." }, "priority": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue priority." }, "labels": { "type": "array", "items": { "type": "string", "description": "A Jira issue label." }, "description": "The Jira issue labels." }, "created": { "type": "string", "description": "The Jira issue creation timestamp." }, "updated": { "type": "string", "description": "The Jira issue update timestamp." }, "dueDate": { "type": [ "string", "null" ], "description": "The Jira issue due date." }, "fields": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira fields payload." }, "raw": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira issue payload." } }, "required": [ "id", "key" ], "additionalProperties": true, "description": "A Jira issue." }, "description": "The Jira issues returned by this page." }, "nullable": false, "handle": "issues" }, { "description": "Jira pagination metadata.", "jsonSchema": { "type": "object", "properties": { "nextCursor": { "type": [ "string", "null" ], "description": "Cursor for the next Jira page, or null when there are no more results." } }, "required": [ "nextCursor" ], "additionalProperties": false, "description": "Jira pagination metadata." }, "nullable": false, "handle": "pagination" } ], "name": "Search Jira for matching hosts", "executor": { "kind": "connector", "action": "jira.search_issues" } } }, "n_fcb51014d0e1d6a5": { "inputs": { "issues": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a6b775522cdca5c7", "output": "issues" } ] } }, "name": "Select create or comment", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The Jira issue ID." }, "key": { "type": "string", "description": "The Jira issue key." }, "self": { "type": "string", "description": "The Jira API URL for this issue." }, "summary": { "type": "string", "description": "The Jira issue summary." }, "description": { "type": "object", "properties": { "type": { "const": "doc", "description": "The ADF root node type." }, "version": { "type": "integer", "description": "The ADF document version." }, "content": { "type": "array", "items": { "description": "An ADF top-level node." }, "description": "The ADF top-level content nodes." } }, "required": [ "type", "version", "content" ], "additionalProperties": true, "description": "The normalized Jira issue description in ADF." }, "status": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue status." }, "issueType": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue type." }, "project": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira project ID." }, "key": { "type": "string", "description": "The Jira project key." }, "name": { "type": "string", "description": "The Jira project name." }, "self": { "type": "string", "description": "The Jira API URL for this project." }, "description": { "type": "string", "description": "The Jira project description." }, "projectTypeKey": { "type": "string", "description": "The Jira project type key." }, "simplified": { "type": "boolean", "description": "Whether the project uses a simplified workflow." }, "style": { "type": "string", "description": "The Jira project style." }, "url": { "type": "string", "description": "The Jira project URL." }, "lead": { "type": "object", "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira project lead." }, "projectCategory": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira project category." }, "avatarUrls": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "Jira avatar URLs keyed by size." }, "raw": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira project payload." } }, "required": [ "id", "key", "name" ], "additionalProperties": true, "description": "The Jira issue project." }, "assignee": { "type": [ "object", "null" ], "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira issue assignee." }, "reporter": { "type": [ "object", "null" ], "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira issue reporter." }, "priority": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue priority." }, "labels": { "type": "array", "items": { "type": "string", "description": "A Jira issue label." }, "description": "The Jira issue labels." }, "created": { "type": "string", "description": "The Jira issue creation timestamp." }, "updated": { "type": "string", "description": "The Jira issue update timestamp." }, "dueDate": { "type": [ "string", "null" ], "description": "The Jira issue due date." }, "fields": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira fields payload." }, "raw": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira issue payload." } }, "required": [ "id", "key" ], "additionalProperties": true, "description": "A Jira issue." }, "description": "The Jira issues returned by this page." }, "nullable": false, "handle": "issues" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "empty" } ], "name": "Select create or comment", "moduleId": "n_051da2924b2bc9cc", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a359f16a6310a244": { "inputs": {}, "name": "No matching issue", "kind": "condition", "matchMode": "first", "cases": [ { "output": "create", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_fcb51014d0e1d6a5", "output": "empty" } }, "operator": "==", "right": { "kind": "value", "value": true } } ] } ] } ] }, "n_8779b1ba8127e426": { "inputs": { "projectId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b270bf7183798d4f", "output": "projectId" } ] }, "issueTypeId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b270bf7183798d4f", "output": "issueTypeId" } ] }, "summary": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b270bf7183798d4f", "output": "summary" } ] }, "descriptionText": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b270bf7183798d4f", "output": "description" } ] }, "extraFields": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b270bf7183798d4f", "output": "extraFields" } ] } }, "name": "Create a Jira issue", "kind": "task", "task": { "inputs": [ { "description": "The Jira project key.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira project key." }, "nullable": true, "handle": "projectKey", "value": null }, { "description": "The Jira project ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira project ID." }, "nullable": true, "handle": "projectId", "value": null }, { "description": "The Jira issue type ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira issue type ID." }, "nullable": true, "handle": "issueTypeId", "value": null }, { "description": "The Jira issue type name.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira issue type name." }, "nullable": true, "handle": "issueTypeName", "value": null }, { "description": "The Jira issue summary.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira issue summary." }, "nullable": false, "handle": "summary" }, { "description": "Plain text description converted to the connected deployment's document format.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Plain text description converted to the connected deployment's document format." }, "nullable": true, "handle": "descriptionText", "value": null }, { "description": "Raw Atlassian Document Format description.", "jsonSchema": { "type": "object", "properties": { "type": { "const": "doc", "description": "The ADF root node type." }, "version": { "type": "integer", "description": "The ADF document version." }, "content": { "type": "array", "items": { "description": "An ADF top-level node." }, "description": "The ADF top-level content nodes." } }, "required": [ "type", "version", "content" ], "additionalProperties": true, "description": "Raw Atlassian Document Format description." }, "nullable": true, "handle": "description", "value": null }, { "description": "Jira labels to apply to the new issue.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "A Jira issue label." }, "minItems": 1, "description": "Jira labels to apply to the new issue." }, "nullable": true, "handle": "labels", "value": null }, { "description": "The Jira Cloud account ID or Jira Server username to assign to the new issue.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira Cloud account ID or Jira Server username to assign to the new issue." }, "nullable": true, "handle": "assigneeAccountId", "value": null }, { "description": "The Jira priority ID.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira priority ID." }, "nullable": true, "handle": "priorityId", "value": null }, { "description": "The Jira due date in YYYY-MM-DD format.", "jsonSchema": { "type": "string", "format": "date", "description": "The Jira due date in YYYY-MM-DD format." }, "nullable": true, "handle": "dueDate", "value": null }, { "description": "The parent Jira issue key for subtasks.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The parent Jira issue key for subtasks." }, "nullable": true, "handle": "parentIssueKey", "value": null }, { "description": "Additional Jira issue fields by field key.", "jsonSchema": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "Additional Jira issue fields by field key." }, "nullable": true, "handle": "extraFields", "value": null } ], "outputs": [ { "description": "The created Jira issue.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The Jira issue ID." }, "key": { "type": "string", "description": "The Jira issue key." }, "self": { "type": "string", "description": "The Jira API URL for this issue." }, "summary": { "type": "string", "description": "The Jira issue summary." }, "description": { "type": "object", "properties": { "type": { "const": "doc", "description": "The ADF root node type." }, "version": { "type": "integer", "description": "The ADF document version." }, "content": { "type": "array", "items": { "description": "An ADF top-level node." }, "description": "The ADF top-level content nodes." } }, "required": [ "type", "version", "content" ], "additionalProperties": true, "description": "The normalized Jira issue description in ADF." }, "status": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue status." }, "issueType": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue type." }, "project": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira project ID." }, "key": { "type": "string", "description": "The Jira project key." }, "name": { "type": "string", "description": "The Jira project name." }, "self": { "type": "string", "description": "The Jira API URL for this project." }, "description": { "type": "string", "description": "The Jira project description." }, "projectTypeKey": { "type": "string", "description": "The Jira project type key." }, "simplified": { "type": "boolean", "description": "Whether the project uses a simplified workflow." }, "style": { "type": "string", "description": "The Jira project style." }, "url": { "type": "string", "description": "The Jira project URL." }, "lead": { "type": "object", "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira project lead." }, "projectCategory": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira project category." }, "avatarUrls": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "Jira avatar URLs keyed by size." }, "raw": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira project payload." } }, "required": [ "id", "key", "name" ], "additionalProperties": true, "description": "The Jira issue project." }, "assignee": { "type": [ "object", "null" ], "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira issue assignee." }, "reporter": { "type": [ "object", "null" ], "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira issue reporter." }, "priority": { "type": [ "object", "null" ], "properties": { "id": { "type": "string", "description": "The Jira identifier." }, "name": { "type": "string", "description": "The Jira display name." }, "key": { "type": "string", "description": "The Jira key." }, "self": { "type": "string", "description": "The Jira API URL for this object." }, "description": { "type": "string", "description": "The Jira description." } }, "additionalProperties": true, "description": "The Jira issue priority." }, "labels": { "type": "array", "items": { "type": "string", "description": "A Jira issue label." }, "description": "The Jira issue labels." }, "created": { "type": "string", "description": "The Jira issue creation timestamp." }, "updated": { "type": "string", "description": "The Jira issue update timestamp." }, "dueDate": { "type": [ "string", "null" ], "description": "The Jira issue due date." }, "fields": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira fields payload." }, "raw": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira issue payload." } }, "required": [ "id", "key" ], "additionalProperties": true, "description": "The created Jira issue." }, "nullable": false, "handle": "issue" } ], "name": "Create a Jira issue", "executor": { "kind": "connector", "action": "jira.create_issue" } } }, "n_7400f480260cfc24": { "inputs": { "issues": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a6b775522cdca5c7", "output": "issues" } ] }, "previousState": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7400f480260cfc24", "output": "state" } ] }, "comment": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_b270bf7183798d4f", "output": "comment" } ] } }, "name": "Prepare next comment", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "array", "items": { "type": "object", "additionalProperties": true } }, "nullable": false, "handle": "issues" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": true, "handle": "previousState" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "comment" } ], "outputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "state" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "more" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira issue ID or key." }, "nullable": false, "handle": "issueKey" }, { "jsonSchema": { "type": "string", "minLength": 1, "description": "Plain text comment body converted to the connected deployment's document format." }, "nullable": true, "handle": "comment" } ], "name": "Prepare next comment", "moduleId": "n_8c77acb9d65eb6a7", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_dabd84d5edc06fcd": { "inputs": {}, "name": "More matching issues", "kind": "condition", "matchMode": "first", "cases": [ { "output": "comment", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_7400f480260cfc24", "output": "more" } }, "operator": "==", "right": { "kind": "value", "value": true } } ] } ] } ] }, "n_6a6f98d45c3dfe4e": { "inputs": { "issueIdOrKey": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7400f480260cfc24", "output": "issueKey" } ] }, "bodyText": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_7400f480260cfc24", "output": "comment" } ] } }, "name": "Comment on the issue", "kind": "task", "task": { "inputs": [ { "description": "The Jira issue ID or key.", "jsonSchema": { "type": "string", "minLength": 1, "description": "The Jira issue ID or key." }, "nullable": false, "handle": "issueIdOrKey" }, { "description": "Plain text comment body converted to the connected deployment's document format.", "jsonSchema": { "type": "string", "minLength": 1, "description": "Plain text comment body converted to the connected deployment's document format." }, "nullable": true, "handle": "bodyText", "value": null }, { "description": "Raw Atlassian Document Format comment body.", "jsonSchema": { "type": "object", "properties": { "type": { "const": "doc", "description": "The ADF root node type." }, "version": { "type": "integer", "description": "The ADF document version." }, "content": { "type": "array", "items": { "description": "An ADF top-level node." }, "description": "The ADF top-level content nodes." } }, "required": [ "type", "version", "content" ], "additionalProperties": true, "description": "Raw Atlassian Document Format comment body." }, "nullable": true, "handle": "body", "value": null } ], "outputs": [ { "description": "The created Jira comment.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The Jira comment ID." }, "self": { "type": "string", "description": "The Jira API URL for this comment." }, "body": { "anyOf": [ { "type": "object", "properties": { "type": { "const": "doc", "description": "The ADF root node type." }, "version": { "type": "integer", "description": "The ADF document version." }, "content": { "type": "array", "items": { "description": "An ADF top-level node." }, "description": "The ADF top-level content nodes." } }, "required": [ "type", "version", "content" ], "additionalProperties": true, "description": "Atlassian Document Format document." }, { "type": "string", "description": "Plain text returned by Jira Server or Data Center." } ], "description": "The Jira comment body in the connected deployment's format." }, "author": { "type": [ "object", "null" ], "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira comment author." }, "updateAuthor": { "type": [ "object", "null" ], "properties": { "accountId": { "type": "string", "description": "The Jira account ID." }, "name": { "type": "string", "description": "The Jira Server username." }, "key": { "type": "string", "description": "The Jira Server user key." }, "accountType": { "type": "string", "description": "The Jira account type." }, "displayName": { "type": "string", "description": "The Jira display name." }, "emailAddress": { "type": "string", "description": "The Jira email address when available." }, "active": { "type": "boolean", "description": "Whether the Jira account is active." }, "self": { "type": "string", "description": "The Jira API URL for this user." }, "timeZone": { "type": "string", "description": "The Jira user time zone." } }, "additionalProperties": true, "description": "The Jira comment update author." }, "created": { "type": "string", "description": "The Jira comment creation timestamp." }, "updated": { "type": "string", "description": "The Jira comment update timestamp." }, "jsdPublic": { "type": "boolean", "description": "Whether the Jira comment is public in JSM." }, "raw": { "type": "object", "additionalProperties": { "description": "A record value." }, "description": "The original Jira comment payload." } }, "required": [ "id" ], "additionalProperties": true, "description": "The created Jira comment." }, "nullable": false, "handle": "comment" } ], "name": "Comment on the issue", "executor": { "kind": "connector", "action": "jira.add_comment" } } } }, "edges": [ { "source": "n_4991cfad6cf78de5", "target": "n_b270bf7183798d4f" }, { "source": "n_b270bf7183798d4f", "target": "n_a6b775522cdca5c7" }, { "source": "n_a6b775522cdca5c7", "target": "n_fcb51014d0e1d6a5" }, { "source": "n_fcb51014d0e1d6a5", "target": "n_a359f16a6310a244" }, { "source": "n_a359f16a6310a244", "target": "n_8779b1ba8127e426", "sourceHandle": "create" }, { "source": "n_a359f16a6310a244", "target": "n_7400f480260cfc24", "sourceHandle": "otherwise" }, { "source": "n_7400f480260cfc24", "target": "n_dabd84d5edc06fcd" }, { "source": "n_dabd84d5edc06fcd", "target": "n_6a6f98d45c3dfe4e", "sourceHandle": "comment" }, { "source": "n_6a6f98d45c3dfe4e", "target": "n_7400f480260cfc24" } ] } }, "modules": { "n_8d72c3b97b19fccc": { "name": "Validate and prepare the alert", "imports": [], "source": "export default function prepare({body,headers,secret,fieldId,projectId,issueTypeId}){\n if(typeof secret!=='string'||secret.length<24||headers?.['x-splunk-secret']!==secret)throw Error('Invalid alert secret');\n const original=body?.inputs?.A?.key?.['host.name'];if(typeof original!=='string'||!original.trim())throw Error('Alert host is required');\n const host=original.replace(/[^a-zA-Z0-9 ]/g,'');if(!host.trim())throw Error('Host is empty after normalization');\n if(!/^customfield_\\d+$/.test(fieldId))throw Error('Set the Jira custom field ID');\n if(!/^\\d+$/.test(projectId)||!/^\\d+$/.test(issueTypeId))throw Error('Set numeric Jira project and issue type IDs');\n const description=typeof body.description==='string'?body.description:'',message=typeof body.messageBody==='string'?body.messageBody:'',timestamp=typeof body.timestamp==='string'?body.timestamp:'';\n return {jql:`cf[${fieldId.slice(12)}] ~ \"${host}\"`,projectId,issueTypeId,summary:`Splunk Alert for host ${original}: ${description}`,description:`${description}\\n\\n${message}`,extraFields:{[fieldId]:host},comment:`Timestamp: ${timestamp}\\nDescription: ${description}`};\n}\n" }, "n_051da2924b2bc9cc": { "name": "Select create or comment", "imports": [], "source": "export default function({issues}){return {empty:issues.length===0};}" }, "n_8c77acb9d65eb6a7": { "name": "Prepare next comment", "imports": [], "source": "export default function next({issues,previousState,comment}){\n const index=previousState===null?0:previousState.index+1;\n if(index>=issues.length)return {state:{index},more:false,issueKey:'-',comment};\n const key=issues[index]?.key;if(typeof key!=='string'||!key)throw Error('Search returned an issue without a key');\n return {state:{index},more:true,issueKey:key,comment};\n}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }