דלג לתוכן הראשי

Steps

A step does one thing to the documents of a run: reads a PDF, adds a row, sends an email. You add steps after the trigger, set each one up in a side panel, and test it on its own before the flow ever runs.

  • Any workspace
  • Console or YAML

Every step has a reference page with its inputs, outputs and every setting. Send it to me by email is an example of one.

Add a step​

  1. Open the flow in the editor. Hover the line after the step you want to follow, and click the + on it. (Right after the trigger, the + reads Add a step after the trigger's name.)

  2. Choose what to add:

    EntryWhat it adds
    ActionA step from the catalog, grouped by type (below).
    AIThe AI steps, such as an agent that reads a document and finds details.
    BranchesA branch with a path for each case.
    FilterA filter that stops the run unless a condition holds.
    WaitA wait for a while, or until a date.
    Call APIA request to another system.
  3. Under Action, type in Search for a step or open a group. Click the step.

  4. Set it up in the panel that opens, then click Done.

The menu that opens from a + on the canvas. It lists Action and AI, each with an arrow, then Branches, Filter, Wait and Call API.The menu that opens from a + on the canvas. It lists Action and AI, each with an arrow, then Branches, Filter, Wait and Call API.
The first menu after a +.

The steps are grouped by what they do: AI, Tables, Files & PDF, Messages, Logic, Business, Connections, Jira and GitHub. The ones you added last come first under Recent, and your saved agents are listed first in their group under Your agents. Search looks at every word of a step's title and description. A small credit figure under each name is what the step costs per run, and the (i) beside it previews an example: what goes in and what comes out.

The step picker under Action: a Back link, a Search for a step box, and the Tables group open with seven steps, among them Add a row to a table, Look up a row in a table, Update a row in a table and Make a CSV file. Each shows its credit cost and an information icon.The step picker under Action: a Back link, a Search for a step box, and the Tables group open with seven steps, among them Add a row to a table, Look up a row in a table, Update a row in a table and Make a CSV file. Each shows its credit cost and an information icon.
The step picker, one group open.

The picker offers only steps that can run there​

Each step needs something from the steps before it: an email, files, text, or "the details" (fields found earlier). A step whose need is not met at that spot is moved to a Not available here group at the bottom of the picker, and the row says why and what fixes it, for example "Needs files, and nothing before it produces that" with the step to add first. A step marked Not set up exists in the catalog but this installation has not configured what it needs.

The API enforces the same rule: a flow with a step whose needs nothing upstream provides is refused. See Data and placeholders for what each trigger and step provides.

Set up a step​

Click a step to open its panel. It has these tabs:

TabWhat it holds
SettingsThe step's settings. A check mark on the tab means every required setting is filled in.
PreviewFor some steps, a live picture of the result: the email that would be sent, the notification, the table row.
TestRuns this one step. See Test a step.
OutputWhat the step produced on a run, once the flow has run.

The Name field at the top is the title the canvas and the run view show. Leave it empty for the step's default title. You can also double-click a step on the canvas to rename it. A name is display only (title in YAML, up to 80 characters): conditions and placeholders refer to the step by its id, so renaming one breaks nothing, and two steps may share a name.

Text settings accept placeholders such as {email.from}: click the {x} button beside a field to pick one from what comes earlier. Example shows a ready-made use of the step, and Remove this step takes it out of the flow when you save. Cancel after a change asks before it discards what you typed.

Test a step​

You can run one step without running the flow. Open the step and choose Test.

  1. Save the flow once. A test needs a saved flow.
  2. On the Test tab, click Test step. The step runs with the settings as they are now, saved or not, on an empty document.
  3. To test on real data, open the editor from a finished run (the run page has Open in editor with this run's data). The step then runs on what reached it in that run.
  4. Read the Result: Worked or Failed, the fields the step produced, and the credits it would use. A test is metered but never charged.
The Test tab of the Send it to me by email step. Under Test step, a Test step button, then Result with a green Worked tag. A blue note reads Dry run: Would run send-email. Nothing was sent or saved. Below, a Fields table lists one field, sentTo, of type Text, with the value dana@acme.test, and a footer says 0.5 credits, metered, not charged.The Test tab of the Send it to me by email step. Under Test step, a Test step button, then Result with a green Worked tag. A blue note reads Dry run: Would run send-email. Nothing was sent or saved. Below, a Fields table lists one field, sentTo, of type Text, with the value dana@acme.test, and a footer says 0.5 credits, metered, not charged.
A dry run of a step that sends an email. Nothing leaves Lumen.

Steps that change something outside Lumen​

A step that sends an email, saves a file, adds a row, posts a message or calls an API is a step with side effects. Testing one is a dry run by default: it checks the settings and shows what it would do ("Dry run: Would run send-email. Nothing was sent or saved.") without doing it. To make a test real, turn on Really send (emails, saves, API calls) on the Test tab; the panel says "On: this test really sends or saves." Leave it off unless you mean it.

A dry run is the right way to check a step's settings. To check how a whole flow behaves before it goes live, run it on a set of test cases instead. See Test and evaluate.

Switch a step off​

A disabled step stays in the flow with its settings but is skipped. It costs nothing, and the documents that reach it go on unchanged, with none of the fields it would have added. It still shows in the run, marked as skipped.

Select the step and click the stop icon in its toolbar, or open its ... menu and choose Disable, or press D with the step focused. Do the same to switch it back on.

A flow on the canvas: a trigger, then a dimmed step with a dashed outline and a struck-through title, 1. Read the attachment, with a small stop badge on its corner, then an active step, 2. File it away.A flow on the canvas: a trigger, then a dimmed step with a dashed outline and a struck-through title, 1. Read the attachment, with a small stop badge on its corner, then an active step, 2. File it away.
A disabled step is dimmed, struck through and badged.

A disabled step does not need its settings complete, and a flow that refers to its outputs gets a warning, not an error, because those fields will be missing at run time. The same switch works on the other kinds of node:

Disabled nodeWhat the run does
Step, wait, approvalGoes straight on to the next node. A wait does not wait.
FilterLets everything through.
BranchTakes the first path. The others are cut.
For eachSkips the loop body and goes to the end node.

Save a configured step and reuse it​

A saved step is a step configured once and used in many flows, such as "Send the invoice to accounting". It is a Step resource built on one catalog step. It fixes some settings (with, locked) and leaves others for each flow to fill in (open).

invoice-mail.yaml
apiVersion: lumen.ai/v1alpha1
kind: Step
metadata:
name: invoice-mail
namespace: tenant-acme
spec:
displayName: Mail the invoice
description: Sends the invoice to accounting.
from: {clusterStep: send-email}
with:
subject: Invoice
attach: true
open: [to]

A flow uses it by pinning a revision. Every change to the Step is a new numbered revision, and a flow keeps running on the revision it names until you save the flow with a newer one.

A node in a flow
- id: mail
stepRef: {kind: Step, name: invoice-mail, revision: 2}
config: {to: "{details.email}"}

The rules:

  • revision is required for kind: Step and not allowed for a catalog step.
  • A node's config may set only the fields the Step leaves in open. Anything else is refused.
  • from cannot change. A different kind of step is a new Step.
  • Billing, side effects and outputs are those of the catalog step underneath.
  • Deleting a Step is refused while a flow pins any of its revisions.

In the console, the steps you save are agents: build one in an agent step and choose Save as agent. It then appears under Your agents in the picker, and a flow that uses an older revision says a newer one exists. Saved steps built on other catalog steps are created with lumen apply -f, or through the API, and flows reference them as above.

Next steps​