Use this efficient n8n workflow template to convert incoming HTML strings into professional, customized PDF documents instantly via a self-hosted Gotenberg service. A key n8n automation for document management.
Download this n8n workflow template and start using it instantly.
Developers who need reliable, self-hosted solutions for automated document generation.
Users requiring a private, high-volume PDF conversion tool integrated into their existing n8n environment.
Technical users looking for advanced n8n templates demonstrating complex binary file handling and external API integration.
Anyone utilizing Docker for their n8n setup and wanting to leverage other containerized services.
Generating high-quality PDF documents from dynamic HTML content is a common challenge in automation. While many online services exist, they often introduce privacy concerns or scalability issues. This specialized n8n workflow template solves this by integrating directly with a self-hosted Gotenberg service, running securely alongside your n8n instance.
This automation provides a secure and highly customizable method for creating professional reports, invoices, or complex documents. The workflow accepts HTML data and a desired output filename through its initial n8n trigger, handles the file preparation internally, and sends the request to Gotenberg, ensuring efficient and private PDF generation. Mastering this n8n automation means full control over your document pipeline, a critical feature for professional systems.
This n8n workflow initiates when manually run or called by an external webhook or trigger, expecting HTML content and a desired file name.
Create PDF from HTML n8n trigger node. This node is configured to expect two essential input fields: html (the content to convert) and file_name (the name of the resulting PDF).Create index.html n8n node, which uses the internal convertToFile function. It takes the incoming html string and converts it into a binary file named index.html. This is a necessary step to properly package the HTML for the Gotenberg API.Convert to PDF with Gotenberg n8n node (an HTTP Request n8n node). This node performs a POST request to the Gotenberg service (defaulting to http://gotenberg:3000/forms/chromium/convert/html). It sends the binary file prepared in the previous step using multipart-form-data encoding.To deploy this n8n workflow template successfully, follow these steps:
gotenberg:
image: gotenberg/gotenberg:8
restart: alwaysConvert to PDF with Gotenberg n8n node, check the URL. If your Gotenberg service is hosted outside the standard Docker network or on a different port, you must update the url parameter from http://gotenberg:3000/forms/chromium/convert/html to your specific endpoint.Convert to PDF with Gotenberg n8n node to adjust PDF metadata like Author and Title to match your needs.Create PDF from HTML n8n trigger manually to ensure a PDF is generated correctly. Create PDF from HTML (Execute Workflow Trigger)
Function: Acts as the starting point (n8n trigger) for the workflow, providing sample data for the execution.
Key Configuration: Input data is defined with html content and the desired output file_name.
Create index.html (Convert to File)
Function: Transforms the input HTML string into a storable binary file (index.html). Gotenberg requires the input to be sent as a file, making this n8n node essential for preparation.
Key Configuration: operation: toText, sourceProperty: html, fileName: index.html.
Convert to PDF with Gotenberg (HTTP Request)
Function: Sends the prepared binary HTML file to the self-hosted Gotenberg service for conversion into a PDF document. This is the core action of the entire n8n workflow.
Key Configuration:
URL: http://gotenberg:3000/forms/chromium/convert/html (Must be adjusted if using a remote service).
Content Type: multipart-form-data.
Body Parameters: Includes the binary data input and extensive JSON-formatted PDF metadata for customization.
* Headers: Uses the Gotenberg-Output-Filename header with a dynamic expression to set the final PDF name based on the initial n8n trigger input.
Use this n8n workflow to create an OpenAI-compatible API endpoint that proxies requests to GitHub's free AI models, enabling their use within standard n8n AI agent configurations.

Use this powerful n8n workflow to automate logistics. Read local Excel or CSV files and automatically create detailed delivery tasks in Onfleet using specific n8n node mapping.

Use this powerful n8n workflow to automatically create Notion tasks from incoming Telegram messages (text or voice) using GPT-3.5 for intelligent data extraction and scheduling. Deploy this n8n template now.

Use this robust n8n workflow to automatically convert a folder full of Google Drive images (PNG, JPG) into a single, high-quality PDF using Google Slides for layout and conversion. Get this n8n template now.

Innovative builder with a passion for crafting automation solutions that solve real-world challenges. From streamlining workflows to driving efficiency, my work empowers teams and individuals to achieve more with less effort. Experienced in developing scalable tools and strategies that deliver results with n8n, supabase and cline.







































