Best answer

Unable to attach Google Form response to Gmail despite public folder setting


Userlevel 1
Badge +1

I have a googles form that takes some information and saves it to a Sheets document. The next step in my Zap is to send an email with Gmail to a processor.  We use this method to assure that all associated info is sent with the doc.

I’ve read the Zapier documents that discuss the need for the folder to be public in order to send the document as an attachment.  Unfortunately I’m still getting a link to the document. I have set the folder to be publicly accessible, with the same result.

If I can get the file attached I’m assuming I can move the doc to a secure folder after processing.

 

Any ideas why I’m not getting an attachment.

icon

Best answer by Troy Tessalone 28 June 2023, 01:43

View original

11 replies

Userlevel 7
Badge +14

Hi @Leithal 

Good question.

To give us enough context, please post screenshots with how your Zap steps are configured, thanks.

Userlevel 1
Badge +1

Workflow.
 

 

Is something like this acceptable?

 

Userlevel 7
Badge +14

@Leithal 

We’ll need to see how each Zap step is configured to have enough context.

Userlevel 1
Badge +1

 

Userlevel 7
Badge +14

@Leithal 

The GDrive file link needs to be a direct download link.

Check out this help topic:

 

Userlevel 1
Badge +1

First off… Thank you very much. I’m just getting started with Zapier and appreciate the help.

If I’m reading that article correctly I’ll need to change the value of the spreadsheet/file link that comes from the Google sheet. 

From what I’m seeing (below) I’d need to change/replace values in the middle of a string. I don’t see anything (but there is a lot to go through) that would let me manipulate a single variable in a Zap.   If I can’t do that my next step, with the knowledge I have now, would be to import all the data from one Google Sheet to a second, and create a formula to create the new string in Sheets.

Am I on the right track?

 

GDocs - Direct Downloads

Any GDoc in your GDrive has a URL like:

https://docs.google.com/document/d/DOC_FILE_ID/edit

Replace /edit with /export?format=, add the file format that the GDoc should be saved as and your download link is ready.

https://docs.google.com/document/d/DOC_FILE_ID/export?format=pdf
https://docs.google.com/document/d/DOC_FILE_ID/export?format=doc
https://docs.google.com/document/d/DOC_FILE_ID/export?format=txt
https://docs.google.com/document/d/DOC_FILE_ID/export?format=html
https://docs.google.com/document/d/DOC_FILE_ID/export?format=odt
https://docs.google.com/document/d/DOC_FILE_ID/export?format=epub
Userlevel 7
Badge +14

@Leithal 

Depends on the current GDrive File link format you are starting with.

Can you provide an example?

Userlevel 1
Badge +1

So this is what is in the Google sheet, that receives the data from the google form.  The Google form just asks for attachments, with no restriction on the type, since it could be anything from an image to a PDF, etc…

https://drive.google.com/open?id=1-102zcCryd1WYtyJY5Ihsv5h_qPdAumP

Userlevel 7
Badge +14

@Leithal 

The link provided is a GDrive file VIEW link.

The GDrive File ID comes after the id= parameter.

 

You can get the GDrive File link using a Formatter > Text > Replace step to isolate the GDrive File ID.

In the step config, replace “https://drive.google.com/open?id=” with nothing, which will leave only the GDrive File ID.

 

Then in the Gmail Attachment field you can create a hybrid value. (part static, part dynamic)
https://drive.google.com/uc?export=download&id=[FORMATTER OUTPUT]

 

If you copy this FILE_ID and use it in the URL below, you’ll get a direct link to download the file from GDrive.

https://drive.google.com/uc?export=download&id=DRIVE_FILE_ID

Userlevel 1
Badge +1

Thank you.  I hadn’t stumbled onto the Formatter - very nice.

It looks like that resolved the issue, and I have an email with an attachment!

 

Thank you very much!

 

I didn’t even know about Formatter, since there are thousands of modules… any advice for a beginner to locate the correct the correct module?  It’s almost like C++ - where you just needed to know what lib to include to get a function.  Some kind of index would be helpful.

Userlevel 7
Badge +6

Hi @Leithal,

Awesome! I’m glad to know Troy was able to help you with your concern.

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help! 😊

Reply