Skip to content

Tutorials

Tutorial: use the Agent to build a form and workflow

Ask the built-in Agent to build a leave request form, then move to the workflow builder and have it build the approval workflow in the same conversation. Every change is confirmed first.

Last updated 4 min read Edit this page on GitHub
On this page

Goal: a Leave request form and its approval workflow, built by asking the Agent. You move from the form designer to the workflow builder and keep the same conversation.

You need: the Agent turned on in your workspace (see Setting up the Agent), and the build permissions for what you ask it to make: Edit forms, Create workflows and Edit workflows. The Agent can only do what you can do.

Time: about 15 minutes.

1. Open the Agent in the forms library#

  1. Go to Build › Forms.
  2. Select the Agent button (the sparkle) at the bottom-right of the screen. The Agent panel opens beside the page. The context chip under its title shows what the Agent is looking at, for example Looking at: ….

2. Ask for the form#

Type:

The Agent shows a confirmation card: the form's name and the fields it will add, with any warnings. Nothing is saved yet. Read it, then select Confirm. (Cancel tells the Agent you said no.)

Forms have no draft. When you confirm a change to a form that is already in use, people filling it see the new version straight away. The card warns you when that applies.

3. Refine it in the designer#

Open the new form in the designer. The Agent stays open and the conversation carries on. Try:

Confirm each change on its card. Save any changes you made by hand in the designer before you ask the Agent to change the same form.

4. Move to the workflow builder, same conversation#

  1. Go to Build › Workflows and open a workflow, or select New workflow to start an empty one.
  2. The Agent panel stays open with your earlier messages, and a Now on … divider marks the move. The context chip now reads, for example, Looking at: Workflow “Leave request approval”.

Ask:

Because a workflow is open, the Agent asks first: Build it in “…” (the workflow you have open), or create a new workflow? Choose Use the open workflow or Create a new workflow. (If you had said "here", "this workflow" or "a new one", it would not ask.)

The card lists the steps it will add. Select Confirm. The workflow is saved as a draft: a new workflow is inactive, and an existing one keeps running its published version. Nothing changes for live runs until you publish.

After that, "this" and "it" mean the open workflow: Add a reminder to the approval task after one day changes this workflow.

5. Build from a file (optional)#

Have a paper version of the form, or a sketch of the process? Attach it in the Agent panel (the paperclip Attach files, drag-and-drop, or paste a screenshot) and ask "Build a form from this" or "Turn this into the approval workflow". The Agent asks whether to use the open item or a new one, and shows a confirmation card as before. Reading images needs a model that supports vision.

6. Review, test and publish it yourself#

  1. Read the workflow in the builder. Ask the Agent Explain what this workflow does or Check this workflow for problems.
  2. Select Save & test and run a test case (see step 8 of the approval tutorial).
  3. When you are happy, select Publish. The Agent never deletes anything, and it never publishes or switches on a workflow with a schedule or an event trigger like this one. (For a manual workflow it can publish and start a run when you ask, after you confirm.)

7. When a test fails#

If a test step fails, select Ask Agent to fix next to the error. The Agent already knows the workflow from your conversation. It explains what went wrong (say, a start date that arrives as text where a date is needed) and proposes a fix on a card, such as adding a Format Date step or changing the field type. Select Confirm, then Re-run test to run the same inputs again.

What you built#

  • A form and an approval workflow, from three or four plain-language requests.
  • Each change reviewed on a confirmation card before it was saved.
  • One conversation that followed you from the form designer to the workflow builder.

Tips#

  • Be specific: name the fields, outcomes and who approves.
  • Ask it to explain before you ask it to change.
  • New conversation clears the history when you start something unrelated. The history is kept in this browser only, and is cleared when you sign out.

Next steps#

Was this page helpful?