Forums

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

Attachment(s) added trigger in Automation

Dirk Ronsmans
Community Champion
April 29, 2025

Hi,

For a simple integration between 2 systems (Jira <> Not Jira), we are using Automation rules  to push data from one side to the other. 

95% of the stuff we're trying to do works fine using the "send web request" and "incoming webhook" triggers, but we're having some issues with Attachments.

Initially we divided it up in to 2 scenario's:

  • Incoming Attachments
  • Outgoing Attachments

and unfortunately each has it's own set of challenges.

For the incoming attachments we had to figure out how to transform a base64 string in to something that the Atlassian REST API's would accept and had to pivot to writing an Azure function that we call from Automation that then adds the attachment to the needed work item.

For the outgoing attachments we are facing other challenges and for that I wonder if someone has advice on the following questions.

  1. How do we trigger an Automation to run when an Attachment is added? There is no real "attachment added trigger" but according to the documentation a "Field value changed" trigger on the field Attachment should also work? In my personal experience it doesn't trigger when I add an attachment.
  2. If we somehow trigger the "adding of an attachment" it seems to be added as comment each time (that's ok) but how do we know how many attachments were added at once? Mainly because this could be a comment that was added with multiple inline images. Using Automation, we can use  the {{attachment}} smartvalue and also get the {{attachment.last}} but we have no idea of knowing how many attachments we need to get..
  3. How do we get the content of an attachment? The smart value also allows for {{attachment.last.content}} to be used but that just returns a content url which we of course can call again to get the attachment itself. Is there an easier way to this?

 

For 3. we might need to just write another Azure function to call the content url and push it to the other system, but that of course has no way of succeeding if we cannot trigger an action and sequentially know which attachment(s) to get..

Anybody got some ideas? If we can solve 1. I feel we might need to move entirely to a Azure function to see what was added in the last x minutes and pull the data.

I don't want to move to a marketplace app to do this since we need to be able to make this as generic as possible to eventually integrate with multiple (legacy) systems.

1 answer

0 votes
Kiam Venter
Contributor
April 29, 2025

I do see there is a rule under

Pages:

  • Attachment added to page
So if you can use confluence for this, it may help with the use of this automation.
Dirk Ronsmans
Community Champion
April 29, 2025

@Kiam Venter , (Sadly) no Confluence in this use case.

We are using the automations to synchronize work items and work item data (like comments) for Service Management issues toward an external system (and the other way around)

Like Kiam Venter likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events