# Record a workflow

> Show Writ the clicks once in a real browser, then replay them with new inputs on demand or on a schedule.

Source: https://usewrit.app/docs/workflows/

A recorded workflow is a sequence of steps you show Writ once, in a real browser: open a page, fill a
form, click, download. Writ saves the steps and replays them with new inputs whenever you call it, on a
schedule or from your AI assistant.

## Record, or let Scribe build it?

| Use Turn a website into an API when | Record a workflow when |
| --- | --- |
| You want data back: search results, a product page, your orders. | The job is a chain of actions: fill a form, submit it, wait, download the export. |
| You can describe the result in one sentence. | It is quicker to show the clicks than to describe them. |
| You want several functions for one site. | You want to control each step exactly, including an upload or a file download. |

Both end as an API under **APIs**, called the same way. More examples: [Choose how to start](https://usewrit.app/docs/choosing-a-method).

## Record a workflow

-

1. **Start a recording**

Open **Create**, pick **Record a workflow** and click **Start recording**. The form **Set up your session** opens.

-

2. **Choose the run style**

**One-shot** runs the steps, returns a result, then closes the browser. Most workflows
are one-shot. **Live session** keeps the browser open between calls, for example to stay
signed in and send many actions; see [Live sessions](https://usewrit.app/docs/streaming).

-

3. **Set the starting page and the sign-in**

Enter the **Entry URL**, the page where the recording starts. If the site needs a login,
choose **Use a persona**. Then pick **Reuse saved connection** to start
already signed in, or **Record a new login** to start without old cookies and record the
sign-in. A workflow with a persona runs on Writ Cloud.

-

4. **Adjust the session options (optional)**

- **Humanization**: **Auto** (on for a new login), **On** (types values with real keyboard events) or **Off**.
- **Run on**: **Auto** picks the best available machine, or pin one of your own connected machines.
- **Browse from a specific region**: the country the session exits from, over a residential connection. Off uses a data-center address.

-

5. **Do the task in the browser**

A live browser opens on the entry URL. Use it as you normally would. Each action appears as a step in
the side panel, where you can open it with **Edit step**, move it up or down, or delete
it. **Add Step Manually** adds a step you cannot click, such as a wait. Name the workflow
in the top bar; if you leave it empty, Writ names it after the site.

-

6. **Pick the data to return**

Click **Extract**, then the element on the page. Give it an **Output name:** and a **Type:**, then click **Add Step**. See the next section.

-

7. **Click Done recording**

Writ saves the workflow and opens the finalize screen.

> **limit:** A recording on Writ Cloud lasts at most 60 minutes, and the browser closes after a few minutes without activity. The steps you already recorded are kept.

## Inputs and outputs

### Inputs

The values you type while recording are saved as you typed them. To make a value change on every call,
open the step with **Edit step** and replace the value with a name in double braces, for
example `{{city}}`. Each name becomes an input of the workflow: the Run
form asks for it, and a caller sends it in the request body, as in `{"city": "Lyon"}`.

A password or API key goes in the vault instead, written `{{secret:name}}`.
For a sign-in, attach a persona rather than typing the password into a recorded step: the persona
supplies the login, and its 2FA code, on every run. See [Sign-ins and secrets](https://usewrit.app/docs/personas).

### Outputs

Every **Extract** step adds one field to the result, under its **Output name:**.
The **Type:** says what to read:

- **Text content**: the visible text of the element.
- **Attribute**: one attribute, such as a link’s address.
- **All matching (text array)**: the text of every element like it, for a list of results.
- **Custom script**: a short script you write, for anything else.

**Build an extractor** asks AI to write the extraction for you; it is billed as AI tokens.
Each run’s results land on the workflow’s **Data** tab and in **Outputs**.

## Finalize and use it

After **Done recording**, the screen reads **Workflow ready**. Click **Test now** to run it once, or **Open the workflow** to see its page. The
numbered sections set up how you use it:

- **Call it from your tools**: a ready request for REST, MCP or JavaScript, **Create a key**, and **Expose as an MCP tool** so your assistant sees it as a tool.
- **Automate what follows**: **Schedule runs** on an interval, or **Trigger an automation** when it finishes.
- **Steps and data**: quick edits to reorder, rename or remove steps.
- **Secrets and persona**: the values and the login each run needs.
- **Advanced settings**: where it runs (**Auto**, **Local Agent** or **Writ Cloud**) and other run options.

Click **Done** when you are finished. Everything here can be changed later on the workflow’s
page; calling it is covered in [Call your API](https://usewrit.app/docs/call).

## Edit the steps later

Open the workflow under **APIs** and go to its **Steps** tab (named **Implementation** once the workflow has functions).

- Drag a step to move it. Its menu has **Duplicate**, **Disable (skipped at run time)** and **Delete**.
- **Add a step** picks a step type, then you configure it. **Undo** and **Redo** work across changes.
- **Find optimisations** replays the workflow live and proposes faster steps, such as a direct request instead of a slow page load. Nothing changes until you click **Apply**.
- **Group into a function** turns a set of steps into a function you can call on its own from the API and MCP.

Every step type and its settings: [Step reference](https://usewrit.app/docs/workflows/steps). To add a
capability without editing steps, use **Missing a function? Tell Scribe →** on the
workflow’s page.

## Where it runs and what it costs

- Recording in the cloud uses browser time: **2 credits per minute**, from your plan’s credits.
- Each run on Writ Cloud costs **20 credits**, or its browser time at 2 credits per minute when that is more. A run that **Find optimisations** turned into direct requests can cost **2 credits**.
- A workflow that signs in or uses secrets runs in an isolated browser, created for that run and destroyed after it. Its browser time costs **5 credits per minute** instead of 2.
- A run that fails because of the site or Writ costs nothing.
- Runs on a machine of your own, through **Run on**, are free.

In Writ Desktop, open **Create** → **Record a workflow**. Under **Where to record**, choose **This computer** (free, private, saved on this
device) or **Writ Cloud** (saved to your account; needs a linked account). On this
computer, the recording uses the browser built into Writ Desktop, and every run is free. The finalize
screen offers **Run Test**, **Run on a schedule** and **Its own MCP tool**.

Rates and plans: [Credits and plans](https://usewrit.app/docs/billing-wallet).

## Next

-
- [Step reference](https://usewrit.app/docs/workflows/steps): Every step type, its settings and examples.
-
- [Test and edit an API](https://usewrit.app/docs/functions): Functions, the Call tab and the Documentation tab.
-
- [Live sessions](https://usewrit.app/docs/streaming): Keep a signed-in browser open and send it actions.
-
- [Schedules, triggers and webhooks](https://usewrit.app/docs/automations-webhooks): Run it on a schedule or when something happens.
