Skip to content
NagentNagent
Log inSign upHire your AI Growth Team
NagentNagent
Log inSign up
All documentation

Building a workflow

Build a workflow from one sentence, review the drafted steps on the canvas, publish it, change it safely once it is live, set what starts it, test it on a free model and cap what a run spends.

Browse documentation

A job that runs the same way every time

A workflow is a job written down as steps, each done by an agent, that runs on a schedule, on an event, or when somebody in a team room asks. A brief is one request; a workflow is the same request every Monday, or every time a lead replies, with the result posted in the room.

Workflows live in two places:

  • Workflows, at nagent.ai/admin/ai-team/workflows, lists every workflow in your workspace. The same list is the Workflows tab of the Agent Workbench. Open one and you are in its editor, where the steps, the triggers and the run panel are.
  • A team room runs them. The prebuilt rooms arrive with their own set, and every room runs the workflows on its list from cards in its Workflows tab, with Run now, Test run, free model and a Keep running switch. That side is on workflows in a room.

The link between the two is the team: a workflow is put on a team, and from then on that team's room can start it and receives what it makes. This page is about the first place, building one.

Who can do what

Each workflow belongs to a team: the room it was made for, or one team inside that room. A workflow made from a room belongs to that room, and a prebuilt workflow belongs to the room it arrives with. Who may do what is decided at that team.

Can theyOrganisation adminChief of staffTeam leadMemberViewer
See workflows and read their runsYesYesYesYesNo
Run a team's workflows from its roomYesYesYesYesNo
Build, change, publish and schedule workflowsYesTheir department'sTheir team'sNoNo
  • Running is checked at the room you run it from. A workflow on a room's list runs for that room's people, whichever team it belongs to.
  • Changing is checked at the team it belongs to. Its Chief of staff or Team lead changes it, or an Organisation admin. Turning its schedule on or off counts as changing it.
  • Publishing needs two permissions: the one to change the workflow, and permission to govern AI agents. When you hold the first and not the second, Publish is greyed out, and pointing at it says "Publishing also needs permission to govern AI agents, which Organisation admins, Chiefs of staff and Team leads hold. Nothing was published; save your changes and ask one of them to publish."
  • Moving a workflow to another team needs permission to change workflows at both teams.
  • A workflow that belongs to no team answers only to someone with the role at the whole organisation, such as an Organisation admin. A workflow made before workflows had teams is given the room that runs it when your workspace is updated; one that several rooms run, or none, keeps no team.

A team room opens for a role held at the whole organisation or at that room's department. A role held at one team inside the room's department opens the room too, to read it and run its workflows, as a Member does. Changing a workflow is still judged at the team that owns it, and the room's settings stay with its Chief of staff and admins. A run started in a room can be followed by anyone who can open that room: its card in the room shows each step, and N's "Follow it here" link opens the room when the workflow's own page is not theirs to open. Stopping it and running it again stay with the team that owns it.

A Member who opens a workflow sees it read-only, with the note "You can see this workflow and run it from its team's room. Changing it is for its team's Chief of staff or Team lead, or an admin." When the workflow belongs to a room, an Open its room link sits beside the note. The steps, the triggers and the versions are there to read; Save, Publish, the add buttons and the conductor are not. The run panel shows the runs and their results, with no Run, Stop or approval buttons. A held step is decided in the Inbox, not here. Someone who can see workflows but not run them gets the same page with "You can see this workflow, but not run or change it."

1. Build one from a sentence

On the Workflows page, the New workflow box asks for one thing: "Describe the job in one sentence", with the example "Every Monday, research our competitors and email me a brief". Type it and press Build it. Without the right to build workflows the page says "Read only. Making a workflow is for a team's Chief of staff or Team lead, or an admin." and the box is not shown.

