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
    • 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
  • What Is a Template?
  • Why Use Templates?
  • Creating a Template
  • Using Square Bracket Notation
  • Using XML Tags
  • Best Practices
Export as PDF
  1. Building AI Agents
  2. Writing Prompts

Templating

Create templates that define the structure of your AI agent's output.

Creating a structured template lets the model knows exactly where and how to inject content. By pairing a template with your data, you get consistent, predictable results every time.

What Is a Template?

A template is a block of text (in Markdown, HTML, or JSON) containing placeholders for your variables. When your workflow runs, MindStudio replaces those placeholders with the actual values you’ve collected (via user inputs, scraped data, files, etc.) and sends the combined prompt to the model.

  • Placeholders can use either XML-style tags <company>…</company> or square-bracket notation [company].

  • Inside a Generate Text or Generate Asset block, you supply:

    1. Your data (e.g., user inputs saved to variables)

    2. The template itself

  • The model fills each placeholder according to your template’s structure.


Why Use Templates?

  • Consistency: Ensure every output follows the same format.

  • Clarity: Guide the model step-by-step—no guessing about headings, sections, or order.

  • Scalability: One template handles countless inputs.

  • Flexibility: Swap templates for different formats (HTML vs. Markdown vs. JSON) without rewriting your workflow.


Creating a Template

Using Square Bracket Notation

Square brackets are ideal for quick and easy placeholders in Markdown templates or ad-hoc prompts. They are simple to identify in plain text and work best when you have single-word placeholders like [title] or [body].

Use them when writing short, straightforward templates, such as bullet lists or paragraphs, where the format resembles a "fill-in-the-blanks" approach.

Example prompt that uses Square brackets:

Write a blog post about {{blogTopic}}. Use Markdown.

[Blog Title]

[Hook+Context]

[Main Point 1]
- [Supporting Detail]
- [Example]

[Main Point 2]
- [Supporting Detail]
- [Example]

[Summary + Call to Action]

Using XML Tags

XML-style tags clearly show where each placeholder starts and ends to help avoid confusion with nearby text or symbols. This is particularly helpful for making sure variables are clearly displayed to the AI model.

Prompt Example (Generate Blog Post):

Write a blog post using Markdown.

<topic>{{blog_topic}}</topic>

You can also use them when you have longer placeholders, or for creating HTML templates with the Generate Asset block.

HTML Example (Marketing Email):

<html>
  <body>
    <h1>Hey <recipient_name>{{name}}</recipient_name>,</h1>
    <p>We’re excited to introduce <product_name>{{product}}</product_name>—<product_tagline>{{tagline}}</product_tagline>.</p>
    <ul>
      <li><feature_1>{{feature_1}}</feature_1></li>
      <li><feature_2>{{feature_2}}</feature_1></li>
    </ul>
    <p><cta_text>{{CTA}}</cta_text></p>
  </body>
</html>

Best Practices

  • Name your placeholders clearly (e.g. [project_summary], not [x]).

  • Wrap variables in tags to avoid ambiguity <budget>{{budgetVariable}}<budget> .

  • Test incrementally: start with one section, preview, then expand.

  • Use Markdown for quick proofs; HTML when you need precise styling.

Last updated 1 day ago

For more information on using Markdown, please review the article.

For more information on creating HTML templates please review the article.

Writing Prompts
Generate Asset block