Question

Removing attachments from tickets - Automation

  • 7 December 2022
  • 5 replies
  • 317 views

Badge +2

HI everyone,

I am looking to set up an automated deletion of any attachments on tickets after 30days.  I require the ticket to remain but just the attachment to be deleted.

Would anyone know if this is possible and how I would go about setting this up.

Thanks

Dani


5 replies

Userlevel 6
Badge +10

Hi Dani,

 

You cannot schedule workflows yet so you will not be able to do so after 30 days. but you would need to action on an update. Maybe when your tickets move from resolved to closed would be a good idea? 

I would first off ask yourself why you wish to remove the attachments…..

 

I cannot find anything on the actions of a ticket workflow, so i would assume you would have to do this via a Web Request using an API. 

https://api.freshservice.com/#delete_a_ticket_attachment

 

To do that you will need the ticket ID and the Attachment ID. so i’m guessing you’ll need to do some work with expressions to get the ID. 

 

 

Maybe something like this. 

 

  1. Event - When ticket Closed
  2. Condition - Ticket field - Attachment Included
  3. WebRequest - Get Ticket Details
  4. Json Parser - To get the ticket details out into a readable format. 
  5. Expression - Remove “X” number of characters from the front of your URL (Dependant on the length of your URL which should be consistent apart)
  6. Expression - Remove “X” number of characters from the back of your URL (Dependant on the length of your URL which should be consistent apart) (This will give your Attachment ID)
  7. WebRequest - Delete Ticket Attachment using The recently acquired Attachment ID and your Ticket ID from the Get ticket details WebRequest.

 

Obviously not tested this so might need some tweaking but in theory should work. 

 

 

 

Userlevel 7
Badge +16

Good news @Dani and @afautley the ability to schedule workflow is coming and currently in beta.

https://support.freshservice.com/en/support/solutions/articles/50000004790-introduction-to-scheduled-workflows

This will help solve a number of business problems! :)

Userlevel 6
Badge +10

It will enable me to decommission a who application and 2 servers!!!

@Jack Day any news on getting us added to this? i know we mentioned it previously. 

 

@Dani  this will only replace step one all other parts i thin will still be needed.

@afautley - I have confirmed with Product that you are on the list, they will let me know when the beta is enabled for your account. 

Badge +5

I don’t see that Dani’s question was ever properly answered.  She is not looking for something that were tell her team when to do work.  She wants the system to do the work for her.  I think that’s why we rely on computers and automations.  

Here’s a use case for you…  Voicemails get forwarded to your team via email and land in Freshdesk with a WAV attachment.  Your data retention policy dictates that voice recordings are deleted after 90 days.

If I read this conversation correctly, Freshdesk is going to give us the ability to remind us to do it.  Great, but this task should be done every day or perhaps once every week or two.  A calendar event can remind us to do it.  Since we have a “sophisticated” tool designed to simplify tasks and allow agents to focus on support, why not let that tool do the work without the need for human intervention?

Am I right, @Dani?

Reply