Open the Workflows page from a room (Build a new one for this team, in the room's Workflows tab) and it lists that room's workflows only, and what you build there belongs to that room. Opened on its own, it lists every workflow, and building from it needs someone with the role at the whole organisation, such as an Organisation admin, since what is made there belongs to no team.

The name comes from your sentence: the job without its "every Monday" lead-in, cut to eight words, and you can change it later. The editor opens with the conductor on the left, which reads the sentence before it asks anything:

  • What the sentence settles is not asked. "Every Monday", "every weekday", "daily", "on demand", a time such as "9am", "email" or "Slack" as the destination, and a team named in the sentence are each read and said back: "From your sentence: ...". A schedule with no time in the sentence is drafted for 09:00.
  • What it leaves open is asked, as a few multiple-choice questions with a recommended answer each. If the intake model is unavailable, the conductor asks the three core questions instead: how often, where the result goes, and what needs a person's approval.

Then it drafts. The rail shows "Drafting the plan, 12 s so far. A plan with parallel steps usually takes two to three minutes; it lands on the canvas by itself." When it lands, the conductor says how many steps it drafted and whether a schedule and a room start were set: "The schedule and the Sales room start are set and switch on when you publish", or "No schedule: you start this one yourself."

The canvas

The drafted steps appear on the canvas marked staged, with a count in the header. Review them in the Pipeline view (an ordered list of steps) or the Graph view (the branches and joins). Each step names the agent that does it; a step the conductor could not give an agent has to be bound to one, or discarded, before you can publish: Publish stays off and says "A drafted step has no agent. Bind or create one, or discard the step, before publishing".

If you started from a room (Build a new one for this team in the room's Workflows tab), the editor already knows the team: the workflow belongs to that room from the start, the drafted plan reports to that room, and it is put on the room's list when you publish.

Build one by hand

You don't have to let the conductor draft. You can lay the steps out yourself, on a new workflow or beside drafted ones:

  1. Open the Graph view. The add buttons sit beside it. A new workflow already has a start step; if yours has none, + start adds one.
  2. Add steps with + agent, + tool, + approval, + wait, + branch, + parallel, + join, + loop and + end.
  3. Connect them. Drag from a step's right handle to the next step.
  4. Bind an agent. Select an agent step, pick one under Agent, and write what it should do under Task.
  5. Read Graph checks. The panel on the right lists what is wrong. A workflow needs exactly one start, and every agent step needs an agent. An error keeps Publish off ("Fix errors before publishing"); a warning, such as a step that leads nowhere, does not.
  6. Save, then try it with Test the draft, free model or Run the draft once in the run panel. See "Run or test a draft" below.

Steps that ask, wait and act

Most steps are agent steps: an agent does a piece of the job and writes an answer. Three more kinds sit beside agent in the add buttons on the canvas: tool, approval and wait. The conductor doesn't draft these three, so you add them by hand.

Open any step and its panel shows its Step id, with Copy. Later steps refer to a step's answer through that id, as {{id.field}}. The id can't be renamed: the step's run history and every reference to it hang off it.

Answer fields and the picker

An agent or team step can declare Answer fields (optional): a name, a type (text, number, yes / no or list) and, if you like, what it holds. The agent ends its answer with those fields, and later steps and branches read them as {{id.data.<field>}}.

  • Every field is required. If the answer leaves one out or gives the wrong type, the step fails with a plain reason, such as The answer's "score" should be a number. Its retries, or an on-error path, take it from there.
  • Names use letters, digits and underscores, and can't start with a digit. Two fields can't share a name. A step holds up to 10.
  • The room reads prose. The fields are cut out of the answer the room and later steps read as text.

Under a step's brief, Insert an earlier step's answer lists what the steps before it write, nearest first. Pick one and it is added to the brief as {{...}}. The same list fills a branch's left side, a wait's Until and a tool's inputs.

An agent or team step whose actions waited for approval also gives approvals turned down (approvals.rejected) once every one is decided, so a branch can test whether anything was turned down.

contains and is one of

Branch conditions have two more tests:

  • contains: text that contains a word or phrase, ignoring case; or a list with an item equal to the value.
  • is one of (comma list): the value is one of the items you type, separated by commas, such as hot, warm. Case is ignored.

Anything else, such as a number tested with contains, reads as no.

The approval step: one named person decides

  • Who decides lists the people who can approve requests in this workspace. Publish refuses a step that names nobody ("names no approver. Pick the person who decides.") or someone who can't approve.
  • What to ask is the question they see. It can include earlier answers as {{...}}; left empty, the step's name is asked.
  • When the run reaches it, the run waits and the request is filed to the room the run reports to, or to the Whole team room when it reports nowhere. Either way it reaches the named person's Inbox. If the run has no room and your workspace has no Whole team room, it goes to the operator's queue instead, which the Inbox doesn't show. The run shows the step waiting for that person.
  • Only the named person can approve. Anyone who can approve requests can still decline it: saying no is always safe.
  • The answer is approved (yes or no), by (who decided) and note. Put a branch after the step with the condition <id>.approved eq true (approved is exactly yes): that path for yes, the else path for no.
  • Unanswered after 7 days, it expires. The answer is then approved: no, with expired set, and the step still finishes, so the branch can route an expired request too.
  • If the person leaves or loses the right to approve before the run reaches the step, the step fails with "can no longer approve requests in this workspace, so the step can't ask them."

The wait step

  • For a whole number of minutes, 1 to 43200 (30 days), or Until a date and time, such as 2026-11-02T09:00:00+05:30, or an earlier answer that holds one. Not both.
  • Precision is about five minutes. Waiting runs are checked about every five minutes, so a wait may finish up to five minutes after the time you set. A time that has already passed carries straight on.
  • An Until is written as YYYY-MM-DD, with an optional time. Anything else isn't a date, and fails the step.
  • The run panel shows "Waits until" and the time, on your clock.

Approval and wait steps spend no credits. The step after one hears the work from the steps before it, as if the approval or wait weren't there.

The tool step: one action, as a named agent

  • Act as picks the agent; Tool lists only the actions and connected-app tools that agent is allowed. Inputs take a name and a value, and a value can be an earlier answer as {{...}}. A value that is only one {{...}} passes what it holds as it is, such as a list or a number; other values are sent as text. An input whose earlier answer is missing is left out, never sent empty.
  • It runs with the agent's own permissions. The step passes the same checks the agent would when calling the tool itself: whether the agent is stopped, the tools it is allowed, its level, its budget, your workspace's credits, and what this workflow may reach. If any of them says no, the tool is not run and the step fails. Publish refuses a tool the agent isn't allowed ("Grant it on the agent's Tools page, or pick another agent.").
  • If the agent needs approval for the tool, the step waits for it, in the Inbox like any other held action. Approved, the tool runs and the step finishes. Declined or expired, the step fails.
  • After an approval, later steps can read only whether the tool ran. The step's result then holds a short note of what happened, not what the tool returned. A tool that runs without waiting gives later steps its full result.
  • It runs once and is never retried, because a call that timed out may still have landed. Give it an on-error path to handle a failure.
  • A test run can't run a tool step, because it acts on real systems: a test run of a workflow with one is refused with "a test run can't run tool steps: they act on real systems". Approval and wait steps are allowed in a test run, and an approval step there still asks its person.

On-error paths

Select a connection out of an agent, tool, approval or wait step and tick Run this path only when the step fails. The canvas draws it dashed and labelled on error.

  • When the step fails, after any retries (tool and approval steps get one attempt), the run takes that path instead of failing. The next step reads the failure as {{id.error}}, and hears what the failed step was handed.
  • When the step succeeds, the on-error path is skipped.
  • One per step, with no condition, and only from a step that can fail. Publish refuses a second one, one with a condition, or one from a branch, parallel, join, loop, start or end.
  • A step with no on-error path that fails still fails the run, as before.

2. Publish

Publish opens a readback headed Publish and the workflow's name. It shows what the workflow will be able to reach once it is live ("after publishing, this workflow can", followed by each new reach, or "Publishing adds nothing to what this workflow can reach") and what changed in the graph. Press Publish again to confirm, or Cancel. Publishing needs both the right to change this workflow and permission to govern AI agents (see who can do what); a refused publish changes nothing, and your saved changes stay as they were.

Publishing takes the drafted steps with it, and three things happen:

  1. The triggers start. The schedule and the room start the conductor drafted sit paused with the reason "Starts when the workflow is published" until now. Publish resumes them. A trigger you paused or resumed yourself is left as you set it.
  2. The workflow goes on its team. If the drafted room start reports to a room you are on, and you hold the permission to set up that room, the workflow is added to the room's list. The editor says so: "Published. 2 triggers are live. Sales can run it." Without the permission or the membership, the triggers still start and the editor says why the room was not set up.
  3. A new trigger lists at once on the Triggers panel below the canvas.

No trigger starts a workflow until you publish. You can still try it yourself before then: see "Run or test a draft" below.

Changing a live workflow

Once a workflow is published, people and triggers are relying on it. So Save never changes what runs.

  • Save keeps your edits as unpublished changes. The editor shows an Unpublished changes tag and says "Saved. Not live until you publish." Schedules, events, room starts and every run already under way keep using the published version.
  • Publish makes the changes live. It reads back what changed, as described under "2. Publish" above. When you confirm, the unpublished changes become the published version and the tag goes away.
  • Discard changes throws the unpublished changes away. It asks once first. The published version stays exactly as it was.
  • A workflow you have never published has no separate draft. Save just saves it, and nothing is live yet.

Saving never takes a workflow offline, and there is no unpublish button.

Run or test a draft

You do not have to publish to find out whether an edit works. In the run panel, a draft or a workflow with unpublished changes shows Test the draft, free model and Run the draft once. They run what you saved, and the free-model test follows the same limits as any test run.

  • Save first. If the canvas has edits you have not saved, the buttons stay off and say "Save first, so the run uses what you see."
  • A drafted step needs an agent. A drafted step with no agent stops the run with "A drafted step has no agent. Bind or create one, or discard it, before running the draft."
  • Graph checks must pass. A draft run is refused when Graph checks show an error.
  • Only you start a draft. Schedules, events, webhooks, team rooms, other workflows and agents always run the published version, never a draft.
  • Archived workflows do not run. You get "This workflow is archived. Restore it to a draft before running it."

Archive and restore

Archive needs the same permission as Publish. It is refused while a run of the workflow is going or waiting for an answer. Archived workflows are hidden from the list until you press Show archived. Restore as draft brings one back as a draft, so it runs only after someone publishes it.

Versions and Restore

Every time you publish, the editor keeps that version. Press Versions to see the last 20: the number, when it was published, who published it and how many steps it has. Older ones drop off the list. The numbers skip: every save bumps the number, and only publishes are listed.

Restore to draft asks once, then loads that version into your unpublished changes. It does not go live. Test it, then Publish if you want it. To undo a restore, use Discard changes. Restore is off while you have unsaved edits, so save or discard them first.

When someone else saved first

If a teammate saves or publishes after you opened the editor, your save is refused and nothing is overwritten. The message reads: "Someone saved this workflow after you opened it. Reload to see their changes; your edits here are not saved." Reload, look at what they changed, and make your edit again.

Undo, redo and unsaved changes

  • Undo and redo work on steps and connections: ⌘Z or Ctrl+Z undoes, ⇧⌘Z or Ctrl+Shift+Z redoes. They step aside while you are typing in a field, so the field's own undo works. The name and the input fields are not covered.
  • A dot on Save means you have changes you have not saved.
  • Leaving the page with unsaved changes, by closing the tab or reloading, asks you to confirm first. The all workflows link asks "Leave without saving?" on the page; press Leave to go.
  • The conductor keeps your edits. If you ask it to draft more steps while you have unsaved changes on the canvas, they stay, and the new steps are added next to them.

Triggers: what starts a workflow

The panel headed Triggers · what can start this on the workflow's page holds every way it starts. Each trigger has a label, a limit per hour (10 unless you change it; 0 drops every fire) and Report to, the room the run posts its result into. Choose Nowhere and the workflow does the work and tells nobody.

KindWhat starts the run
ScheduleEvery few minutes, hourly, daily, weekly or monthly, at an hour and minute in a time zone you choose. A schedule keeps the zone it was saved in, daylight saving included
EventA named event in your workspace, such as lead.replied; see the events your pipeline raises on triggers and webhooks
WebhookA signed call from an outside service you named a secret for; see triggers and webhooks
Team threadSomebody in a team room asks for it, from a card or by typing

Schedules and events are checked about every five minutes, so a run can start a few minutes after its time, and never runs twice for the same time. Each schedule, event or webhook on the panel has its own Keep running switch; one that is off says "switched off, so the evaluator skips it. Turn it on with the switch on this row". Only a published workflow's schedule can be switched on, and only by someone who can change the workflow.

A room's Keep running switch, and a schedule said in the room, act on that room's own schedule only: the schedule or event whose Report to is that room. A schedule that reports to another room, or to Nowhere, is left alone, and so is every webhook; switch those here, on the panel. See workflows in a room.

A team thread trigger does not by itself give any team the right to start the workflow: someone who can set up the room still adds the workflow to the room's list, in the room's Workflows tab.

Test runs on a free model

Test run, free model sits in the run panel on the workflow's page, and on the room's cards. It runs every step on a free model, so you can check the steps, the card in the room and the result reaching the room at no cost. Two limits keep it free:

  • Single-agent steps only. A workflow with a manager, action, sub-workflow or pipeline step refuses a test run, because those would spend outside the pinned model. A tool step refuses one too, because it acts on real systems. Every prebuilt team workflow qualifies.
  • Reads only. A test run may read your Knowledge Hub, brand voice, leads, memory and visibility findings. Web search, research, enrichment and connected apps are left out, because a free model is not a free run when it searches the web. A real run keeps every tool.

What a run costs and what needs approval

A start from a room goes through the same door as every agent action: the allowlist, the rate limit and the approval gate. If a start is held, the room's card says "Waiting for approval before it starts." Approving a start approves everything downstream of it, which is why the readback at publish time shows what the workflow can reach.

Inside a run, a step whose action needs a person shows needs approval on the room's live card. On the workflow's page the run panel counts them ("2 actions waiting on you") with Approve + resume and Dismiss + resume.

Each run has a spending ceiling. The run panel's cost meter shows what the run has spent against its cap, or no cap with "This run has no ceiling. Click to set one." The prebuilt team workflows are capped at 600 credits per run. The Blast radius panel on the same page says what the workflow can reach, which third parties are in reach, who runs it and what it bills against.

Stop on the panel stops further steps from being scheduled. It also closes the run's waiting approval requests, so approving one later does nothing, and it stops the workflows the run started and is waiting on. Work already in flight finishes and is still billed. The run then reads Stopped.

Time limits and retries. An agent or team step can set Retries (0-3) and Timeout (seconds). A step that runs past its limit is told to stop. A retry then waits 5 seconds before the second attempt, 10 before the third and 20 before the fourth. A step that has still not stopped 30 seconds after its limit fails and is not tried again, because a second attempt beside it could send the same thing twice. A model call already under way when the limit passes still finishes and is billed. Tool and approval steps run once, with no time limit.

A switched-off agent's step does not run. Before a step that runs an agent starts, and before each retry, the run checks whether its agent is switched off or paused. If it is, the step fails and says so, and its on-error path, if it has one, takes over. A team step leaves its switched-off workers out and runs with the rest; it fails only when every worker is off: "Every agent in <step> is switched off or paused, so the step did not run."

Our logic: a workflow keeps acting after you have stopped looking at it. So no trigger starts it until it is published, saving never changes what is live, every installed schedule starts switched off, a test run cannot spend, and a start from a room is gated like any other action.

Waiting for approval

  • The status. A run with no step working and at least one step waiting on a person reads Waiting for approval, in the runs table and on the room's card. It carries on by itself once someone answers. A run waiting on a sub-workflow whose run waits on a person reads the same, in the runs table, the run panel, the room's card and N's run status.
  • A reminder after a day. When a step has waited 24 hours, the run posts one reminder in the room its request went to, or else in the room the run reports to: "The <workflow> run has waited a day for an approval in this room. If nobody answers, it stops on <date>." An approval step's named person also gets a line in their chat with N. Each waiting step is reminded once.
  • Runs expire after 7 days unanswered. When the request of an agent, team or action step has had no answer for 7 days, the run ends Expired and its open requests close. A high-risk request expires after 24 hours, and the run expires at once if its request is gone before anyone answered. The run's room gets the usual report, which says it expired.
  • Approval and tool steps keep their own expiry. An approval step's request expires after 7 days, and the step finishes with approved: no and expired set, so a branch can route on it. A tool step's request expires after 7 days, or 24 hours for a high-risk call, and the step fails, so an on-error path can take it.
  • An approved tool call with no result. If an approved tool call has no recorded result 15 minutes after the approval, the step fails. The call may still have run, so check before you run it again.
  • Expiry is not a dismissal. A request closed by expiry or by Stop is marked expired, not dismissed, so it counts neither for nor against the agent's record.

Runs and Re-run

Runs, above the canvas, opens the run history as a table, newest first. Show more loads older runs.

ColumnWhat it shows
StatusRunning, Waiting for approval, Completed, Failed, Stopped or Expired, tagged Test run or Draft when it was one
StartedWhen the run started
ByWho started it: a person, a schedule or event, or another workflow
TookHow long it ran, once it ended
StepsHow many steps finished, of all the steps in the run
CostWhat the run spent, in credits; blank when it spent nothing

Open shows that run on the canvas. Re-run starts it again:

  • It is offered to people who may change the workflow. A Member runs a workflow from its room, or by asking N.
  • It runs the published version. On a workflow that is not published the button is off: "Publish this workflow first: Re-run runs the published version."
  • It uses the inputs the run started with. What a schedule, event or webhook delivered is not sent again.
  • A test run re-runs as a test run, on the free model. A run of a draft has no Re-run; use Run the draft once instead. A run another workflow started has none either; run that workflow again.
  • It costs what a new run costs, in credits, under the same cap.

Working on workflows through N and the Chiefs of staff

You do not have to open the Workflows page to work on a workflow. N, and the Chiefs of staff (MIRA for Marketing, CREA for Content, SERA for Sales and TARA for People), can look at your workflows, draft new ones, propose changes, publish, schedule and stop runs, all from a chat. Everything they write goes through the same draft and publish path as the editor, so a workflow that is live never changes by itself.

What they can do, in plain words:

  • List and read. Ask which workflows a team has, what one does, or how its latest run went. They only show you workflows you can see.
  • Draft. Ask for a new workflow. N asks its questions first (what starts it, what it should produce, who checks it), then drafts the steps. The draft is saved unpublished, with any schedule you asked for switched off, so nothing runs until it is published.
  • Propose a change. For a workflow that is already live, they edit the version they just read. If someone saved a newer version in between, the change is refused and they read again. A change is saved as unpublished changes, never over the live version.
  • Publish. Makes a draft or a set of changes live. See the card below.
  • Schedule. Switch a workflow's schedule on or off, or move it to a new time.
  • Stop a run. Cancel a run that is going.

Who can ask for what

  • Members run their team's workflows. Ask N "run the Monday report" and it starts, if the workflow is on one of your teams and you may run it there. A request to build or change a workflow is refused, with a word on who can do it.
  • Team leads and Chiefs of staff build and change workflows for the team that owns them. They cannot change another team's.
  • Admins can build and change any workflow.

The rights are yours, not the agent's. N works for you, so it can do what you can do at that team, no more. A Chief of staff working on its own, with nobody asking, is limited to what a Member may do.

Publishing: a card below L5, none at L5

An agent's autonomy level decides whether somebody has to tap before a publish goes ahead.

  • Below L5, a publish waits for approval. A card goes to the team's approvers, and to you in your own N chat if you asked. The card names the workflow and the version, says what changes, who it reaches, which third parties it touches, and what it is expected to spend, in credits. If the workflow was changed again after the card was filed, approving it publishes nothing and says so: ask the agent for a new card.
  • At L5, the agent publishes alone, for you, and says so. There is no card. Every publish and schedule change is recorded with who asked.

Turning a schedule on or off for a live workflow is treated like a publish, because it changes what runs without anyone watching. Each one is its own tap below L5.

Agents never publish a proposed step that a person has not accepted.

Run, pause and schedule in N's chat

In N's chat you can type the same plain sentences you would use in a room:

  • "run the weekly report" starts it, and N sends you a link to the run;
  • "pause the weekly report" switches its schedule off;
  • "every Monday at 9 run the weekly report" sets the schedule.

You can add "in Marketing" to say which team. If more than one team has a workflow with that name, N asks which one. Your typed sentence is your decision, so these do not make a card. Running needs the right to run at that team; changing a schedule needs the right to change workflows at the team that owns it, and also at the team whose schedule you switch, when that is another team.

A test run uses the free model and cannot spend. An agent never runs a draft: publish first, then run.

Costs are shown in credits, on the card and in N's replies.

Where to go next