Best answer

Attaching Google Drive Files to Gmail

  • 3 September 2020
  • 7 replies
  • 3355 views

Userlevel 1

I have a Google Form that inputs data to A Google Sheets file.

Once that Sheets file is updated, Zapier extracts the data and sends out an e-mail with all the form data.

The last step of the form is for the user to upload files, which get created as links in the Google sheet to files on Google Drive.

When I tell Zapier to use that link as an attachment, I get an attachment in the resulting e-mail that is named “ServiceLogin” and the actual file is not attached.

I’ve tried changing the permissions on the folder where the files are stored to “Anyone with the link can view” but I still do not get the attachment in the e-mail of the ACTUAL file.  Any thoughts?

icon

Best answer by Troy Tessalone 3 September 2020, 22:10

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.

7 replies

Userlevel 7
Badge +14

You’ll have to add a formatter step to extract the File ID from a link that looks like this: https://drive.google.com/open?id=[fileid]

Then structure the File Attachment link to be dynamic like this: https://drive.google.com/uc?export=download&id=[fileid]

Replace [fileid] with the value from the previous step.

Userlevel 1

@Troy Tessalone I accidentally hit my reply as the Best Answer but that worked.  Thank you!  Not sure what I did before that had it not work, but I appreciate you!  Thanks so much!

Userlevel 7
Badge +12

Hi @jhurlbut Thanks for letting us know that @Troy Tessalone’s suggestion helped, I’ve marked his post as the best answer :) 

Hi, I tried this step in the zap I've created between Google Forms and Trello to send the attachment file to a card but I still get the "ServiceLogin" file on the card. 

Userlevel 7
Badge +12

Hi @Julio Ramírez! I’m sorry that you’re having some trouble with your Zap. If you’ve tried Troy’s solution and are still seeing the same problem then the best thing to do is to get in touch with the Zapier support team as they can take a closer look at your Zap with you. You can contact them using the Get Help form: https://zapier.com/app/get-help

Userlevel 1

@Troy Tessalone I am having a similar problem. As part of the zap a google doc is created, we then attach it as a pdf to a gmail email (using the export pdf url). 90% of the time it works but some of the time it creates a servicelogin file which some users can open and others can’t. How do I apply this to google docs? I can’t seem to find the urls you mention. Any help would be hugely appreciated. 

Userlevel 7
Badge +14

@Emma Cox I think your issue might have to do with something timing out while the Zap is processing.

GSearches related to “ServiceLogin”: https://www.google.com/search?q=servicelogin+file

 

The File ID is returned for any GDrive file (GDoc, GSheet, etc.).

Structure the File Attachment link to be dynamic like this: https://drive.google.com/uc?export=download&id=[fileid]

Replace [fileid] with the File ID from the previous step.