Website Content Analyzer: A Workflow Script Tutorial
Learn how to build a Workflow Script that scrapes any web page and returns a structured breakdown: a summary, key points, and tone assessment.
User pastes a URL, the script scrapes the page and returns a structured breakdown: summary, key points, and tone.
Why build this
Learn how to turn any web page into structured, usable information. In this tutorial, you’ll see how a single script can return multiple distinct outputs — a summary, key points, and a tone assessment — and how to map each one to its own workflow variable for use downstream.
Blocks you’ll use
- User Input — Collects the URL the user wants to analyze.
- Run Script — Houses the Workflow Script. Inside the script, a Scrape URL action fetches the page content and a Generate Text action produces the structured breakdown.
- Display Content — Shows the structured breakdown to the user.
Canvas flow
Start → User Input → Run Script → Display Content → End
The Run Script block is where your Workflow Script lives. It uses a Scrape URL action to fetch the page content, then a Generate Text action to produce a structured breakdown — summary, key points, and tone assessment — all returned as a single formatted response under the key analysis.
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
urlin 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, “URL”. Then set the Help Text to a description the user will see — for example, “Enter the URL you’d like to analyze.” 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.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 URL as input, scrapes the page content, then uses a Generate Text action to return three things: a one-paragraph summary, a bullet list of key points, and the overall tone of the content (e.g. professional, casual, promotional). Return all three as a single formatted response under a key named analysis.- 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
urlparameter, set the Variable to{{url}}. - Configure Output Variables — Confirm that
analysisis mapped to the variable{{analysis}}.
-
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
{{analysis}}— the variable you mapped in the Run Script block’s Output Variables. This displays the structured breakdown generated by your script. -
Name your AI agent — Click Untitled Agent at the top of the interface, then update the Agent Name field — for example, “Website Content Analyzer.”
-
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.