Get started

Reference Workflows 06 / 06

Switch tab step

Make a different open tab the active one. 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 switch_tab step changes which open tab the following steps act on, addressed by its position among the open tabs.

In a workflow, this step is a JSON object with "type": "switch_tab". 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.

tab_index number required
Zero-based index of the tab to activate.

Example

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

Step
{
  "type": "switch_tab",
  "config": { "tab_index": 0 }
}

How it behaves

  • An out-of-range index fails the step with the tab count in the message.
  • Pairs with open_tab and tab_closed in multi-tab flows.

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