Get started

Reference Workflows 06 / 06

Two-factor (2FA) step

Complete a two-factor challenge on your own account. 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 twofa step completes a two-factor challenge on your own authorized account. The code is obtained server-side from the configured persona — a generated TOTP, a code read from the persona's connected mailbox, or one received by SMS — and entered on the page.

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

selector selector
The code input; auto-detected when omitted.
submit_selector selector
Optional Verify/Continue button to click after the code is entered.

Example

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

Step
{
  "type": "twofa",
  "config": { "selector": "input[name='code']" }
}

How it behaves

  • The code is generated or read server-side from the persona; it is never exposed to AI steps or stored in the recipe.
  • Authenticator (TOTP), email, and SMS challenges are all handled the same way.
  • Strictly for your own authorized accounts.

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