Hi @Tim_Barrett
The reason your PDF is coming up blank is that you are mixing two different PDF generation methods in your workflow. You are trying to use a Template-based approach (via the PDF Generator API), but you are feeding it a Binary File (via the Convert to File node) and providing invalid JSON data.
Here are the three specific issues and how to fix them:
1 - The Convert to File node takes your text and turns it into a binary HTML file. However, the PDF Generator API node does not “convert” an existing file into a template; it creates a new file by merging JSON data into a pre-defined template.
By placing Convert to File before the PDF generator, you are changing the input from a JSON object (which the API needs) into a binary object, which causes the API to fail to find the data it needs to fill the template.
Fix: Delete the Convert to File node and connect Edit Fields1 directly to Generate a PDF document.
2 - In your Generate a PDF document node, you have the data set as: ={} {{ $json.output }}
This is not valid JSON. The PDF Generator API requires a JSON object where the keys match the placeholders you created in your PDF Generator API dashboard template.
Fix: Change the data field to a proper JSON object. For example, if your template has a placeholder called {{quote_content}}, your data field should look like this:
{
"quote_content": "{{ $json.output }}"
}
3 - For the data to actually appear on the PDF, the key you use in n8n must exactly match the variable name in your template (ID: 1649628).
- If your template is blank: It means the API received the request, but couldn’t find any keys in your JSON that matched the
{{variable}}tags in your design. - Recommendation: Check your template in the PDF Generator API dashboard. If you have tags like
{{client_name}}or{{total_price}}, you must provide those specifically in the JSON:
{
"client_name": "{{ $("Edit Fields").item.json["What’s your name?"] }}",
"quote_content": "{{ $json.output }}"
}
Try out this
Important Note: In the data field of the PDF node, I used the key "quote_content". For this to work, you must ensure that inside your PDF Generator API template (ID: 1649628), you have a text element with the variable {{quote_content}}. If your template uses a different variable name, simply change "quote_content" in the JSON below to match your template.