Skip to content
This documentation is currently in preview, therefore subject to change.

Convert HTML

The Convert HTML action takes raw HTML (or a publicly accessible URL), renders it, and exports it to the chosen format.

Parameters

NameTypeDescription
HTMLStringRaw HTML (as a string) or a publicly accessible URL. You can embed HTML template syntax expressions ({{…}}) to inject values from named Data Sources.
Output FormatEnumDesired target format. One of: PDF, JPEG, PNG, BMP, GIF, TIFF, XPS, HTML.
Data SourcesJSON 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 Items SharePoint action, returning Customers from a SharePoint list.

Example template usage:

{{#each users}}
<p>{{FirstName}} {{LastName}}</p>
{{/each}}

Rendering Options by Output Format

BMP
ParameterTypeDescriptionOptions
CompressionEnumCompression algorithm for BMP outputCCITT3, CCITT4, LZW, None, RLE
Background ColorStringColor to fill the background of each pagee.g. #FFFFFF, rgba(0,0,0,0)
Vertical ResolutionIntegerVertical DPI (default: 300)Any integer value
Horizontal ResolutionIntegerHorizontal DPI (default: 300)Any integer value
Adjust To Widest PageBooleanScale all pages to match the widest page widthYes, No
GIF
ParameterTypeDescriptionOptions
CompressionEnumCompression algorithm for GIF outputCCITT3, CCITT4, LZW, None, RLE
Background ColorStringColor to fill the background of each pagee.g. #FFFFFF, rgba(0,0,0,0)
Vertical ResolutionIntegerVertical DPI (default: 300)Any integer value
Horizontal ResolutionIntegerHorizontal DPI (default: 300)Any integer value
Adjust To Widest PageBooleanScale all pages to match the widest page widthYes, No
JPEG
ParameterTypeDescriptionOptions
CompressionEnumCompression algorithm for JPEG outputCCITT3, CCITT4, LZW, None, RLE
Background ColorStringColor to fill the background of each pagee.g. #FFFFFF, rgba(0,0,0,0)
Vertical ResolutionIntegerVertical DPI (default: 300)Any integer value
Horizontal ResolutionIntegerHorizontal DPI (default: 300)Any integer value
Adjust To Widest PageBooleanScale all pages to match the widest page widthYes, No
PDF
ParameterTypeDescriptionOptions
Jpeg QualityIntegerQuality of JPEG compression for images when JPEG compression is used (1–100)Any integer 1–100
Background ColorStringColor to fill the background of each pagee.g. #FFFFFF, rgba(0,0,0,0)
Vertical ResolutionIntegerVertical DPI (default: 300)Any integer value
Horizontal ResolutionIntegerHorizontal DPI (default: 300)Any integer value
Adjust To Widest PageBooleanScale all pages to match the widest page widthYes, No
PNG
ParameterTypeDescriptionOptions
CompressionEnumCompression algorithm for PNG outputCCITT3, CCITT4, LZW, None, RLE
Background ColorStringColor to fill the background of each pagee.g. #FFFFFF, rgba(0,0,0,0)
Vertical ResolutionIntegerVertical DPI (default: 300)Any integer value
Horizontal ResolutionIntegerHorizontal DPI (default: 300)Any integer value
Adjust To Widest PageBooleanScale all pages to match the widest page widthYes, No
TIFF
ParameterTypeDescriptionOptions
CompressionEnumCompression algorithm for TIFF outputCCITT3, CCITT4, LZW, None, RLE
Background ColorStringColor to fill the background of each pagee.g. #FFFFFF, rgba(0,0,0,0)
Vertical ResolutionIntegerVertical DPI (default: 300)Any integer value
Horizontal ResolutionIntegerHorizontal DPI (default: 300)Any integer value
Adjust To Widest PageBooleanScale all pages to match the widest page widthYes, No
XPS
ParameterTypeDescriptionOptions
Background ColorStringColor to fill the background of each pagee.g. #FFFFFF, rgba(0,0,0,0)
Vertical ResolutionIntegerVertical DPI (default: 300)Any integer value
Horizontal ResolutionIntegerHorizontal DPI (default: 300)Any integer value
Adjust To Widest PageBooleanScale all pages to match the widest page widthYes, No

Returns

NameDescription
File contentIf 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>

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 (PNG supports transparency; JPEG does 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.