When to Use
- Comment verification after add: After calling
comment/add, call comment/get with the returned commentId to verify the comment was saved correctly and the body matches the expected content — useful in idempotency-sensitive workflows.
- Audit comment extraction: A compliance workflow stores comment IDs in a MongoDB collection. During an audit, the workflow retrieves each comment by ID to reconstruct the full activity record with author and timestamp.
- Comment-based workflow triggers: An external system (e.g. a Jira webhook) fires when a comment is added. The workflow receives the comment ID in the payload and calls
comment/get to read the full comment body and parse structured data (e.g. a JSON block embedded in the comment).
- Automated comment review: A moderation workflow detects potentially sensitive content. Given a specific comment ID flagged by a filter, it retrieves the full comment to process the text through a content classifier before deciding to remove it.
- Comment status parsing: Automated systems post structured status blocks as comments (e.g. deployment status in a specific format). A downstream workflow retrieves a known comment ID and parses the body to extract machine-readable status fields.
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 that contains the comment. Example: PROJ-123. |
CommentId | Required | The numeric ID of the comment to retrieve. Obtained from a prior comment/add response or from a Jira webhook payload. Example: "10281". |
Sample Configuration
{
"resource": "comment",
"operation": "get",
"Host": "https://acmecorp.atlassian.net",
"Email": "automation@acmecorp.com",
"ApiToken": "{{ $credentials.jiraApiToken }}",
"IssueKey": "{{ $json.issueKey }}",
"CommentId": "{{ $json.commentId }}"
}
Validation Errors
| Error Code | Cause |
VAL_MISSING_ISSUE_KEY | IssueKey is empty or null. |
VAL_MISSING_COMMENT_ID | CommentId is empty or null. |
COMMENT_NOT_FOUND | No comment exists with the given ID on this issue, or the user lacks access. |
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 | The comment's Jira ID. |
body | string | Full comment text body. |
author | string | Display name of the comment author. |
created | string | ISO 8601 timestamp of when the comment was created. |
updated | string | ISO 8601 timestamp of the last edit. Equal to created if never edited. |
resource | string | Always "comment" |
operation | string | Always "get" |
Sample Output
{
"status": "success",
"commentId": "10281",
"body": "DEPLOYMENT CONFIRMED — 2026-05-26 14:30 UTC\n\nEnvironment: production\nVersion: v2.4.1\nBuild: #882\nAll health checks passing.",
"author": "BizFirst Automation",
"created": "2026-05-26T14:30:05.000Z",
"updated": "2026-05-26T14:30:05.000Z",
"resource": "comment",
"operation": "get"
}
Expression Reference
| Expression | Type | Example Value | Use |
{{ $output.getComment.body }} | string | Full comment text | Parse structured data embedded in comment |
{{ $output.getComment.author }} | string | "BizFirst Automation" | Verify comment was posted by automation user |
{{ $output.getComment.created }} | string | ISO timestamp | Calculate time since comment was posted |
{{ $output.getComment.commentId }} | string | "10281" | Pass to comment/update for corrections |
Node Policies & GuardRails
- Store commentId from comment/add: To use
comment/get later, you must store the commentId returned by comment/add in a persistent store (MongoDB, VariableAssignment) — Jira does not provide a search-by-content API for comments.
- IssueKey and CommentId must match: The comment must belong to the specified issue. Passing a comment ID from a different issue will result in
COMMENT_NOT_FOUND.
- Use comment/getAll for unknown IDs: If you don't have a specific comment ID, use
comment/getAll to retrieve the full comment list and filter by author or content pattern.
Workflow Example — Parse Structured Comment
// Step 1: Jira webhook fires on comment added
// Step 2: comment/get — retrieve comment body
{
"resource": "comment",
"operation": "get",
"IssueKey": "{{ $json.webhookPayload.issueKey }}",
"CommentId": "{{ $json.webhookPayload.commentId }}"
}
// Step 3: Function node — parse deployment status from comment body
// if body starts with "DEPLOYMENT STATUS:" extract fields
// Step 4: Route based on parsed status