Versions Compared

Key

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

Table of Contents

...

  • Web request URL

    • Fill with the generated URL endpoint, e.g.:

      • https://attachments-transfer-api.twinit.app/gateway/transferAttachments?id=aef469b5-34e5-4e16-942f-d3916d33b6b5

  • HTTP method

    • POST

  • Web request body

    • Custom data

      • jql (string) - (Required): The JQL query to find the target issue.

        • JQL has a limit of 10 issues per automation action!

      • sourceKey (string) - (Required): The key of the source issue.

      • commentId (string) - (Optional): The ID of the comment (if applicable):

        • If the commentId is included, only the attachments related to the specific comment will be sent. If the commentId is absent, all the issue attachments will be transferred.

        • You can use the {{issue.comment.last.id}} smart value to send the attachments attached to the last comment on the issue. If you need to send the attachment attached to the specific comment(s), use the specific commentId value(s) of the commentId instead of the smart value.

          • If the {{issue.comment.last.id}} smart value is added, you can also decide whether to create a comment (with the attachments links) or not. By default, the comment will be created on the target instance with the attachment links. If you don’t want to create a comment on the target instance, add createCommentcreateAsComment: false in the request body.

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

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

...

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

Send attachments to Assets

...

Note

If several attachments are sent to several objects, depending on the number and size of the attachments, the automation log may return “Response 408 SocketException: Socket closed”. However, this might be a false error and the attachments will be sent to the objects.

...