Dear all,
We are working on a solution for attaching social media image files to new Asana tasks. Some of those tasks have several images, to be posted together. The Zap we have build so far extracts the first four characters from the file names (‘S00X') and whenever there are files that are named as ‘S00X-01’, 'S00X-02’, it attaches them to the same task.
Here’s a screenshot of how the Zap works now:
-
File is added to the G Drive folder
-
Truncate the first 4 digits of its name = truncName
-
‘Delay after queue', so that zap waits for the previous file to be processed before starting with the next one. They have to be executed consecutively, otherwise it doesn’t find the tasks with the same name and creates duplicates.
-
Find task in Asana with the title truncName. If no such task, create the task truncName and attach the file to it
-
If truncName Asana task exists, add the file to it.
![](https://uploads-us-west-2.insided.com/zapier-ca/attachment/55b5a048-cb32-43ec-9cae-5ab987b67488.png)
However, the problem is that whenever we need to replace some of the attachments that come after client feedback, we have to manually delete them from both Google Drive folder and the Asana task, then drop into the folder again for them to be attached.
Instead, we would like to improve this Zap to do the following:
-
When the image file is added to the Google folder, look up the task that has name as truncName and check if it already has the attachment with the same name as the file just added.
-
If the attachment with the same name exists, remove it and attach this new file instead.
Since there is only a ready-made option to ‘add attachments’ but no way to remove them, we’ve found suggestions to use Web hooks and Code by Zapier to retrieve the attachments and delete them, however I have no experience of writing API calls or coding, and therefore wanted to reach out for your help first.
Thank you!