When to Use
- Deployment confirmation: After a CI/CD pipeline deploys a release, a post-deploy webhook triggers a BizFirst workflow that adds a structured comment to the Jira release issue with the deployment environment, version, timestamp, build URL, and deploying engineer's name.
- Incident timeline logging: During a production incident, automated monitoring systems post timestamped status updates as comments on the Jira incident issue — e.g. "14:35 UTC — Database failover initiated by automated recovery script. Primary is recovering."
- External system cross-reference: When a Zendesk support ticket is escalated and linked to a Jira issue, a workflow comments on the Jira issue with the Zendesk ticket ID, customer name, account tier, and a direct link — giving engineers full customer context without switching tools.
- Automated test results: After a test suite runs against a release branch, a workflow comments on the linked story with pass/fail counts, test duration, failed test names, and a link to the test report in the CI system.
- Code review feedback aggregation: When a PR receives a specified number of change-request reviews, a workflow comments on the linked Jira issue summarising the blocking feedback so the PM and team lead are aware without reading all GitHub review threads.
Configuration
Connection
| Field | Required | Description |
Host | Required | Jira instance base URL. Example: https://acmecorp.atlassian.net |
Email | Required | Atlassian account email. Example: automation@acmecorp.com |
ApiToken | Required | API token from Atlassian security settings. Store in Credentials Manager. |
Operation Fields
| Field | Required | Description |
IssueKey | Required | The key of the issue to comment on. Example: PROJ-123. |
Body | Required | Comment text. Plain text, supports newlines (\n). Supports expression interpolation. Maximum length follows Jira's comment size limit (approximately 32KB). Comments appear in the issue activity stream attributed to the API token's user account. |
Sample Configuration
Post a deployment confirmation comment after a successful CI/CD deployment:
{
"resource": "comment",
"operation": "add",
"Host": "https://acmecorp.atlassian.net",
"Email": "automation@acmecorp.com",
"ApiToken": "{{ $credentials.jiraApiToken }}",
"IssueKey": "{{ $json.jiraIssueKey }}",
"Body": "*DEPLOYMENT CONFIRMED — {{ $now | date('YYYY-MM-DD HH:mm') }} UTC*\n\nEnvironment: {{ $json.environment }}\nVersion: {{ $json.version }}\nBuild: {{ $json.buildNumber }}\nDeployed By: {{ $json.deployedBy }}\nBuild URL: {{ $json.buildUrl }}\n\nAll health checks passing. Issue is live in {{ $json.environment }}.\n\n_Posted by BizFirst automation_"
}
Validation Errors
| Error Code | Cause |
VAL_MISSING_ISSUE_KEY | IssueKey is empty or null. |
VAL_MISSING_BODY | Body is empty or null. |
ISSUE_NOT_FOUND | No issue exists with the given key, or the user lacks access. |
AUTH_FAILED | Invalid credentials or expired API token. |
Output Fields
| Field | Type | Description |
status | string | "success" or "error" |
commentId | string | Internal Jira comment ID. Store this if you need to update or delete the comment later. Example: "10281" |
issueKey | string | Key of the issue the comment was added to. |
resource | string | Always "comment" |
operation | string | Always "add" |
Sample Output
{
"status": "success",
"commentId": "10281",
"issueKey": "PROJ-123",
"resource": "comment",
"operation": "add"
}
Expression Reference
| Expression | Type | Example Value | Use |
{{ $output.addComment.commentId }} | string | "10281" | Store for later update/delete operations |
{{ $output.addComment.issueKey }} | string | "PROJ-123" | Confirm the comment landed on the correct issue |
{{ $output.addComment.status }} | string | "success" | Gate post-comment notifications |
Node Policies & GuardRails
- Comments are attributed to the API user: All automated comments appear in Jira under the API token's user account. Use a named service account (e.g. "BizFirst Automation") so comments are clearly identified as automated, not from a human user.
- Idempotency: Jira has no built-in comment dedup. If a webhook fires twice (e.g. from a retry), you will get duplicate comments. Consider storing the
commentId in MongoDB and checking for it before adding.
- Comment length: Very long comments (multi-KB stack traces) work fine but may impact readability. Consider truncating stack traces to the first 50 lines for comments and attaching the full log as a file using
attachment/add.
Workflow Examples
Example 1 — Post Deployment Comment
// Triggered by GitHub Actions post-deploy webhook
{
"resource": "comment",
"operation": "add",
"IssueKey": "{{ $json.jiraKey }}",
"Body": "*DEPLOYED to {{ $json.env }}* — {{ $now }}\nVersion: {{ $json.version }}\nBuild: #{{ $json.buildId }}\nStatus: All health checks green\n\nRelease notes: {{ $json.releaseNotesUrl }}"
}
Example 2 — Automated Incident Timeline Update
// Alert system fires status update
{
"resource": "comment",
"operation": "add",
"IssueKey": "{{ $json.incidentKey }}",
"Body": "*{{ $now | date('HH:mm') }} UTC — Automated Status Update*\n\n{{ $json.updateMessage }}\n\nError rate: {{ $json.errorRate }}%\nAffected users: {{ $json.affectedCount }}\nNext review: {{ $json.nextReviewTime }}"
}