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 …
STEP 1
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:
STEP 2
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.
STEP 3
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: http://json.parser.online.fr/
STEP 4
Create your template in pdfmonkey.io; 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
STEP 6
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 pdfmonkey.io
STEP 7
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.