Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Transmit Attachment to external system

Clemens Heisinger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 27, 2025

Hello everybody,

I have following problem and struggle with a solution:

We use JSM as Ticketing System, and we have functional interface to the customer ticket system (with JIRA globale automation and it works with SOAP/REST )

The problem is, i can transmit the attachments in JSM to the external system, but the automation rules everytime transmitt every attachment several times.

How can I ensure that each attachment is only transferred once?

 

Do you have any suggestions to me?

I have already implemented the attachment ID being stored in a custom field. However, I am unable to compare the values and then use them to build a conditional rule.


Thank you very much,

BR
Clemens

1 answer

0 votes
John D Patton
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 27, 2025

Hello Clemens,

You've run into a common challenge, and your idea of storing the attachment IDs in a custom field is a great start!

The core best practice here is to have your rule loop through all attachments but only act on the ones it hasn't "seen" before.

Here is the simple, standard Atlassian-approved way to build this.

Suggested Automation Rule

  1. Trigger: Field Value Changed

    • For the "Fields to monitor," select Attachment. This rule will now run only when the list of attachments changes.

  2. Condition: User condition

    • To prevent the rule from triggering itself in a loop, add this condition:

    • Set "User who triggered the event" is not "Automation for Jira".

  3. Action: Branch rule / related issues

    • In the "Type of related issues" dropdown, select Attachments. This is the key step. It will make the rule run the following actions once for every attachment on the issue.

  4. Inside the Branch: Advanced compare condition

    • This is where you check your custom field.

    • First value: {{issue.YourCustomFieldForIDs}} (e.g., {{issue.ProcessedAttachmentIDs}})

    • Condition: does not contain

    • Second value: {{attachment.id}} (Inside a branch, {{attachment}} refers to the single file for that loop).

  5. Action: Send web request

    • Place your SOAP/REST action here. It will only run if the condition above is met (meaning the ID is new).

    • You can now safely use smart values like {{attachment.filename}} and {{attachment.content}} to send the new file.

  6. Action: Edit issue

    • This is the last step. After you send the file, add its ID to your field to mark it as "processed."

    • Field to edit: ProcessedAttachmentIDs

    • Value: {{issue.ProcessedAttachmentIDs.withDefault("")}},{{attachment.id}} (This appends the new ID to the list).

This method is the most reliable way to ensure every attachment is processed exactly once.

Atlassian Resources

For more details on the components, here is the official documentation:

I hope this helps you get it working!

Clemens Heisinger
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 27, 2025

Hi, 

thank you for your answer, looks very good - BUT: i cannot select Attachments in the "Type of related issues" dropdown. I don't have this as an option.

BR
Clemens

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events