Best answer

Gmail attachment custom filename

  • 13 April 2020
  • 1 reply
  • 1043 views

Userlevel 1

Hello everyone,

I have created an integration with an API service which returns a .zip file in unspecified format ( e.g. https://server.com/file/SAJFUU84892309809UDFOIJOSDIF90834

I need to attach this file into Gmail attachment and indeed it gets attached and sent correctly. But because the filename is without an extension, the user cannot know it is a zip file and he needs to download the attachment, rename it to something.zip to fix it. And obviously that’s not a solution.

 

So what I need is to specify a custom filename in the Gmail attachment when I also specify the attachment url https://server.com/file/SAJFUU84892309809UDFOIJOSDIF90834, is this possible ?

 

I don’t have control on how the url will come, I don’t want to upload to another place and then fetch back.

icon

Best answer by ikbelkirasan 13 April 2020, 18:52

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +12

Hi @stathisaska - You can achieve that using a custom Zapier app. It should basically fetch the file, then use z.stashFile method on the downloaded file, it lets you set the filename then it would return a generated URL for the new file. In the Gmail step, you should add the generated URL from the previous step as an attachment.

This setup should work for your use case. If you are not familiar with building Zapier apps, you can DM me.