Convert HTML
The Convert HTML action takes raw HTML (or a publicly accessible URL), renders it, and exports it to the chosen format.
Parameters
| Name | Type | Description |
|---|---|---|
| HTML | String | Raw HTML (as a string) or a publicly accessible URL. You can embed HTML template syntax expressions ({{…}}) to inject values from named Data Sources. |
| Output Format | Enum | Desired target format. One of: PDF, JPEG, PNG, BMP, GIF, TIFF, XPS, HTML. |
| Data Sources | JSON object (optional) | One or more named JSON data sources. Each must include the following: |
- Name: Identifier for use in template expressions (e.g.
users,order). - Content: A JSON object or array, provided by another action. For example, a
Get ItemsSharePoint action, returningCustomersfrom a SharePoint list.
Example template usage:
{{#each users}} <p>{{FirstName}} {{LastName}}</p>{{/each}}Rendering Options by Output Format
BMP
| Parameter | Type | Description | Options |
|---|---|---|---|
| Compression | Enum | Compression algorithm for BMP output | CCITT3, CCITT4, LZW, None, RLE |
| Background Color | String | Color to fill the background of each page | e.g. #FFFFFF, rgba(0,0,0,0) |
| Vertical Resolution | Integer | Vertical DPI (default: 300) | Any integer value |
| Horizontal Resolution | Integer | Horizontal DPI (default: 300) | Any integer value |
| Adjust To Widest Page | Boolean | Scale all pages to match the widest page width | Yes, No |
GIF
| Parameter | Type | Description | Options |
|---|---|---|---|
| Compression | Enum | Compression algorithm for GIF output | CCITT3, CCITT4, LZW, None, RLE |
| Background Color | String | Color to fill the background of each page | e.g. #FFFFFF, rgba(0,0,0,0) |
| Vertical Resolution | Integer | Vertical DPI (default: 300) | Any integer value |
| Horizontal Resolution | Integer | Horizontal DPI (default: 300) | Any integer value |
| Adjust To Widest Page | Boolean | Scale all pages to match the widest page width | Yes, No |
JPEG
| Parameter | Type | Description | Options |
|---|---|---|---|
| Compression | Enum | Compression algorithm for JPEG output | CCITT3, CCITT4, LZW, None, RLE |
| Background Color | String | Color to fill the background of each page | e.g. #FFFFFF, rgba(0,0,0,0) |
| Vertical Resolution | Integer | Vertical DPI (default: 300) | Any integer value |
| Horizontal Resolution | Integer | Horizontal DPI (default: 300) | Any integer value |
| Adjust To Widest Page | Boolean | Scale all pages to match the widest page width | Yes, No |
| Parameter | Type | Description | Options |
|---|---|---|---|
| Jpeg Quality | Integer | Quality of JPEG compression for images when JPEG compression is used (1–100) | Any integer 1–100 |
| Background Color | String | Color to fill the background of each page | e.g. #FFFFFF, rgba(0,0,0,0) |
| Vertical Resolution | Integer | Vertical DPI (default: 300) | Any integer value |
| Horizontal Resolution | Integer | Horizontal DPI (default: 300) | Any integer value |
| Adjust To Widest Page | Boolean | Scale all pages to match the widest page width | Yes, No |
PNG
| Parameter | Type | Description | Options |
|---|---|---|---|
| Compression | Enum | Compression algorithm for PNG output | CCITT3, CCITT4, LZW, None, RLE |
| Background Color | String | Color to fill the background of each page | e.g. #FFFFFF, rgba(0,0,0,0) |
| Vertical Resolution | Integer | Vertical DPI (default: 300) | Any integer value |
| Horizontal Resolution | Integer | Horizontal DPI (default: 300) | Any integer value |
| Adjust To Widest Page | Boolean | Scale all pages to match the widest page width | Yes, No |
TIFF
| Parameter | Type | Description | Options |
|---|---|---|---|
| Compression | Enum | Compression algorithm for TIFF output | CCITT3, CCITT4, LZW, None, RLE |
| Background Color | String | Color to fill the background of each page | e.g. #FFFFFF, rgba(0,0,0,0) |
| Vertical Resolution | Integer | Vertical DPI (default: 300) | Any integer value |
| Horizontal Resolution | Integer | Horizontal DPI (default: 300) | Any integer value |
| Adjust To Widest Page | Boolean | Scale all pages to match the widest page width | Yes, No |
XPS
| Parameter | Type | Description | Options |
|---|---|---|---|
| Background Color | String | Color to fill the background of each page | e.g. #FFFFFF, rgba(0,0,0,0) |
| Vertical Resolution | Integer | Vertical DPI (default: 300) | Any integer value |
| Horizontal Resolution | Integer | Horizontal DPI (default: 300) | Any integer value |
| Adjust To Widest Page | Boolean | Scale all pages to match the widest page width | Yes, No |
Returns
| Name | Description |
|---|---|
| File content | If Output Format = HTML, returns the rendered HTML string. Otherwise returns the file content as a Base64‑encoded string suitable for downstream actions. |
Example
<div> <p>Name: {{Name}} {{Surname}}</p> <p>Address: {{Address.Number}}, {{Address.Street}}, {{Address.City}}</p></div>{ "Title":"Profile", "Name":"John", "Surname":"Smith", "Address": { "Number":"200", "Street":"Austin rd.", "City":"Dallas" }}<div> <p>Name: John Smith</p> <p>Address: 200, Austin rd., Dallas</p></div>Troubleshooting
Click to expand common errors and fixes
HTML Input Invalid or Malformed
Cause:
The provided HTML string contains syntax errors, unclosed tags, or malformed template expressions.
Fix:
- Validate and sanitise the HTML (lint or parse it).
- Correct template expression syntax and ensure braces/placeholders are balanced.
- Test rendering with a minimal valid HTML sample.
URL Unreachable or Requires Authentication
Cause:
Provided URL is not publicly accessible, requires authentication, or DNS/network resolution fails.
Fix:
- Use a publicly accessible URL or supply the raw HTML string.
- Ensure the hosting endpoint responds over HTTP/HTTPS and is reachable from the rendering environment.
Template Expressions Fail (Missing Data)
Cause:
Template references keys that are absent or mis-named in the Data Sources, or the Data Sources JSON is malformed.
Fix:
- Verify Data Sources keys match template identifiers exactly (case-sensitive).
- Validate JSON structure and types.
- Provide default/fallback values where appropriate.
External Assets Do Not Load or Render Incorrectly
Cause:
Relative links, blocked resources, or resources behind authentication prevent asset loading.
Fix:
- Use absolute URLs for external assets or embed critical styles/images inline.
- Ensure assets are publicly reachable and do not require authentication.
- If fonts/images are essential to layout, include them inline or hosted on a public CDN.
Incorrect Dimensions, DPI or Bitmap Quality Issues
Cause:
Resolution or DPI parameters out of range, or compression settings unsuitable for content.
Fix:
- Use recommended DPI values (e.g., 72–300) and valid compression enums.
- Increase JPEG/PNG quality or reduce compression for photographic content.
Background / Transparency Not Rendered as Expected
Cause:
Transparent backgrounds or unsupported color formats cause unexpected results in raster outputs.
Fix:
- Specify an explicit Background Color (e.g.,
#FFFFFF) when transparency is not desired. - Verify target format supports transparency (
PNGsupports transparency;JPEGdoes not).
Unsupported or Invalid Format Options Supplied
Cause:
Enum values, integer ranges (page count, quality), or option combinations are invalid for the chosen format.
Fix:
- Validate option names, enum values, and numeric ranges for the selected Output Format.
- Remove conflicting options and retry.
Large Page Memory or Timeout Failures
Cause:
Very large HTML documents, heavy images, or long resource fetches exhaust rendering resources or time limits.
Fix:
- Simplify HTML, inline or downscale images, and remove unnecessary third-party resources.
- Break very large content into smaller pages and convert separately.
Generic Runtime or Transient Error
Cause:
Malformed inputs, intermittent rendering engine failure, or internal service error.
Fix:
- Reproduce the issue with a minimal HTML example.
- Validate inputs (HTML, Data Sources, options).
- Retry to rule out transient failures.
Quick Checklist
- HTML is valid and well-formed (or the URL is publicly reachable).
- Template expressions use exact Data Sources keys (case-sensitive) and JSON is valid.
- All external assets (CSS, images, fonts) are publicly accessible or embedded.
- Output Format name is correct and format-specific options are valid.
- Specify explicit background color when transparency is not desired.
- Use appropriate DPI/resolution and compression settings for the content type.
- Test with a minimal, representative HTML sample to confirm rendering before scaling up.
- If rendering dynamic content, prefer pre-rendered HTML or ensure scripts complete quickly.