Can't create PDF Template to send to workflow

For the past couple of days I’ve been working on this automation to write and send complete quotes. It works fine when using a ‘HTML to PDF’ node, and I’m able to send a pdf with the raw unformatted data. But when I try to format the data into a template the pdf comes up as blank. Is there anything I’m missing here? {
“name”: “Quotebot Test”,
“nodes”: [
{
“parameters”: {
“formTitle”: “Get a Quote for a Function”,
“formDescription”: “Hey there!\n\nMy name’s Quotebot, your friendly quoting assistant for every function you need.\n\nJust answer the questions below, and we’ll get back to you ASAP”,
“formFields”: {
“values”: [
{
“fieldLabel”: “What function are you hosting?”
},
{
“fieldLabel”: “How many people are expected to attend?”,
“fieldType”: “number”
},
{
“fieldLabel”: “Do any guests have Dietary Requirements?”
},
{
“fieldLabel”: “When will your function be held?”,
“fieldType”: “date”
},
{
“fieldLabel”: “What’s your name?”
},
{
“fieldLabel”: “What’s your email address?”,
“fieldType”: “email”
},
{
“fieldLabel”: “What is the event name?”
},
{
“fieldLabel”: “What is the venue address?”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.formTrigger”,
“typeVersion”: 2.5,
“position”: [
0,
0
],
“id”: “3952eda3-7161-4e51-8a7b-4d6b8de4f5fe”,
“name”: “On form submission”,
“webhookId”: “b1d72ee1-c693-4b12-90ef-c7329ba90676”
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=Hi There\n\nCould you please write a full quote for {{ $(“Edit Fields”).item.json[“What’s your name?”] }} and send it to {{ $(“Edit Fields”).item.json[“What’s your email address?”] }}?\n\nClient Details:\n- Function Type: {{ $(“Edit Fields”).item.json[“What function are you hosting?”] }}\n- Expected Attendees: {{ $(“Edit Fields”).item.json[“How many people are expected to attend?”] }}\n- Dietary Requirements: {{ $(“Edit Fields”).item.json[“Do any guests have Dietary Requirements?”] }}\n- Function Date: {{ $(“Edit Fields”).item.json[“When will your function be held?”] }}\n- Event Name: {{ $json[‘What is the event name?’] }}\n- Venue Address {{ $json[‘What is the venue address?’] }}\n\n”,
“options”: {
“systemMessage”: “=You are a Catering Business Quoting Expert.\n\nYou’re given access to an MCP Client Server\n\nI need you to use it to create a Quote for a client and send it to them as an email \n\n{{ $today }}”
}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 3.1,
“position”: [
448,
0
],
“id”: “c1cfee0f-7beb-4fa8-8cf5-703179d8f18e”,
“name”: “AI Agent”,
“alwaysOutputData”: true,
“onError”: “continueRegularOutput”
},
{
“parameters”: {
“modelName”: “models/gemini-2.5-flash-lite”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“typeVersion”: 1.1,
“position”: [
464,
224
],
“id”: “ec607c7c-91eb-4efc-b662-ddb1cb712638”,
“name”: “Google Gemini Chat Model”,
“credentials”: {
“googlePalmApi”: {
“id”: “r5K1AFY1c2dmiqsE”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “1fb0c0f2-eff7-4900-9ca9-15950c133260”,
“name”: “What function are you hosting?”,
“value”: “={{ $json[“What function are you hosting?”] }}”,
“type”: “string”
},
{
“id”: “c4171ed1-c773-4dec-9126-57d400eb9bbd”,
“name”: “How many people are expected to attend?”,
“value”: “={{ $json[“How many people are expected to attend?”] }}”,
“type”: “number”
},
{
“id”: “feeaa131-f6c7-47d0-b16a-a107e56c5d8d”,
“name”: “Do any guests have Dietary Requirements?”,
“value”: “={{ $json[“Do any guests have Dietary Requirements?”] }}”,
“type”: “string”
},
{
“id”: “c5318dd3-dbcc-4a18-ab72-90c2eda07fb2”,
“name”: “When will your function be held?”,
“value”: “={{ $json[“When will your function be held?”] }}”,
“type”: “string”
},
{
“id”: “754d4f71-338b-4b3e-ba87-c66852b76799”,
“name”: “What’s your name?”,
“value”: “={{ $json[“What’s your name?”] }}”,
“type”: “string”
},
{
“id”: “5432c27a-958f-4f76-9fa0-3663ab7b8f19”,
“name”: “What’s your email address?”,
“value”: “={{ $json[“What’s your email address?”] }}”,
“type”: “string”
},
{
“id”: “3644948e-b74b-42fe-8456-0261a87e81a2”,
“name”: “What is the event name?”,
“value”: “={{ $json[‘What is the event name?’] }}”,
“type”: “string”
},
{
“id”: “19d462d9-c51e-421e-8e7e-f900742ffd99”,
“name”: “What is the venue address?”,
“value”: “={{ $json[‘What is the venue address?’] }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
224,
0
],
“id”: “280e82bc-5e96-462f-a6e6-1b098c4abb13”,
“name”: “Edit Fields”
},
{
“parameters”: {
“endpointUrl”: “https://timb.app.n8n.cloud/mcp/8d44ab8f-e11c-492a-9b68-b3fbafec81f5”,
“include”: “selected”,
“includeTools”: [
“furniture_Rentals”,
“Payment”,
“Additional_Service”,
“Pricing”,
“Menu_Drinks”,
“Staffing”,
“Venue_Logistics”,
“Ingredients”
],
“options”: {}
},
“id”: “a3b8b192-853d-41cd-9b2b-25042b97fcd1”,
“name”: “MCP Client Tool”,
“type”: “@n8n/n8n-nodes-langchain.mcpClientTool”,
“typeVersion”: 1.3,
“position”: [
592,
224
]
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “acf6fc3f-89fd-4c14-865f-c9bb597e4b62”,
“name”: “output”,
“value”: “={{ $json.output }}”,
“type”: “string”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.set”,
“typeVersion”: 3.4,
“position”: [
800,
0
],
“id”: “2986a9df-0a76-4555-9a3a-d17e31016a1f”,
“name”: “Edit Fields1”
},
{
“parameters”: {
“sendTo”: “barrtimm@gmail.com”,
“subject”: “Job’s wedding Quote”,
“emailType”: “text”,
“message”: “=Hey there here’s your quote”,
“options”: {
“appendAttribution”: false,
“attachmentsUi”: {
“attachmentsBinary”: [
{
“property”: “={{ $json.filename }}”
}
]
}
}
},
“type”: “n8n-nodes-base.gmail”,
“typeVersion”: 2.2,
“position”: [
1472,
0
],
“id”: “a1706ee8-ab20-49cd-a0f2-9e321f17de49”,
“name”: “Send a message”,
“webhookId”: “528a735e-f777-4a86-9115-82bab5906ab7”,
“credentials”: {
“gmailOAuth2”: {
“id”: “49vocCpyDoaHrQbO”,
“name”: “Gmail OAuth2 API”
}
}
},
{
“parameters”: {
“templateId”: {
“__rl”: true,
“value”: “1649628”,
“mode”: “list”,
“cachedResultName”: “Quote for Job Blob (ID: 1649628)”
},
“data”: “={} {{ $json.output }}”,
“documentOutput”: “file”,
“additionalFields”: {}
},
“type”: “@pdfgeneratorapi/n8n-nodes-pdf-generator-api.pdfGeneratorApi”,
“typeVersion”: 1,
“position”: [
1216,
0
],
“id”: “13fc3d18-3cad-4d2a-8c0d-e864700bde13”,
“name”: “Generate a PDF document”,
“credentials”: {
“pdfGeneratorApi”: {
“id”: “XUfVEGWx0Q45fr5L”,
“name”: “PDF Generator account”
}
}
},
{
“parameters”: {
“operation”: “html”,
“options”: {}
},
“type”: “n8n-nodes-base.convertToFile”,
“typeVersion”: 1.1,
“position”: [
1008,
0
],
“id”: “08cc2559-e2aa-48d0-b6b0-91926cceb952”,
“name”: “Convert to File”
}
],
“pinData”: {
“On form submission”: [
{
“json”: {
“What function are you hosting?”: “Wedding”,
“How many people are expected to attend?”: 69,
“Do any guests have Dietary Requirements?”: “Yes Sue - Shellfish Allergy”,
“When will your function be held?”: “2026-07-10”,
“What’s your name?”: “Job Blob”,
“What’s your email address?”: “barrtimm@gmail.com”,
“What is the event name?”: “Job and Skibidi’s Fantastic Wedding”,
“What is the venue address?”: “45 Bigham Road BF Idaho 90210”,
“submittedAt”: “2026-06-13T15:42:21.955+10:00”,
“formMode”: “test”
},
“pairedItem”: {
“item”: 0
}
}
]
},
“connections”: {
“On form submission”: {
“main”: [
[
{
“node”: “Edit Fields”,
“type”: “main”,
“index”: 0
}
]
]
},
“Google Gemini Chat Model”: {
“ai_languageModel”: [
[
{
“node”: “AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“Edit Fields”: {
“main”: [
[
{
“node”: “AI Agent”,
“type”: “main”,
“index”: 0
}
]
]
},
“AI Agent”: {
“main”: [
[
{
“node”: “Edit Fields1”,
“type”: “main”,
“index”: 0
}
]
]
},
“MCP Client Tool”: {
“ai_tool”: [
[
{
“node”: “AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
]
},
“Edit Fields1”: {
“main”: [
[
{
“node”: “Convert to File”,
“type”: “main”,
“index”: 0
}
]
]
},
“Generate a PDF document”: {
“main”: [
[
{
“node”: “Send a message”,
“type”: “main”,
“index”: 0
}
]
]
},
“Convert to File”: {
“main”: [
[
{
“node”: “Generate a PDF document”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: true,
“settings”: {
“executionOrder”: “v1”,
“binaryMode”: “separate”,
“availableInMCP”: true
},
“versionId”: “97d94403-187f-4bb8-8379-7a4ea228a92d”,
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “845031bfdb8f607d8c7ae907fb5de28c6fb4d0a8d0cd06c1a605d7c42f4018a9”
},
“nodeGroups”: ,
“id”: “X1Nh0TGGqYWSVImo”,
“tags”:
}

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.

1 Like

For this quote flow, isolate whether the blank PDF is template data or rendering. Before the PDF node, add one Set/Edit Fields node that outputs only a tiny object whose keys match one template placeholder, for example eventName and guestCount, then run the PDF node with that.

If the one-field PDF renders, the template is fine and the issue is the AI output shape; parse the agent output into named JSON fields before the PDF node. If the one-field test is still blank, the next boundary is the template id or placeholder names rather than the n8n flow.

Hey Kjooleng

Thanks for the reply.

I’ve tried your steps multiple times, but I’m still getting a blank template. I’ve updated the variables present in my template to match my spreadsheets, and updated the data to be valid JSON

I’ve switched from using PDF Generator API’s Quote template to a blank template I created in hopes of getting the data organized. I know I’m close, but I just need one more missing step to make it work.

Do you have any ideas

1 Like

@Tim_Barrett

I have no issue. You need to follow instructions carefully. Do not blindly copy

This should help

Most likely the keyword is this

For my case, my template variable is output. Make sure to adjust yours accordingly

1 Like

@Tim_Barrett , you can try using node from PDF API Hub which allows you to generate PDF using template.

Here is the verified node link: