BetterClaw
Workflows

Edit sections

Reword sections, redraft their contracts, change reads, writes and connectors, and add or remove sections.

Edit sections

Every step of a workflow is a section. A section has a number, a name, a contract line, and the text that tells the agent what to do. You edit sections in Template view. Use the Template / Run switch in the top bar to change views.

Edits save automatically. A published workflow keeps running its published version until you Publish again. See Run and schedule.

Change what a section says

Click into a section's text and type. Write the step the way you'd say it to a colleague.

To rename a section, click its name, type the new one, and press Enter.

The contract line

Under each section's name is a line that says how it connects to the rest of the workflow:

  • reads: values the section takes in. These can be written by a section above it, come from the workflow's inputs, or be something the workflow remembers between runs.
  • writes: values the section produces for later sections to read.
  • uses: the connectors (connector:…), secrets (secret:…), and scripts the section needs.

If a read is shown in orange with a dotted underline, nothing above the section writes that value. Change the read or remove it.

Redraft a section from its text

After you change a section's text, a band appears: Your text has changed. Redraft its connectors, inputs and outputs to match. Click Redraft. The agent works out the section's contract again from its text. That covers connectors, secrets, reads, writes, whether it should ask you first, and any new input it needs.

The changes are applied straight away and the section shows Your changes are updated. Then you can:

  • click Keep It to accept them, or
  • click Undo Changes to restore the section's previous contract.

Continuing to edit also keeps the changes.

To redraft a section without changing its text, focus the section and click the Redraft chip next to its name. Use this when the contract doesn't match the words.

Edit reads, writes, and connectors by hand

When the text is right and only one name is wrong, edit the contract line directly:

  • Change a read: click the value after reads. Pick another value from Read instead, or choose Stop reading it. Only values that something above this section provides appear in the list.
  • Rename a write: click the value after writes, type a new name, and press Enter. Esc cancels. Sections further down that read the value are updated to the new name. Names are converted to lowercase with underscores, so "Topic outlines" becomes topic_outlines.
  • Swap a connector: click a connector:… entry and pick a different one.
  • Add a connector: focus the section and click the connector chip. Connected tools are listed first. If you pick one that isn't connected, the section asks you to connect it.
  • Add a secret: focus the section and click the secret chip. Pick one of the workspace's secrets, or choose A new one… to create it on the Secrets page.
  • Remove a connector or secret: click the × next to it.

A section can use up to eight connectors, secrets, and scripts in total. Scripts are part of the workflow and can't be added or removed here.

Make a section ask you first

Focus a section and click asks you first to make the section stop and wait for your approval before it goes ahead. Click it again to stop asking. Sections that ask first are marked wherever the workflow appears. See Approvals.

Add a section

  • At the end: click the insert point below the last section.
  • Between two sections: click the insert point between them.

Write what the new section should do in a sentence or two and click Add section. Its name and contract line are worked out from your text when it's added.

Remove a section

Hover over a section and click the trash icon. The section is removed straight away and a message offers Undo for a few seconds. If later sections read a value the removed section wrote, those reads are marked so you can fix them.

Choose accounts and secrets

Click the connections control at the top of the document to open Connections. It lists everything the workflow uses, grouped as connectors, secrets, and scripts, and shows which section uses each.

  • Connectors: pick which connected account the workflow should use. If a connector isn't connected, the row links to its page in Connectors.
  • Secrets: pick which workspace secret to use for each name. If the workflow's agent can't read a secret yet, give it access from here. See Secrets.
  • Scripts: listed as comes with it. There's nothing to set up.

Change the agent

In Template view, use the agent picker at the top of the document to move the workflow to another agent. From then on, that agent runs it.