Generate Asset Block
Generate HTML assets.
The Generate Asset block allows users to generate designs and PDFs from a source HTML document.
Configuration
Source Document
Provide the source document that will generate your design. Types of allowed source documents include:
HTML Document
Markdown
Single Page Application (SPA) Bundle
Variables can be included in the source document.
The HTML Developer Environment
By selecting the expand icon within the source document area, you can open a full screen development environment to easily edit the HTML.

The developer environment provides you with additional capabilities:
Generate HTML: Generate HTML code based on a text prompt. You can specify any variables that you'd like to be used in the asset.
Modify HTML: Edit and update your HTML code with a text a prompt.
Test Data: Pass test data through the block and see the output results.
Output
Configure the output settings for the Generate Asset block.
Output Variable
Provide an output variable name for the generated result. Example: Asset_1
Format
Select the output format for the generated asset. Options include:
PDF
Image (PNG)
HTML
Rehost Media
Choose to automatically re-host any third party images in the final output.
Page Size & Orientation
Select the page size for your generated asset:
Letter
A4
Full Page
Custom Dimensions (if selected you will supply the height and width in pixels)
Select the orientation type for your document:
Portrait
Lanscape
Generated Asset Examples
Instagram Carousels
Canva-like social media posts
Financial Reports
Business Presentations
Resumes
Inserting Variables to your HTML Document
Once you've added in your HTML template to the source document environment, you can add variables using Handlebars notation.
Single Value Variables
Single-value variables hold one piece of data (such as a title, URL, or short text) in your HTML template. You add them by writing your {{variableName}}
, and when the template runs, it will be replaced with its actual value.
Example:
Looping Arrays
When your JSON contains arrays you can use the each
helper to loop through a list of sections in your array.
Example:
Conditional Rendering
You can use if-else
to render a block of HTML when a value meets a certain condition.
Example:
For more information on Handelbars notation, please review our article on Using Handlebars Templating.
Last updated