Skip to main content

Collecting data on a google form. Need that to generate a doc from a template (ideally google docs), then send a pdf of that doc via email. Constraints:

  • google doc created needs strict permissions (not available to public via url)
  • pdf should not be saved at end of process

I’ve setup google doc template, and successfully merged rows from sheets w doc, which creates a doc file that is private.

Issues:

  • Cloud print even using same credentials can’t access the doc correctly and “prints” a login screen to pdf rather than the doc
  • convertapi returns “success” without any document payload
  • docmerge looks like it might work but is prohibitively priced
  • If I use the Drive app in zapier to adjust permissions on doc, I can’t change them back to private at end of zap
  • Even if I successfully cloud print the doc to pdf, it saves to root (ok - I can “move” it), and I can’t delete it after emailing it

So, any suggestions? Ideal would be solution that can convert private google doc file to pdf, but not save to docs. 

Hi @jgirard, that’s a really tricky one!

 

I’m not sure how you could do that with the constraints that you mentioned 🤔

 

I’m going to tag in a few of our Zapier experts to see if they have managed something similar: @Saastronomical, @BowTieBots, @ChrisP do you know of any apps that could help with the above workflow?


Hi @jgirard,

 

All the solutions I know of from within Zapier requires you to change file permission to public.

 

In theory you could accomplish this with a google script that gets triggered by a webhook from Zapier.

Happy to give you my create pdf code script if your interested in trying to build out the workflow.  Basics would look like:

Trigger in Zapier → Create Doc from Template → Send Doc Id and email address to a GScript Webhook which:

  • Makes a pdf
  • Sends pdf to email address provided
  • Deletes pdf

Hello - for the first part, you’ll need a public link to do this with Google docs, sadly. If you need to create without this - And as you correctly pointed out, this will often be a paid for app. 

 

For the second part - Printing. You need to send the file, not the Google Docs link. This can be tricky, but basically what’s happening is there’s a conversion that Google does with the raw file to be able to print it in Google cloud. If you send Google cloud to the File URL it will need to log-in first. The way around this is to send the attachment to a Zapier Email and trigger based on the message received. 

 

For the third part - Is there anywhere you can move it to? Perhaps another drive. I see there’s no “Delete” with the Zapier <> Google Drive integration. If you can move to a secure folder, would that be good enough?


Great answer @BowTieBots ! A Google Script is a much better shout than using a paid service!