Skipping through Duplicate Attatchments

pranav12
Giga Contributor

Hi all,

I have created a copy attatchment flow in flow designer(Update record as trigger).Now when I upload a attatchment and update the record the flow is getting triggered and the attatchment is being uploaded into JIRA and later when I change details of that record and update, the attatchment is again being uploaded into jira, now in my jira story I have 2 attatchments, like it is being duplicated how do I tackle this in flow-designer.(how can I skip through already uploaded attatchment or any roundabout way is accepted.) 

Thanks in advance.

1 ACCEPTED SOLUTION

pranav12
Giga Contributor

I found the solution for this Avoid Duplicate Attachment - JIRA SPOKE please refer this link and mark if helpful

Thanks for everyone who replied to this question.

View solution in original post

8 REPLIES 8

OlaN
Giga Sage
Giga Sage

Hi,

If your trigger is record updated, then ALL changes on that record will effectively trigger the Flow, and upload/copy the attachment, regardless if the attachment has been uploaded already.

If this should not be duplicated, you will need to change the trigger.

Consider instead using sys_attachment record being created, with a condition that the table_name is incident or whatever your requirement is.

pranav12
Giga Contributor

Hello,

Thanks for the answer, Unfortunately this works if the target record is inside servicenow but since my target record is outside servicenow(I have to update it in JIRA) ("whenever I am updating one new attachment in story , it is sending all the existing attachments again to JIRA"). I cannot use this method. if any other alternative is present please do provide me I will definately try it out.

Thanks.

So if ServiceNow is authoritative regarding attachments, maybe you should handle the duplicates on the JIRA side. If an attachment gets uploaded with the same name, remove (older) attachments already present with the same name.

pranav12
Giga Contributor

I found the solution for this Avoid Duplicate Attachment - JIRA SPOKE please refer this link and mark if helpful

Thanks for everyone who replied to this question.