Skip to main content

Hi all,

I am having the following error message displaying when I connect a wpForms submission to the creation of a PDF document through a template ID in pdf.co.

I understand the need to format JSON, which I am doing, but I cant track down the problem since Zapier is giving the error below and I believe my template is working. I have attached the JSON below the error message:

---Zapier Error Message--

Failed to create a html to pdf in PDF.co

Halted Error:(failed): TemplateData is not valid JSON model. SyntaxError: Unexpected identifier. Check logs at https://app.pdf.co/account/logs/api?jobid=A5Y6LLL1L98ECOGZKMBN3HS458XBK605--48-500 or contact support@bytescout.com for help

---END ERROR---

 

---JSON---

{

"customerName":"{{216291993__field3}}",

"staffContact":"{{216291993__field27}}",

"informationPolicy":"{{216291993__field33}}",

 

"consent1":"{{216291993__field35}}",

"consent2":"{{216291993__field36}}",

"consent3":"{{216291993__field37}}",

"consent4":"{{216291993__field39}}",

 

"signature":"{{216291993__field50}}",

"dateSigned":"{{216291993__field52}}"

 

}

Hi there @AndrewCawood! 👋

Looking at the help text for the HTML Template Data (Optional) field it seems as though it’s expecting a space to be in between the colon (:) and the value that’s been wrapped in double quotes (“):

7d31c349509b658b6c7c5b7b97c362fe.png
In the example JSON shared above I’m not seeing a space between the colon and the double quotes surrounding the selected fields. If it’s expecting a space between them, then perhaps that’s potentially why it’s seeing it as being invalid JSON.

Can you try adding a space for each of the fields and see if that gets rid of the error?

Looking forward to hearing from you on this!


Reply