Product guide · Browse & search
Your first workflow
Connect a published agent to a review and a result, with a deliberate path for rejection.
Build a small process that runs an agent, asks for review, and returns a result. This example keeps external writes out of the first workflow so you can see the paths clearly.
Before you start
Create and publish the question-answering agent in Your first agent. Confirm that you can run it. You also need permission to build workflows and a person with the appropriate review access for the Approval step.
A workflow invokes published versions. An unpublished agent draft will not appear as a runnable version to select.
1. Create the workflow and its input
Open Workflows → New workflow. In Workflow settings, give it a name such as Review a response. Define the input as a message and the output as a written answer using the same input/output controls as an agent.
The builder provides Canvas, List, and JSON views of the same definition. Start with Canvas; the List view is useful for checking each step and its outgoing paths. Draft edits are saved automatically. Check the save status before publishing or leaving the editor.
2. Add the agent step
Choose Agent in the palette and select the published version of your request assistant. Name the step Draft answer. Under What to ask it, choose From data → Workflow input → All of it. Both this workflow and the Hello world agent take a string, so the whole input is the question.
Set Save the result as to response. Connect Start to this step, either on the canvas or by choosing Start here under First step. Adding a node without connecting it does not put it on the execution path.
3. Review the result
Add an Approval step named Review answer. Under What is being approved, use From data to select Draft answer → The result. This selects the saved response. Under Who can decide, choose the roles or people allowed to review it. Connect Draft answer's Then path to Review answer.
For this first test, enable The person who started it may decide too if you will review your own test run. Otherwise, arrange for another authorized reviewer to respond.
The review presents a particular proposal. Make sure the reviewer sees the result you actually intend to use. Approval is not an unrestricted permission for all later actions.
4. Finish both paths
Add an Output step named Return answer. Under The result, select From data → Draft answer → The result, and connect Review answer's Approved path to it. This returns the saved answer string and satisfies the workflow's written-answer schema.
Add a Fail step named Response rejected. Set Failure code to review_rejected and What to tell people to “The reviewer rejected the response.” Connect Review answer's Rejected path to it. You now have a clear outcome even when the answer is not approved.
You can add a Changes requested path later, with a deliberate revision loop. Set a maximum when you introduce Repeat; do not create a process that can circle indefinitely.
5. Check data and publish
Open Data to inspect workflow input, saved step results, and values available to later steps. Check that every mapping reads a value available on that execution path. A result produced only on one branch will not exist on the other branch.
Fix the reported graph or schema problems. Choose Publish…, review the new version, and confirm publication. Check Access for the published workflow; the checks include its steps and the agents they invoke.
6. Run and review
Choose Run… for the published workflow and enter a short question. Follow its run path until it waits for approval. An authorized reviewer can respond from the run or the relevant Inbox item. Approve one test run and reject another to verify both paths.
Check the final result and the recorded path. A run waiting for review is still in progress; it is not a failure and does not need a second start request.
Add the next capability
Once this works, you can add a registered sending tool after Approval. Configure its arguments from the same reviewed proposal and select the required approval in Approved by when the tool requires review. Test the external action and its failure path separately.
For all available nodes and settings, use Workflow configuration. To run this process later or in response to another system, use Schedules and triggers.