Build Automations from a Chat
Turn the connector actions an agent took in a conversation into a reusable automation draft — then inspect and edit it, all over MCP.
There are two ways to build an automation. You can draw it on the visual canvas, or — when you're working in a connected agent like Claude Code, Codex, or Cursor — you can turn the work you just did in the conversation into an automation without leaving your client.
The pattern is "do it once by hand, then automate it." You ask your agent to carry out a task using approved connector tools. Once it works, you ask the agent to turn that chat into an automation. Wato distills the connector calls it made into a draft, reconciles them against your team's connector catalog, and gives you a canvas link to review. Nothing goes live until you publish it in-app.
1. Do the task once
Work normally. Ask your agent to do something real with connector tools — fetch
recent issues, send a message, update a record — using mesh_execute_tool. The
connector calls it makes in this conversation become the seed for the
automation's steps, so get the task working before you automate it.
2. Turn the chat into a draft
Ask your agent to create an automation from what it just did. It calls
wato_create_automation_from_chat, passing:
observedToolCalls— the connector tools it ran, in order. Each entry is one connector action it dispatched (theconnectorSlug,toolName, and theinputit passed).description— the goal and how it should be triggered. State the trigger cadence explicitly ("every weekday at 9am", "when a Linear issue is created") — it usually can't be inferred from the tool calls alone.
The tool returns a draft and a review link. It does not create a live automation.
Drafts are low blast-radius
Creating or editing a draft only requires team membership. Publishing — which is what actually makes an automation run — stays gated behind its own review step in the app. An agent can safely propose an automation; a human turns it on.
3. Inspect the draft
Before changing anything, have the agent read the draft back with
wato_get_automation_draft. It returns every step in flow order with a step
number, and for each connector-tool step its individual schema fields. Each field
is tagged:
| Tag | Meaning |
|---|---|
value | Set to a literal value. |
wire | Wired to an earlier step's output, e.g. {{previous.id}}. |
unset | Not yet filled in. |
Those step numbers are how you target precise edits next.
4. Edit in plain English
Use wato_edit_automation_draft to apply a change described in plain English. It
runs through the same deterministic operation engine as the in-app chat bar, so
it makes targeted edits rather than regenerating the whole canvas. You can:
- change a specific tool field — "in step 3, set
include_payloadto true" - wire a field to a prior step's output — "wire the label step's
message_idto the fetched email's id" - adjust the schedule, rewrite an agent prompt, rename the automation
- add or remove a step
It edits the draft in place and returns the updated graph (plus any validation
errors to resolve before enabling). Re-read with wato_get_automation_draft to
confirm the change landed.
5. Review and publish
Open the canvas link from step 2. Review the steps, run a Test run, and when it looks right, Publish to turn the draft into a live automation. See Quickstart: Your First Automation for how publishing validates and activates the trigger.