Get started

Reference Workflows 06 / 06

Evaluate (JS) step

Run JavaScript in the page and capture its result. A step a recorded Writ workflow can run, with its fields and an example.

Runs on Writ CloudWrit Desktop

Open in Claude Open in ChatGPT

The evaluate step runs a snippet of JavaScript in the page context and captures the returned value — the most flexible way to read computed values, parse embedded JSON, or shape complex output.

In a workflow, this step is a JSON object with "type": "evaluate". Steps run in order, and each step can read the outputs of the steps before it.

Fields

Set these inside the step’s config object.

script string required
A JS expression or function body that returns a serializable value.

Example

One evaluate step, as it appears in the steps list of a workflow.

Step
{
  "type": "evaluate",
  "config": { "script": "return JSON.parse(document.querySelector('#data').textContent)" }
}

How it behaves

  • Great for sites that embed their data as JSON in a script tag.
  • Scribe can write the evaluate step for you from a description of what you want back.

Where it runs

The step runs wherever its workflow runs. On Writ Desktop, runs are free and can reach systems that only your own network can reach.

On Writ Cloud, each call costs credits: 20 when the run needs a browser, 2 when it does not. A call that fails because of the site or Writ costs nothing.

Next