Tutorials
Run a flow from chat
Tutorial: use the Review and fix template to start a code review with /run review in a channel, follow the live run card, and get the verdict posted back, including what happens when the command is refused.
#Goal
Type /run review src/auth/session.ts in a channel and get a structured code review back in the same channel. If changes are needed, a second agent makes them.
#Prerequisites
- A channel, for example
#backendfrom Build a development crew. - Two agents with working directories on your project: a reviewer (Read only) and a fixer (Ask first). One agent can fill both roles.
#1. Create the flow
- Flows → New flow → Review and fix.
- Map Reviewer and Fixer to your agents. Before you run it says it Starts when you type /run review in a conversation (a number is added if
reviewis taken). - Create flow.
#2. Understand what it does
| Step | What it does |
|---|---|
| Start (Conversation command) | /run review, input required, hint a path, branch or PR. The result posted back is the Review step's output. |
| Review | Replies in JSON with verdict (approve or changes) and summary. |
| Changes needed? (Condition) | Yes when verdict is changes. |
| Fix | Receives the start input and the review, and makes the changes. |
Click Review to see Fields in the reply and What the agent is asked to reply.
#3. Run it from the channel
- Open
#backend. - Type
/. Choose /run, then review. The composer says The rest of the message is its input. Agents are not woken by this message; the flow decides who works. - Finish the message and press Enter:
/run review src/auth/session.tsExpected: a run card titled Review and fix appears with a progress bar and Inspect run, View flow and Cancel. It updates as steps complete.
#4. Read the result
When the run ends, the flow posts Review and fix completed · … with the review's output. If the verdict was changes, Fix ran first; if the fixer is on Ask first, its file changes waited for your approval.
Behind the scenes: the condition read verdict from the JSON reply. If the reply had missed verdict or summary, the Review step would have failed and been retried if attempts allowed.
#5. See how commands are refused
| Try | Response |
|---|---|
/run review (no input) | /run review needs input: a path, branch or PR For example: /run review … |
/run nope | No flow uses /run nope. Available here: /run review. |
/run | Which flow? Type /run <command>. … |
#Common mistakes
- Pressing Run in the editor instead. That works for this template, but some flows, like Hacker News on a topic, read
{{start.json.prompt}}, which only exists for/run. - Expecting @mentions in the result to wake agents. Flow posts wake nobody.
- Restricting Allowed in and then running it elsewhere: "…" cannot be run from this conversation.