Competitor Research Report: A Workflow Script Tutorial
Learn how to build a Workflow Script that researches a company, scrapes the top result, and generates a structured competitive analysis report.
User provides a company name. The script searches Google, scrapes the top result, and generates a structured competitive analysis covering product overview, target market, key strengths, and potential weaknesses.
Why build this
This tutorial shows how to chain Search Google and Scrape URL together inside a single script — a common pattern for research workflows. You’ll see how to pass a search result URL directly into a scrape action, then feed the scraped content into Generate Text to produce a structured output. It’s the same pipeline used in sales intelligence, market research, and competitive monitoring tools.
Blocks you’ll use
- User Input — Collects the company name the user wants to research.
- Run Script — Houses the Workflow Script. Inside the script, a Search Google action finds the company, a Scrape URL action pulls content from the top result, and a Generate Text action writes the competitive analysis.
- Display Content — Shows the generated competitive analysis report to the user.
Canvas flow
Start → User Input → Run Script → Display Content → End
The Run Script block is where your Workflow Script lives. It chains Search Google and Scrape URL to gather company intelligence, then feeds that content into a Generate Text action to produce a structured competitive analysis returned under the key report.
How to build it
-
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.
-
Add a User Input block — Click + to add a block and select User Input. In the block settings on the right, click + to add a user input, then click Create New. Set the Type to Short Text and enter
companyin the Variable field — this is the name you’ll use to reference this input in the Run Script block. Set the Label to a short name — for example, “Company Name”. Then set the Help Text to a description the user will see — for example, “What company do you want to research?”Once you’ve set up the user input, click the Main.flow tab at the top of the editor to return to the workflow.
-
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 a company as input. Use a Search Google action to find information about the company. Use a Scrape URL action to scrape the top search result. Then use a Generate Text action to produce a structured competitive analysis covering the company's product overview, target market, key strengths, and potential weaknesses. Return the report under a key named report.- 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 — For the
companyparameter, set the Variable to{{company}}. - Configure Output Variables — Confirm that
reportis mapped to the variable{{report}}.
-
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
{{report}}— this displays the competitive analysis returned by the script to the user. -
Name your AI agent — Click Untitled Agent at the top of the interface, then update the Agent Name field — for example, “Competitor Research Report.”
-
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.