Skip to main content
MindStudio
Pricing
Blog About
My Workspace
TutorialWorkflow ScriptsCommunication

Cold Email Sequence Writer: A Workflow Script Tutorial

Learn how to build a Workflow Script that researches a prospect's company website and generates a personalized 3-email outreach sequence.

MindStudio Team
Cold Email Sequence Writer: A Workflow Script Tutorial

User provides a prospect’s name, their company website, and an outreach goal. The script researches the company and writes a personalized 3-email sequence — intro, follow-up, and final check-in.

Why build this

This tutorial shows how to use a Scrape URL action in a communications context. Instead of just pulling content from a page, you’re using it strategically — gathering company intelligence that feeds directly into personalized outreach. You’ll see how the research-then-write pattern applies outside of content creation, and how a single Generate Text action can produce structured, multi-part output like a full email sequence.

Blocks you’ll use

  • User Input — Collects the prospect’s name, company URL, and outreach goal in a single block, with three user inputs configured inside it.
  • Run Script — Houses the Workflow Script. Inside the script, a Scrape URL action researches the company website and a Generate Text action writes the 3-email sequence.
  • Display Content — Shows the generated email sequence to the user.

Canvas flow

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

The Run Script block is where your Workflow Script lives. It scrapes the prospect’s company website and uses a Generate Text action to write a personalized 3-email outreach sequence — intro, follow-up, and final check-in — returned under the key sequence.

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 all three 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 prospect in the Variable field, and set the Label to a short name like “Prospect Name”, and set the Help Text to something like “Who are you reaching out to?”
    • 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 company_url in the Variable field, set the Label to a short name like “Company URL”, and set the Help Text to something like “Enter the URL of their company website.” Since this input expects a URL, also set the Validation to URL — this ensures the user enters a valid web address before the script runs.
    • Add the third user input — Click the + next to User Inputs in the Explorer panel on the left. Set the Type to Short Text, enter goal in the Variable field, set the Label to a short name like “Outreach Goal”, and set the Help Text to something like “What do you want to accomplish with this outreach?”
    • Add the remaining inputs to the block — Once you’ve created all your user inputs, click the Main.flow tab 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 company_url and goal in the order you want them 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 takes three user inputs: prospect (the prospect's name), company_url (the URL of their company website), and goal (what you want to accomplish with this outreach). Use a Scrape URL action to research the company website, then use a Generate Text action to write a 3-email outreach sequence — an intro email, a follow-up, and a final check-in — each personalized based on the company information and the stated goal. Return the email sequence under a key named sequence.
    • 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 prospect, set the Variable to {{prospect}}
      • For company_url, set the Variable to {{company_url}}
      • For goal, set the Variable to {{goal}}
    • Configure Output Variables — Confirm that sequence is mapped to the variable {{sequence}}.
  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 {{sequence}} — the variable you mapped in the Run Script block’s Output Variables. This displays the email sequence 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, “Cold Email Sequence Writer.”

  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.