How to generate a PDF in via Zapier

I want to premise that the method I am presenting here is currently the only one that I have tested and for which I am sure that it works.
It is likely that there are better methods than mine; I think that through webhook it is possible to do better than this but I have not yet had the opportunity to experience it.
In any case, if you want to know how to generate a PDF from your sheet which is the datasource of your Glide application, this tutorial will probably be useful for you.

So let’s get started …


First, in your APP, you need to be able to assemble a JSON data package formally in the data editor; view and copy the Doc2PDF sample APP to see how to do this.
So copy this APP and the sheet:


In the example APP create a document; this document could be an invoice or an order, or in short any document that is composed of a data header, a foot of data, and a body with a variable quantity of rows.


Just to do a test to see if the JSON data packet is composed correctly, press the {Copy JSON (just to test it)} button and then paste into an online parser; I for example use this:


Create your template in; start from a blank template and use this sections for your experiment with Doc2PDF APP:
Pdfmonkey template sections - Google Docs
(This is a slightly adapted version of the existing “Invoice” Master Template)

If everything is ok, publish it.

Step 5

Create a new ZAP in Zapier:

Trigger New spreadsheet Row in Google Sheets

  • Setup the worksheet Doc2PDF

Generate Document in PDFMonkey

  • Set up action: in the Dynamic Data (JSON Payload) put the column “Dynamic Data” of your sheet


In the Doc2PDF APP push the button “Add a row for the trigger” and after some minutes you will have your PDF document generated in documents section of your


What to do next?
This depends on how you want to use the generated PDF document, for example you could add a subsequent action in Zapier to send it via email to someone, or you could save the generated PDF in your google drive and then capture the link and write back in the original row of your google sheet.


Hi @Roldy Thank you for sharing - I learned alot!

I am working with this solution but using Glide’s Zapier action as the trigger (not a new google sheet row as trigger).
I have set up my template column and if i copy the results manually into the zap (data in for pdfmonkey action), it works perfectly.

The minute i assign my template column to Glide’s Value 1 and nominate that as the data package in my zap, my zap fails with error: “Unexpected token u in JSON at position 0”.

Do you have any suggestions.
Sincerely appreciated!

1 Like

I’m pretty sure there is a problem with the payload definition, I don’t remember how I solved it in the past.
I wrote to technical support, let’s see what they respond.
However it must work!
I ask you for a little patience, we will definitely solve it.

1 Like

Grande! :call_me_hand:t3:

Can I ask you if there is anyway to do the same without use the Monkey (they are better at the zoo :joy: ).
I currently print PDF using googlescript, but maybe this option it save me to do not execute the trigger, that sometime is causing headhacke!
Thx for sharing!

1 Like

I don’t think I ever had that problem, isn’t the first character “{”?

1 Like

Thanks. And yes, now I remember where the problem is.

1 Like

In Glide remove the leading and trailing braces in the column containing the json.
In Zapier add the curly brackets manually like this:

I may not have understood correctly. Are you looking for another service instead of pdfmonkey to generate PDF?
Are you creating PDF from apps script code? It’s a bit tiring in my opinion, I chose pdfmonkey because it made it easier for me to define the structure of the document trough html and css.
But there are other services if you want… or just write some code manually as you did with g.a.s.
What problems do you have in g.a.s. that cause you headaches?

actually the problem is only that sometime it stops for whatever mistake and since Ive other to watch out I prefer not to be in trouble with this.
But definitely is not a problem, its more a boring thing
Yes u are right, better to use monkey at the end.

1 Like


1 Like