Skip to main content
Best answer

Gmail attachment custom filename

  • April 13, 2020
  • 1 reply
  • 1119 views

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.

Best answer by ikbelkirasan

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.

View original
Did this topic help you find an answer to your question?
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

ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • Answer
  • April 13, 2020

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.