Convert HTML to PDF and Return via Webhook using CustomJS API
! n8n Workflow: HTML to PDF Generator
This n8n workflow converts HTML content into a styled PDF and returns it as a response via a webhook. The workflow receives HTML input, processes it using CustomJS's PDF toolkit, and sends back the resulting PDF to the original webhook requester.
@custom-js/n8n-nodes-pdf-toolkit
Features:
Webhook Trigger**: Accepts incoming requests with HTML content. HTML to PDF Conversion**: Uses CustomJS to transform HTML into a PDF. Response**: Sends the generated PDF back to the webhook response.
Requirements:
Self-hosted** n8n instance A CustomJS API key for HTML to PDF conversion HTML content** to be converted into a PDF
Workflow Steps:
Webhook Trigger:
Accepts incoming HTTP requests with HTML content. This data is passed to the next node for processing.
HTML to PDF Conversion:
Uses the CustomJS node to convert the incoming HTML into a PDF document. You can customize the HTML content to match the design requirements.
Respond to Webhook:
Sends the generated PDF as a binary response to the original webhook request.
Setup Guide:
- Configure CustomJS API Sign up at CustomJS. Retrieve your API key from the profile page.
Add your API key as n8n credentials.
- Design Workflow
Create a Webhook:
Set up a webhook to trigger the workflow when HTML content is received.
Prepare HTML Content:
The incoming request should include the HTML content you wish to convert into a PDF.
Configure HTML to PDF Node:
Use the HTML to PDF node to convert the provided HTML into a PDF. The node uses the HTML input to generate a PDF using the CustomJS API.
Respond with the PDF:
The Respond to Webhook node will send the generated PDF back to the original requester as a binary response.
Example HTML Input:
Hello CustomJS! CustomJS provides the missing toolset for your no-code projects
Result PDF
Related Templates
Send structured logs to BetterStack from any workflow using HTTP Request
Send structured logs to BetterStack from any workflow using HTTP Request Who is this for? This workflow is perfect for...
Provide latest euro exchange rates from European Central Bank via Webhook
What is this workflow doing? This simple workflow is pulling the latest Euro foreign exchange reference rates from the E...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments