In den letzten Tagen habe ich an dieser Automatisierung gearbeitet, um vollständige Angebote zu schreiben und zu versenden. Es funktioniert einwandfrei, wenn ich einen „HTML zu PDF„-Knoten verwende, und ich kann ein PDF mit den unformatierten Rohdaten versenden. Aber wenn ich versuche, die Daten in eine Vorlage zu formatieren, wird das PDF leer angezeigt. Fehlt mir da etwas? {
“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”:
}
Hallo @Tim_Barrett
Der Grund dafür, dass deine PDF leer angezeigt wird, ist, dass du zwei verschiedene PDF-Generierungsmethoden in deinem Workflow vermischst. Du versuchst einen Template-basierten Ansatz zu verwenden (über die PDF Generator API), versorgst ihn aber mit einer Binärdatei (über den Convert to File-Node) und stellst ungültige JSON-Daten bereit.
Hier sind die drei spezifischen Probleme und wie du sie behebst:
- Der
Convert to File-Node nimmt deinen Text und wandelt ihn in eine binäre HTML-Datei um. Die PDF Generator API konvertiert jedoch keine vorhandene Datei in ein Template; sie erstellt eine neue Datei, indem sie JSON-Daten mit einem vordefinierten Template zusammenführt.
Indem du Convert to File vor den PDF-Generator platzierst, änderst du die Eingabe von einem JSON-Objekt (das die API benötigt) in ein binäres Objekt, was dazu führt, dass die API die Daten nicht finden kann, die sie zum Füllen des Templates braucht.
Lösung: Lösche den Convert to File-Node und verbinde Edit Fields1 direkt mit Generate a PDF document.
- In deinem
Generate a PDF document-Node hast du die Daten als:={} {{ $json.output }}eingestellt.
Das ist kein gültiges JSON. Die PDF Generator API benötigt ein JSON-Objekt, bei dem die Schlüssel den Platzhaltern entsprechen, die du in deinem PDF Generator API Dashboard-Template erstellt hast.
Lösung: Ändere das Feld data auf ein korrektes JSON-Objekt. Wenn dein Template beispielsweise einen Platzhalter namens {{quote_content}} hat, sollte dein Datenfeld so aussehen:
{
"quote_content": "{{ $json.output }}"
}
- Damit die Daten tatsächlich auf der PDF erscheinen, muss der Schlüssel, den du in n8n verwendest, exakt dem Variablennamen in deinem Template entsprechen (ID: 1649628).
- Wenn dein Template leer ist: Das bedeutet, dass die API die Anfrage erhalten hat, aber keine Schlüssel in deinem JSON finden konnte, die den
{{variable}}-Tags in deinem Design entsprechen. - Empfehlung: Überprüfe dein Template im PDF Generator API Dashboard. Wenn du Tags wie
{{client_name}}oder{{total_price}}hast, musst du diese speziell im JSON angeben:
{
"client_name": "{{ $(\"Edit Fields\").item.json[\"What's your name?\"] }}",
"quote_content": "{{ $json.output }}"
}
Isolieren Sie für diesen Quote-Flow, ob die leere PDF Vorlagendaten oder Rendering ist. Fügen Sie vor dem PDF-Node einen Set/Edit Fields Node hinzu, der nur ein winziges Objekt ausgibt, dessen Schlüssel einem Template-Platzhalter entsprechen, zum Beispiel eventName und guestCount, und führen Sie dann den PDF-Node damit aus.
Wenn die Ein-Feld-PDF rendert, ist die Vorlage in Ordnung und das Problem liegt in der Form der KI-Ausgabe; analysieren Sie die Agent-Ausgabe vor dem PDF-Node in benannte JSON-Felder auf. Wenn der Ein-Feld-Test immer noch leer ist, liegt die nächste Grenze bei der Template-ID oder den Platzhalternamen anstelle des n8n-Flows.
Hey Kjooleng
Danke für deine Antwort.
Ich habe deine Schritte mehrmals versucht, bekomme aber immer noch eine leere Vorlage. Ich habe die Variablen in meiner Vorlage aktualisiert, um sie an meine Tabellen anzupassen, und die Daten in gültiges JSON umgewandelt.
Ich bin von der Quote-Vorlage der PDF Generator API zu einer leeren Vorlage gewechselt, die ich selbst erstellt habe, um die Daten besser zu organisieren. Ich weiß, dass ich kurz davor bin, aber mir fehlt einfach noch ein Schritt, um es zum Laufen zu bringen.
Hast du irgendwelche Ideen?
Ich habe kein Problem. Du musst die Anweisungen sorgfältig befolgen. Kopiere nicht blindlings
Das sollte helfen
Meist ist das Schlüsselwort dieses hier
[quote=“kjooleng, post:2, topic:299585”]
Damit dies funktioniert, musst du sicherstellen, dass deine PDF Generator API-Vorlage (ID: 1649628) ein Textelement mit der Variablen {{quote_content}} enthält. Wenn deine Vorlage einen anderen Variablennamen verwendet, ändere einfach `„quote_content
@Tim_Barrett, du kannst versuchen, den Node von PDF API Hub zu verwenden, mit dem du PDF-Dateien mithilfe einer Vorlage generieren kannst.
Hier ist der verifizierte Node-Link:

