Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "jql": "issuekey = ITSM-1",
  "sourceKey": "{{issue.key}}",
  "commentId": "{{issue.comment.last.id}}",
  "createComment": true
}
Info
  • If the {{issue.comment.last.id}} smart value with createComment: true is used, a comment will be created on the target instance, with links to the attachments:

    image-20250209-130208.pngImage Added
  • If the last comment does not contain an attachment, the comment will not be created on the target instance.

  • Headers

Key

Value

Accept

Application/JSON

Authorization

Use the generated API token for the value in the Authorization header.

...

After configuring the automation, the attachment will be sent to the target instance, based on the defined trigger(s).

Examples of the web request bodies for Jira automation

  • Send all the attachments on a trigger:

Code Block
{
  "jql": "issuekey = ITSM-1",
  "sourceKey": "{{issue.key}}"
}
  • Send the attachment of the last comment in a trigger, creating a comment on a target cloud instance with the link to the attachment:

Code Block
{
  "jql": "issuekey = ITSM-1",
  "sourceKey": "{{issue.key}}",
  "commentId": "{{issue.comment.last.id}}"
}

...

Info

Clicking the attachment name will open it.

  • Send the attachment of the last comment on a trigger, without creating a comment on a target cloud instance:

Code Block
{
  "jql": "issuekey = ITSM-1",
  "sourceKey": "{{issue.key}}",
  "commentId": "{{issue.comment.last.id}}",
  "createComment": false
}

External application

Make a POST request with the generated URL endpoint. To authenticate your API requests, include an Authorization header in each request. The value of this header should be the API token generated from the API Tokens page. The sample request structure:

...