Skip to content

Steps & Gates

Every workflow is built from two building blocks: steps (the work that gets done) and gates (the checkpoints that control flow). This guide covers all available step types, gate configurations, and how steps connect to each other through transitions.

Each step in a workflow has a type that determines its behaviour. Choose the type that matches what you need the step to do.

Action steps are the most common type. An assigned agent performs a task based on the instructions you provide.

When to use: Any time you need an agent to do something — send an email, look up data, draft a document, update a record.

Configuration:

  • Agent — Select which agent handles this step
  • Instructions — Tell the agent exactly what to do. Be specific and include any context the agent needs.
  • Gate — Choose what happens after the step completes (auto, review, approval, or decision)
  • Output schema (optional) — Declare the exact shape of the data this step should produce. Downstream steps can rely on typed fields instead of parsing free-text output. See Typed outputs below.

Example: “Using the Gmail integration, send a welcome email to the new employee. Include the start date and office address from the workflow input.”

Gates sit between steps and control the transition from one step to the next. Every step has a gate that determines what happens after it completes.

Auto gates let the workflow continue immediately. No human interaction is needed.

When to use: For steps where you trust the agent’s output and do not need anyone to check it before moving on. Most internal data-gathering and notification steps use auto gates.

Behaviour: As soon as the step completes successfully, the workflow automatically advances to the next step.

Gate timing — before vs after step execution

Section titled “Gate timing — before vs after step execution”

Every approval, review, and decision gate has a gateTiming setting that controls when the gate pauses the workflow relative to the step body:

  • gateTiming: "after" (default) — The step runs first, then the gate pauses with the step’s output for review. Use this for triage, after-the-fact review, or when the work itself is safe and you only need a quality check on the result.
  • gateTiming: "before" — The gate pauses before the step body runs. If the gate rejects, the step body never executes. Use this for any step with real side-effects — sending an email, charging a card, writing to simPRO/Xero, creating a job — so that a rejection truly prevents the action.

Decision gates also support gateTiming: "before" to act as pure routers — the step body is skipped and the workflow simply takes the transition matching the picked option.

When an approval, review, or decision gate triggers, Sprigr Teams builds a rich context bundle that is shown to the approver across every channel (portal, Slack, WhatsApp, web push). The context includes:

  • Justification — A headline explaining why the approval is needed, built from a template you configure with values from prior steps.
  • Prior-step summary — A short summary of what the previous step did and what it produced.
  • Context fields — Up to six key fields distilled from earlier step outputs (for example: customer name, order total, requested action).
  • Decision options with descriptions — For decision gates, each option and its description.
  • Transition hints — What happens next for each choice, so the approver knows the downstream consequence.
  • Urgency badge and countdown — If the gate has expiresInMinutes set, a live countdown is shown so the approver knows the deadline.

Approvers can click through to the full approval card from notifications, which takes them directly to the step in the workflow detail view.

Transitions connect steps together and define the order of execution. By default, steps run in sequence from top to bottom. Each transition carries data from the previous step to the next, so agents downstream can reference earlier results.

When you create a workflow, transitions are added automatically as you add steps. You can rearrange steps by dragging them in the workflow editor, which updates the transitions accordingly.

For condition steps, you define two transitions — one for the “true” path and one for the “false” path. For fork steps, you define one transition per branch. Join steps automatically pull in all incoming transitions and wait for them to complete.

Action steps can declare an output schema — a typed contract for the data the step produces. Downstream steps then receive validated, typed fields instead of having to parse free-text agent output.

An output schema is a map of field name to type definition:

  • Types: boolean, number, string, enum, array, object, or any
  • Constraints: required (default true), min / max for numbers, pattern for strings, enum values, nested schemas for arrays and objects
  • Example: a triage step might declare { urgency: { type: "enum", values: ["low", "medium", "high"] }, needs_dispatch: { type: "boolean" } }

When the step completes, Sprigr Teams validates the agent’s output against the schema. Validation behaviour is controlled by the workflow’s strictness setting:

  • strict (recommended) — Reject any output that does not match the schema. The agent sees the validation error as a tool failure and retries with the correct shape. Catches silent bugs like string "true" flowing into a boolean field.
  • lenient — Coerce obvious mistakes (for example, "3" becomes 3 for a number field) and log a warning. The workflow continues.
  • off — Skip validation entirely. Log only.
  • Keep steps focused — Each step should do one thing well. Instead of one giant step that does everything, break it into smaller, targeted steps. This makes workflows easier to debug and reuse.
  • Use gates strategically — Auto gates keep things fast. Add review and approval gates only where the cost of an error justifies the delay.
  • Name steps clearly — Use descriptive names like “Look up customer order” instead of “Step 1”. Clear names make the execution view much easier to follow.
  • Provide detailed instructions — The more specific your step instructions, the better your agent performs. Include what data to use, what format to output, and what to do if something goes wrong.