MindStudio Docs
  • Get Started
    • Overview
    • MindStudio Chrome Extension
    • Quickstart Guide
    • What is an AI Agent?
    • AI Agent Use Cases
  • Free vs. Paid AI Agents
  • Building AI Agents
    • Editor Overview
    • Workflow Generator
    • Writing Prompts
      • Templating
    • AI Models
    • Variables
      • Working with JSON
      • Using Handlebars Templating
    • Dynamic Variables
    • Data Sources
    • Automations
      • Start Block
      • Generate Text Block
      • Generate Image Block
      • Generate Chart Block
      • Generate Asset Block
      • Display Content Block
      • Text to Speech Block
      • Analyze Image Block
      • User Input Block
      • User Context Block
      • Query Data Block
      • Run Function Block
      • Scrape URL Block
      • Extract Text from File Block
      • Post to Slack Block
      • Menu Block
      • Logic Block
      • Checkpoint Block
      • Jump Block
      • Run Workflow Block
      • Terminator Block
    • Integrations
      • Search Bluesky Posts
      • Scrape Facebook Page
      • Scrape Meta Threads Profile
      • Scrape Instagram Comments
      • Scrape Instagram Mentions
      • Scrape Instagram Posts
      • Scrape Instagram Profile
      • Scrape Instagram Reels
      • Create LinkedIn Post
      • Create X Post
      • Search X Posts
      • Search Google
      • Search Google Images
      • Search Google Trends
      • Search Google News
      • Create Google Doc
      • Fetch Google Doc
      • Update Google Doc
      • Create Google Sheet
      • Fetch Google Sheet
      • Update Google Sheet
      • Enrich Company via Domain
      • Find Contact Email for Website
      • Find Email
      • Verify Email
      • Enrich Person via Email
      • Fetch YouTube Captions
      • Fetch YouTube Channel
      • Fetch YouTube Comments
      • Fetch YouTube Video
      • Search YouTube
      • Search YouTube Trends
      • Create Notion Page
      • Update Notion Page
      • Apify
      • Run Scenario
      • Post to Slack
      • HTTP Request
      • Run Node
      • Create Contact
      • Add Note
      • Send Email
      • Send SMS
    • Packaged Workflows
    • Publishing & Versioning
  • Embedding AI Agents
  • Using Webhooks
  • Workspace Management
    • Workspace Overview
    • Workspace Settings
    • Usage Explorer
    • Billing Settings
    • Account Settings
    • Team Settings & Access Controls
  • Test & Evaluate
    • Testing Suite Overview
    • Evaluations
    • Profiler
    • Debugger
  • Integration Guides
    • Zapier + MindStudio
    • Make.com + MindStudio
    • n8n + MindStudio
  • Developers
    • API Reference
    • NPM Package
    • Custom Workflow Functions
  • Additional Resources
    • Glossary
    • Allowing Access to Mindstudio From Your Network
  • Solutions
    • MindStudio Solutions Partners
    • MindStudio For Developers
    • MindStudio for Enterprises
Powered by GitBook
On this page
  • Configuration
  • Source Document
  • Output
  • Generated Asset Examples
  • Inserting Variables to your HTML Document
  • Single Value Variables
  • Looping Arrays
  • Conditional Rendering
Export as PDF
  1. Building AI Agents
  2. Automations

Generate Asset Block

Generate HTML assets.

Last updated 13 days ago

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:

  1. HTML Document

  2. Markdown

  3. 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:

  1. PDF

  2. Image (PNG)

  3. 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:

  1. Letter

  2. A4

  3. Full Page

  4. Custom Dimensions (if selected you will supply the height and width in pixels)

Select the orientation type for your document:

  1. Portrait

  2. 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:

<!-- Page title -->
<h1>{{page.title}}</h1>

<!-- Subtitle -->
<h2>{{page.subtitle}}</h2>

<!-- Image source -->
<img src="{{page.imageURL}}" alt="{{page.imageAltText}}" />

Looping Arrays

When your JSON contains arrays you can use the each helper to loop through a list of sections in your array.

Example:

{{#each page.sections}}
  <section>
    <h3>{{this.header}}</h3>
    <p>{{this.body}}</p>
  </section>
{{/each}}

Conditional Rendering

You can use if-else to render a block of HTML when a value meets a certain condition.

Example:

{{#if page.featured}}
  <div class="featured-banner">
    Featured article: {{page.title}}
  </div>
{{/if}}

For more information on Handelbars notation, please review our article on

Using Handlebars Templating.