Render HTML
The Render HTML connector converts HTML content into JPG images for consistent email visualization.
The Render HTML connector allows Swimlane Turbine users to convert HTML content into JPG images, facilitating secure email visualization. This integration provides a streamlined method to handle HTML data, ensuring that external requests are blocked, JavaScript is disabled, and local file access is restricted, enhancing security. By leveraging this connector, users can automate the rendering process, customize image output, and manage blocked HTML elements efficiently, all within the Swimlane Turbine platform.
Prerequisites
Before you can use the Render HTML connector, you'll need to set up authentication. This requires the following:
- HTTP Basic Authentication using the following parameters:
- Username: Required for basic authentication.
- Password: Required for basic authentication.
Capabilities
- Render HTML content to a jpg
Configurations
HTTP Basic Authentication
Authenticates using username and password.
Configuration Parameters
Parameter | Description | Type | Required |
|---|---|---|---|
url | A URL to the target host. | string | Optional |
username | Username | string | Optional |
password | Password | string | Optional |
verify_ssl | Verify SSL certificate | boolean | Optional |
http_proxy | A proxy to route requests through. | string | Optional |
Actions
Render HTML
Convert provided HTML content into a JPG image for email visualization. Requires html_data as input.
Endpoint
- Method: GET
Input
Argument Name | Type | Required | Description |
|---|---|---|---|
html_data | string | Required | HTML data to render |
disable_local_file_access | boolean | Optional | Disable access to files on the local machine (might be needed for images) |
disable_javascript | boolean | Optional | Disable Javascript |
block_external_requests | boolean | Optional | Remove all html tags that make external requests |
handle_blocked_elements | string | Optional | To be used only when external request are blocked. By default, Source attribute is removed. |
no_images | boolean | Optional | No images in output, defaults to true |
show_base64 | boolean | Optional | Show Base64 data for rendered file. |
show_html | boolean | Optional | Show processed HTML used to render image |
max_size | string | Optional | Two integers, comma separated for the width & height of the thumbnail. Defaults to 800,600 |
render_timeout | integer | Optional | Maximum seconds to wait for wkhtmltoimage to finish rendering. If exceeded, the action fails fast with an error instead of consuming the platform's 900s budget. Useful in egress-restricted environments where external resource fetches (e.g. remote @font-face URLs, CSS background images) may hang indefinitely. Defaults to 120 seconds. |
form_fields | object | Optional | Parameter for Render HTML |
form_fields.files | array | Optional | Parameter for Render HTML |
form_fields.files.file | string | Optional | Parameter for Render HTML |
form_fields.files.file_name | string | Optional | Name of the resource |
Input Example
{"html_data":"string","disable_local_file_access":true,"disable_javascript":true,"block_external_requests":true,"handle_blocked_elements":"string","no_images":true,"show_base64":true,"show_html":true,"max_size":"800,600","render_timeout":120,"form_fields":{"files":[{"file":"string","file_name":"Example Name"}]}}
Output
Parameter | Type | Description |
|---|---|---|
file | object | Rendered image from html |
file.file | string | Output field: file.file |
file.file_name | string | Name of the resource |
base64_data | string | Response data |
html_rendered | string | HTML Content used for rendering |
Output Example
{"file":{"file":"string","file_name":"Example Name"},"base64_data":"string","html_rendered":"string"}
Response Headers
Header | Description | Example |
|---|---|---|
Content-Type | The media type of the resource | application/json |
Date | The date and time at which the message was originated | Thu, 01 Jan 2024 00:00:00 GMT |