Skip to main content

Hi Team, 

I am trying to work on a use case to delete attachments from a ticket once it has been closed for 30 days. I was able to delete one attachment but cannot figure out a way to create a loop for that attachment array and it runs till it traverses the complete array with all attachment ids.

I understand the logic but dont know how to get it in a json to do the job :)


Any help is greatly appreciated.

Thanks,

NB

This is the biggest limitation of Freshservice, Looping… we’re all waiting on it, 

 

The only method at the moment, is to run the same actions multiple times, 3,4,5 to be sure you got them all.  

You cannot say “Repeat this based on the number of items in the array”..

If someone else has a better answer I’d be keen to hear it. 


Hey,

 

we had the same issue, basically what we did is copy pasting the same events as mentioned by ​@Roxwell:
 

 

So far I do not know about any other option unfortunately.


Hi Team, 

I am trying to work on a use case to delete attachments from a ticket once it has been closed for 30 days. I was able to delete one attachment but cannot figure out a way to create a loop for that attachment array and it runs till it traverses the complete array with all attachment ids.

I understand the logic but dont know how to get it in a json to do the job :)


Any help is greatly appreciated.

Thanks,

NB

 GOOD NEWS - LOOPS IS Q4!! 


this is great news…:)


Loops are essential in automations, and it’s strange that Fresh does not have them in flows...yet. My workaround is to call a python script I have hosted in AWS, and process the data that way (also call Fresh API if required)


If you need to delete multiple attachments from a closed ticket via a web request, you’ll likely have to use the API’s delete or update endpoint, as most systems lock tickets after closure. Check if your platform supports bulk attachment deletion or requires reopening the ticket first. You may need to loop through each attachment ID in your request. Also, verify your user permissions—some APIs only allow deletion by admins or the original uploader.