What This Workflow Does
This n8n workflow demonstrates how to serve complete HTML webpages using webhooks, effectively turning your automation platform into a lightweight web server. It solves the need for traditional hosting solutions when serving simple, dynamic content.
Businesses can use this approach to create microsites, landing pages, or interactive forms that respond to user input without maintaining separate infrastructure. The workflow handles incoming web requests and returns fully styled HTML content with proper headers.
How It Works
1. Webhook Trigger
The workflow starts with an n8n webhook that listens for incoming HTTP requests. When triggered, it captures all request data including headers, parameters, and body content.
2. HTML Generation
The workflow then dynamically generates HTML content based on the incoming request. This can include variables from the request, database lookups, or conditional logic to customize the output.
3. Response Delivery
Finally, the workflow returns the generated HTML with proper Content-Type headers (text/html) and HTTP status codes. The browser receives this as if it came from a traditional web server.
Who This Is For
This solution ideal for businesses that need to:
- Serve simple dynamic content without web hosting
- Create micros or landing pages connected to backend systems
- Prototype web interfaces quickly
- Deliver personalized content based on demand
What You'll Need
- An n8n cloud account or self-hosted instance
- Basic knowledge of HTML/CSS
- A domain or URL to expose your webhook URL
- (Optional) Database connection if pulling dynamic content
Quick Setup Guide
- Download and import the JSON template into your n8n instance
- Deploy the webhook node and note the unique URL
- Customize the HTML template in the Function node
- Test by visiting your webhook URL in a browser
- Expand with additional logic as needed
Key Benefits
Eliminates hosting costs: Serve web content directly from your existing automation platform without additional infrastructure.
Dynamic personalization: Easily customize HTML output based on request parameters, user data, or business logic.
Rapid prototyping: Test web concepts immediately without deploying code or configuring servers.
Pro tip: Combine this with n8n's credential system to add authentication and protect sensitive webpages.