Skip to main content
MindStudio
Pricing
Blog About
My Workspace
TutorialWorkflow ScriptsResearch & Writing

AI Blog Post Generator: A Workflow Script Tutorial

Learn how to build a Workflow Script that researches a topic on Google and generates a full blog post — title, intro, body, and conclusion — tailored to your target audience.

MindStudio Team
AI Blog Post Generator: A Workflow Script Tutorial

User provides a topic and target audience. The script researches the topic on Google and generates a full blog post — title, intro, body, and conclusion — tailored to the audience.

Why build this

Learn how to build a content creation tool that does real research before it writes. You’ll use live search results as source material for a Generate Text action, producing a blog post that’s grounded in current information rather than generated from scratch. You’ll also see how to configure a User Input block with multiple user inputs to collect everything the script needs before it runs.

Blocks you’ll use

  • User Input — Collects the topic and target audience in a single block, with two user inputs configured inside it.
  • Run Script — Houses the Workflow Script. Inside the script, a Search Google action researches the topic and a Generate Text action writes the blog post.
  • Display Content — Shows the generated blog post to the user.

Canvas flow

Start → User Input → Run Script → Display Content → End

The Run Script block is where your Workflow Script lives. It takes a topic and target audience, searches Google, and uses a Generate Text action to write a complete blog post — title, intro, body, and conclusion — returned under the key post.

How to build it

  1. Open the Automations Canvas — Open MindStudio. The Automations Canvas is displayed by default. You’ll see a Start block and an End block already in place.

  2. Add a User Input block — Click + to add a block and select User Input. This block will hold both user inputs for this workflow.

    • Add the first user input — In the block settings on the right, click +, then click Create New. Set the Type to Short Text, enter topic in the Variable field, and set the Label to a short name like “Topic”, and set the Help Text to something like “What topic should the blog post cover?”
    • Add the second user input — Click the + next to User Inputs in the Explorer panel on the left. Set the Type to Short Text, enter audience in the Variable field, set the Label to a short name like “Audience”, and set the Help Text to something like “Who is this blog post for?”
    • Add the remaining inputs to the block — Once you’ve created all your user inputs, click the Main.flow tab at the top of the editor to return to the workflow. Click the User Input block on the canvas to select it. In the block settings on the right, click + to open the Choose User Inputs to Add modal. Select audience in the order you want it displayed to the user, then click Add.
  3. Add a Run Script block — Click + in the workflow, then select View All Blocks. From the Blocks screen, search for Run Script and select it. In the block settings, click Edit Script to open the script editor. Paste the prompt below to generate the script automatically.

    Generate a script that asks the user for a topic and target audience. The script searches Google, then uses a Generate Text action to produce a full blog post with a title, intro, body, and conclusion. Return the blog post under a key named post.
    • Return to the workflow — Once the script is generated, click the Main.flow tab to return to the workflow. The Input Variables and Output Variables settings will appear in the block settings on the right.
    • Configure Input Variables — Set the Variable for each:
      • For topic, set the Variable to {{topic}}
      • For audience, set the Variable to {{audience}}
    • Configure Output Variables — Confirm that post is mapped to the variable {{post}}.
  4. Add a Display Content block — Click + and select Display Content. Connect it after the Run Script block. In the block settings, set the Message field to {{post}} — the variable you mapped in the Run Script block’s Output Variables. This displays the blog post generated by your script.

  5. Name your AI agent — Click Untitled Agent at the top of the interface, then update the Agent Name field — for example, “AI Blog Post Generator.”

  6. Preview your AI agent — Click the Preview button, then select Open Draft Agent to run the AI agent and test your workflow.

Try it in MindStudio

Open MindStudio and follow along with this tutorial. No coding required.

Presented by MindStudio

No spam. Unsubscribe anytime.