So the zap seams pretty simple
I’m using new Attachment in gmail trigger and I want to upload the attachments to Google Drive.
each attachment could be a different file type so I’m leaving the “File Extension” parameter blank. (screenshot attached)
I’m expecting the filename to be “2024.12.06 - scan.jpg” and I’m getting ““2024.12.06 - scan.jpg.jpg”
Otherwise everything else is working fine.
I have created similar zaps before using the older versions of the Google Drive app and this has never happened before.
Any ideas?
Best answer by Troy Tessalone Best answer by Troy Tessalone
Hi @Marika Shmotolocha
Instead of using a Code step which counts as 1 Task, you can use a Formatter step that counts as 0 Tasks.
Zap action: Formatter > Text > Extract Pattern
^(.*?)(?:\.[^.] +)?$
Issue with the File name having double file extensions is because the file name include the extension already. (e.g. .jpg)
So even when you leave the File Extension field, GDrive is determining the file extension and including it as part of the file name you see.
Thus it becomes [file.jpg] + “.jpg” = file.jpg.jpg
View original