Skip to content

Building a Workflow

Overview

You build a workflow on a visual canvas. You add steps from the palette, connect them into a flow, and configure each step in the inspector. You can build the whole thing by hand, or ask RivalBot to draft it for you and then fine-tune.

Creating a workflow

  1. Open Workflows from the app and go to the list page at /workflows.

  2. Click New workflow (or the dashed Create workflow tile in the grid).

  3. The builder opens on a blank canvas at /workflows/{id}.

The list page groups your workflows into tabs - All, Built by you, Adopted, and Published - and has a search box for finding one by name or tag.

The builder layout

The builder has a few regions:

  • Palette (left) - the list of steps you can add, under Add a step.
  • Canvas (center) - where your steps live and connect.
  • Inspector / Run log (right) - configure the selected step, or watch a run.
  • RivalBot panel (optional) - chat to edit the workflow in natural language.

The toolbar across the top holds the workflow title, a save indicator (Saving… / Saved), Undo/Redo, History, Publish, and the blue Run button.

Adding steps

There are two ways to add a step from the Add a step palette:

  • Drag a step onto the canvas and drop it where you want it.
  • Click a step to append it to the last step, auto-connected - no dragging needed.

Every workflow needs a trigger as its first step. On an empty canvas, start by adding a Manual Trigger, then click a step like Function or Agent - each one you add auto-connects to the previous step.

Connecting steps

Connections carry data from one step to the next.

  • Auto-connect - clicking a step in the palette wires it to the last step for you.
  • Manual - drag from one step’s output handle to another step’s input handle.
  • Edit a connection - click the connection to open the Connection inspector. It has a Branch field (leave blank for “always”) and a Detach action to remove the connection. You can also select a connection and press Delete.

For branch steps like IF and Switch, the connection’s Branch value decides which output it comes from (for example true or false on an IF).

Configuring a step

Select a step to configure it in the right-hand inspector. Each step type has its own fields:

  • Function - pick a marketplace tool, choose its operation, and fill in the input form. Bind fields to earlier data with {{$json.field}}.
  • Agent - pick a Rival Agent and write a Prompt (supports {{$json.field}}).
  • Connector - pick a provider and operation (see Connectors below).
  • HTTP Request - choose a method and URL and set the body/headers.
  • IF / Switch - build the condition or the value expression and its cases.
  • Set Fields - map or set output fields with expressions.
  • Split Out / Aggregate / Filter - reshape the item stream.
  • Code - write a short JavaScript snippet that runs over the items.
  • Sub-workflow - pick another workflow to run; its final output flows on.
  • Result - write a message to print into the run log (supports {{$json.field}}).

Referencing earlier data with expressions

Any field that accepts an expression takes {{ }} templates:

  • {{$json.field}} - a field on the current item.
  • {{$node["Step Name"].json.field}} - a field from an earlier step, by name.
  • {{$vars.name}} - a workflow variable.
  • {{$runId}}, {{$now}} - the current run id and timestamp.
  • {{$startOfDay(0)}}, {{$endOfDay(-1)}} - date helpers (with an optional day offset - -1 is yesterday).
  • {{$jsonParse($json.body).field}} - parse a stringified JSON value, then read into it.

Path lookups auto-parse stringified JSON along the way, so {{$json.result.body.items}} reaches into a step’s stringified response without a separate parse. Because steps are addressed by name, renaming a step keeps its references working.

Connectors

Some steps act in third-party services - Gmail, Slack, Google Sheets, and more - through connectors (OAuth integrations). A workflow that uses a connector needs that service authorized before it can run.

When a connector isn’t connected yet, a banner appears at the top of the builder:

Connect this connector to run this workflow

  1. Click Connect for the service in the banner (or Reconnect if a previous grant errored).

  2. Sign in to the provider and approve the requested scopes in the OAuth popup.

  3. The connector saves the grant on this workflow, and the banner clears once every connector is active.

Connectors are authorized per workflow - each workflow signs in to its own Gmail, Slack, or Sheets.

Building with RivalBot

You don’t have to wire everything by hand. RivalBot can build and edit workflows conversationally.

Building a new workflow

From a RivalBot chat, describe the automation you want. RivalBot plans it, shows a Build workflow action, and then streams the steps onto a canvas as it builds. When it finishes, you get a card showing the workflow name and step count - click it to open the workflow in the builder.

RivalBot grounds the steps in your org’s real tools and connectors, so the operations and fields it wires up match what those services actually accept.

Editing an existing workflow

Inside the builder, toggle the Edit with RivalBot panel (the Bot icon in the toolbar). Describe a change in plain language:

  • “remove the Slack step”
  • “email it instead”
  • “only notify when the total is over 500”

RivalBot rewires the affected steps and re-renders the canvas, leaving the rest of your layout untouched. Changes that remove or disconnect steps stream a preview first and wait for you to click Apply changes; smaller edits apply immediately. You can still drag and edit every step by hand, and Undo (Ctrl+Z) reverses an AI edit.

Saving

The builder saves your changes - watch the toolbar’s save indicator move from Saving… to Saved. If you try to leave with unsaved changes, an Unsaved changes dialog warns you first.

Next steps