Browse documentation

Build a workflow

The building blocks of automation in Spark, and how to build a workflow from trigger to action end to end.

A workflow is how you make a repeatable operation run on its own. Every workflow is a chain: one trigger that starts it, followed by one or more actions that do the work. This page covers the vocabulary and walks you from an empty list to a working, activated workflow.

Where workflows live

Workflows live in the left navigation under Workflow. The Workflows tab lists every workflow in your workspace along with its status and labels. From here you open an existing workflow or create a new one with New.

Create a workflow

  1. Open Workflow, then the Workflows tab.
  2. Click New, then choose Create Workflow.
  3. Enter a Name and an optional Description.
  4. Click Save changes.

The workflow opens on the canvas editor and starts as a Draft, so nothing runs until you activate it. The empty canvas prompts you to add a trigger.

The Create Workflow dialog with a Name and a Description field and a Save changes button.
The Create Workflow dialog: name it, then Save changes.

Triggers and actions

The two building blocks play different roles:

  • A trigger decides when a workflow runs. A workflow has exactly one trigger.
  • Actions decide what the workflow does once it starts. You chain several in order, and each can read from or write to your data objects, files, and the rest of the workspace.

You build the chain visually: drop a trigger, then add actions after it. A node picker with a Search actions... box and tabs that group the blocks (All, Trigger, Data, Custom, Analytics, and Collaboration) helps you find the block you want.

Add a trigger

Open the node picker and the Trigger group offers one trigger per kind of event:

TriggerStarts the workflow when…
Manualyou start it by hand with Run
Schedulea scheduler fires it on a timer (see Scheduling)
File receiveda file arrives by upload, SFTP, or the workspace email address (see File-triggered workflows)
Email receiveda message arrives at the workspace email address
Record createda record is added to a data object
Record updateda record in a data object changes
Task createda task is created
Task updateda task changes

The Manual and Schedule triggers carry no data into the run; the others pass the arriving item (the file, record, or task) to the actions that follow. A workflow started by another workflow doesn't use a trigger node at all; it's made callable through its invocation settings instead (see Invocation).

Add actions

Actions are the steps that run after the trigger, in order.

  1. Add a node to open the picker again, and search or browse the tabs such as Data and Custom.
  2. Pick a block, for example Parse (Read) CSV, and configure its fields in the side panel.
  3. Add another, such as Filter Records, to narrow the rows the first action produced.
The Actions node picker with tabs (All, Custom, Analytics, Data, Collaboration, Trigger), a search box, and an Ask Agent result.
The node picker: search or browse the tabs, then drop a block onto the canvas.

Some of the most common blocks:

ActionWhat it does
Ask AgentHand a step to the Agent for reasoning or judgment
Human ReviewPause the run for a person to approve or reject
Parse (Read) CSVRead rows from a CSV file
Parse (Read) XLSXRead rows from an Excel file
Filter RecordsNarrow a set of records by conditions
Invoke WorkflowRun another workflow as a step

The Ask Agent action is where deterministic automation meets judgment: use plain actions for steps that must run the same way every time, and hand the parts that need reasoning to the Agent.

A workflow on the canvas: a File Received trigger connected to a Read CSV File action and then an Ask Agent action.
A finished chain: a trigger followed by the actions that run in order.

Configure an action

Select an action on the canvas to set its options in the side panel. A few you'll reach for often:

  • Ask Agent runs an agent as a step. Pick the Agent, write a User instruction (the prompt), and optionally turn on Use previous action data to feed it the prior step's output. Its Output tab shows the agent's activity and token usage.
  • Parse (Read) CSV reads a CSV. Set the delimiter, and under More options skip a number of header or footer rows. Fixed-width text files instead use a Fixed Width mode with a Column ranges editor, one start,end range per line.
  • Filter Records keeps only the records that match conditions you add: a field, an operator (equals, contains, greater or less than, is null, and so on), and a value.
The Ask Agent side panel with a Data Sources selector, an Agent Id of Data Analyst, and a User Instruction prompt.
An action's side panel: here Ask Agent, with its data sources, agent, and instruction.

For how each action reads its input data and the types Spark checks between steps, see Action Inputs.

Save, activate and run

As you edit, an Unsaved changes banner appears. Click Save Workflow to keep your chain. Saving does not make the workflow live: its Status stays Draft so you can lay out and check the whole thing safely.

  1. In the Workflows list, use the workflow's row menu to choose Activate. Its status becomes Active; a workflow must be active before it can run, and Deactivate returns it to Inactive.
  2. Start a run with Run from the same menu, and confirm in the Run workflow? dialog. For a scheduled workflow, set the timing in Scheduling instead.
  3. Open the Executions tab to watch the run and confirm each step succeeded.
A workflow row's menu with Edit, Rename, Run, Deactivate and Archive.
The workflow row menu: Activate/Deactivate, Run, Rename and Archive.

The row menu also lets you Rename and Archive a workflow. Archiving is separate from status: it hides a workflow and stops it running, while keeping its run history; Restore brings it back, and the Show archived toggle next to New reveals archived workflows.

Organize workflows with labels

The Workflows list has a Labels column for tagging workflows. Open a workflow's labels cell and use the Set labels picker to apply existing labels or type a new name to create one (each label carries a color). Labels are shared across the workspace. To narrow a long list, open Filter, which lets you filter by Name, Status, or Labels.

The Workflows list Labels column with a Set labels picker open, showing labels Agent and File Ingestion, next to a Draft status badge.
Tag workflows from the Labels column, and filter the list by label.

Think of a workflow as a sentence: the trigger is the subject that starts it, and the actions are the verbs that follow. Keep triggers narrow and actions focused, and the runs stay easy to read.

Where to go next