Block 1 - Create index.html
- Type / Role
- n8n-nodes-base.convertToFile - convertToFile
- Config choices
- Version 1.1
This workflow is provided as-is. Please review and test before using in production.
How it works This workflow converts an HTML string into a polished PDF file using the powerful open source Gotenberg service. It's designed to be a reusable utility in you...
n8n-nodes-base.converttofile, n8n-nodes-base.httprequest, n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.stickynote
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lucas Peyrin.
Original n8n.io sourceThis workflow converts an HTML string into a polished PDF file using the powerful open-source Gotenberg service. It's designed to be a reusable utility in your automation stack.
html code as a string and a desired file_name for the output.index.html file, which is required for the API call.Setup time: ~3 minutes
This workflow has one critical prerequisite: a running Gotenberg instance that your n8n can connect to.
1. Prerequisite: Run Gotenberg
You need to have the Gotenberg service running. The easiest way is with Docker. Add the following service to your docker-compose.yml file (the same one you use for n8n):
services:
# ... your n8n service ...
gotenberg:
image: gotenberg/gotenberg:8
restart: always
Then, restart your stack with docker compose up -d. This makes Gotenberg available at the address http://gotenberg:3000 from within your n8n container.
2. Use as a Sub-Workflow
This workflow is ready to be used as a sub-workflow.
html and file_name keys.This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | ๐ ๏ธ Create PDF from HTML with Gotenberg |
|---|---|
| Complexity | intermediate |
| Nodes | 6 |
| Categories | Document Extraction |
| Author | Lucas Peyrin |
| Published | 23 Jun 2025 |
Use the JSON export at /data/workflows/5149/5149.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
How it works This workflow converts an HTML string into a polished PDF file using the powerful open source Gotenberg service. It's designed to be a reusable utility in you...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.