Portal Community

When to Use

Configuration

Connection

FieldRequiredDescription
HostRequiredJira instance base URL. Example: https://acmecorp.atlassian.net
EmailRequiredAtlassian account email. Example: automation@acmecorp.com
ApiTokenRequiredAPI token from Atlassian security settings. Store in Credentials Manager.

Operation Fields

FieldRequiredDescription
IssueKeyRequiredThe key of the issue to attach the file to. Example: OPS-347.
FilePathRequiredAbsolute path to the file on the workflow server's filesystem. Example: /tmp/incident-logs-2026-05-26.txt. The file must be accessible to the workflow engine process.
FileNameOptionalOverride the file name shown in Jira. If omitted, the actual file name from FilePath is used. Use this to give attachments meaningful names: incident-OPS-347-logs-2026-05-26.txt.
File size limit: Jira Cloud supports attachments up to 10MB by default (configurable by Jira admins). For larger files such as heap dumps or full log archives, consider uploading to S3 or a cloud store and attaching only a link in a comment.

Sample Configuration

Attach a generated incident log file to a Jira issue:

{
  "resource": "attachment",
  "operation": "add",
  "Host": "https://acmecorp.atlassian.net",
  "Email": "automation@acmecorp.com",
  "ApiToken": "{{ $credentials.jiraApiToken }}",
  "IssueKey": "{{ $json.issueKey }}",
  "FilePath": "{{ $json.logFilePath }}",
  "FileName": "incident-{{ $json.issueKey }}-logs-{{ $now | date('YYYY-MM-DD-HHmm') }}.txt"
}

Validation Errors

Error CodeCause
VAL_MISSING_ISSUE_KEYIssueKey is empty or null.
VAL_MISSING_FILE_PATHFilePath is empty or null.
FILE_NOT_FOUNDThe file at FilePath does not exist or is not readable by the workflow engine.
FILE_TOO_LARGEFile exceeds the Jira instance's attachment size limit.
ISSUE_NOT_FOUNDNo issue exists with the given key, or the user lacks access.
AUTH_FAILEDInvalid credentials or expired API token.

Output Fields

FieldTypeDescription
statusstring"success" or "error"
attachmentIdstringInternal Jira attachment ID. Store this if you need to retrieve or delete the attachment later.
issueKeystringKey of the issue the file was attached to.
fileNamestringFile name as stored in Jira (the overridden name if FileName was set).
fileSizeintegerFile size in bytes.
resourcestringAlways "attachment"
operationstringAlways "add"

Sample Output

{
  "status": "success",
  "attachmentId": "10044",
  "issueKey": "OPS-347",
  "fileName": "incident-OPS-347-logs-2026-05-26-1430.txt",
  "fileSize": 48312,
  "resource": "attachment",
  "operation": "add"
}

Expression Reference

ExpressionTypeExample ValueUse
{{ $output.addAttachment.attachmentId }}string"10044"Store for later retrieval or deletion
{{ $output.addAttachment.fileName }}stringStored file nameConfirm file name in post-attach comment
{{ $output.addAttachment.fileSize }}integer48312Log file size for audit records

Node Policies & GuardRails

Workflow Examples

Example 1 — Attach Incident Logs to P1 Bug

// Step 1: issue/create — create P1 bug, get issueKey
// Step 2: Function node — collect recent log lines, write to /tmp/
// Step 3: attachment/add
{
  "resource": "attachment",
  "operation": "add",
  "IssueKey": "{{ $output.createIssue.issueKey }}",
  "FilePath": "/tmp/service-logs-{{ $now | date('YYYYMMDDHHmm') }}.txt",
  "FileName": "{{ $output.createIssue.issueKey }}-logs.txt"
}
// Step 4: comment/add — reference the attachment in the issue comment

Example 2 — Attach Test Report After CI Run

// Post-CI pipeline webhook triggers with test results path
{
  "resource": "attachment",
  "operation": "add",
  "IssueKey": "{{ $json.jiraStoryKey }}",
  "FilePath": "{{ $json.testReportPath }}",
  "FileName": "test-report-{{ $json.buildNumber }}-{{ $now | date('YYYY-MM-DD') }}.html"
}