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

Open the sidebar's Ecosystem tab (⌘⇧E) and click Workflows; if the list ends at Canvas, click More first. The Ecosystem page also has a Workflows card under Features. The workflow section has a row of tabs across its toolbar: Workflows, Executions, Schedulers, Trigger States and Interventions.

The Workflows tab lists every workflow in your workspace, with columns for Workflow, Labels, Status, Last Run and Updated. Each row shows the workflow's name with its description after it in a muted colour, and its context variables on a line underneath. Hover a cut-off name to read the name and description in full.

Create a workflow

  1. Open the Workflows tab.
  2. Click New.

There is no dialog. SPARK creates a workflow called Workflow (or Workflow (2), and so on, if the name is taken), opens it in the editor, and offers an Activate shortcut in a Saved as draft notice. The workflow starts as a Draft, so nothing runs until you activate it.

To give it a real name and a description, click its title in the page header, or choose Rename from the editor's ⋯ menu. The Rename workflow dialog edits both; the description is what the Workflows list shows after the name.

SaveCancelRename workflowThe title and description shown on the workflow list.TitleDaily NAV checksDescriptionLoads yesterday's NAV records and asks the NAVOversight Analyst about the moves past tolerance.Created byCMClaire Martin, 2 days ago ·Updated byCMClaire Martin, 1 hour ago
Name and describe the workflow from its title in the editor header.

The editor

The editor has three parts:

  • A toolbar across the top. On the left, the workflow's context variables and Add context variable. On the right, Save, Activate (only while the workflow is not active), Run, and a ⋯ menu with Rename, Invocation settings, Layout (Horizontal or Vertical), Deactivate (only while it is active), and Archive or Restore.
  • The canvas, where the trigger and actions sit as cards joined by connections.
  • A side panel with two tabs. Configure lists the actions you can add, or, with a card selected, that action's settings. Executions lists this workflow's runs, so you can follow one without leaving the editor.
Add context variableSaveActivateRunManual TriggerTriggerLoad RecordsDataNAV RecordFilter RecordsDataAsk AgentCustomNAV Oversight AnalystSave RecordDataConfigureExecutionsSave RecordSearch actions...CustomAPI RequestCall an HTTP endpoint and pass on its responseAsk AgentAsk an agent to work on the data and answerInvoke WorkflowStart another workflow with values from this runDataApply File LabelLabel incoming files by rules on their namesCanvas To PDFPrint a canvas as a PDF and save it in FilesConcat RecordsStack records from several steps into one listCustom CodeTransform the records with your own Python codeEnrich Fields AIFill in classification fields such as asset class with AI
The editor: toolbar, canvas and side panel.

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.

With nothing selected on the canvas, the Configure tab lists every action under a Search actions... box, in groups, in this order: Custom, Data, Analytics, Collaboration and Trigger. Each entry shows the action's icon in its group's colour, its name, the type of data it takes and gives, and a one-line summary of what it does. A new workflow opens with only the Trigger group unfolded; once it has a trigger, every group opens.

Add a trigger

Open the Trigger group and click a trigger, or drag it onto the canvas.

TriggerStarts the workflow when…
Manual Triggersomeone clicks Run
Schedule Triggera scheduler fires it (see Scheduling)
File Receiveda matching file arrives by upload, Managed SFTP, or the workspace email address (see File-triggered workflows)

The list also shows Email Received, Record Created, Record Updated, Task Created and Task Updated. These are disabled in this release: they are listed dimmed, after the triggers that work, with the hint This action is disabled in this workspace., and nothing starts a run from them yet. Only Manual Trigger, Schedule Trigger and File Received start runs. To bring emails into a workflow today, use the Save Emails action instead (see Email ingestion).

The Manual Trigger and Schedule Trigger carry no data into the run; File Received passes the arriving file to the actions that follow. A workflow started by another workflow doesn't need a special trigger; 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. Click an action in the Configure tab, or drag it onto the canvas.
  2. Configure its fields in the side panel.
  3. Click the next action. It is added after the one you last selected or added, already connected, and the canvas lays the chain out again and pans to it.

The right of the panel's tabs names the step the next click will add after (Adds after), for example → Parse (Read) CSV. To branch, select an earlier card first: a step that already feeds something gets a second connection. A trigger is never connected into, and if the two steps' data types don't line up the connection is still drawn but flagged (see Action Inputs).

ConfigureExecutionsSave RecordfigiDataMap To FIGIMap identifiers to FIGIs with OpenFIGISearch OpenFIGISearch instruments by keywords with OpenFIGI
The Configure tab: search or browse the groups, then click or drag an action onto the canvas.

Each card on the canvas has a ⋯ menu (right-click the card for the same menu) with Edit action, Duplicate and Delete. You can also copy selected cards with Ctrl+C (Cmd+C on a Mac) and paste them with Ctrl+V.

Disabled actions

Some actions are listed but not yet available in your workspace, for example Send Email, Send Message to Slack and the Email Received, Record Created and Task Created triggers. They sort to the end of their group at half opacity, and hovering one reads This action is disabled in this workspace. You can still add one; its card is dimmed and its panel adds Contact support to enable it. When a run reaches a disabled step, the step is recorded as Skipped, and every step after it is left out, so the run cannot read output that was never produced. A new step never chains from a disabled one: it chains from the nearest enabled step before it.

Common actions

ActionGroupWhat it does
Parse (Read) CSVDataRead a CSV file into records. See Read a CSV or Excel file
Parse (Read) XLSXDataRead one sheet of an Excel file into records. See Read a CSV or Excel file
Parse TXT FileDataTurn a delimited or fixed-width text file into records
Parse File AIDataExtract a table from a file with AI. See Read documents
Load FileDataLoad a workspace file for the next steps to read
Load RecordsDataLoad the records of a data object
Filter RecordsDataKeep only the records that match every filter
Map Data FieldsDataRename columns to match a target schema
Merge DataDataJoin other sources onto the base records by key
Concat RecordsDataStack records from several steps into one list
Resolve RelationsDataLink rows to your reference data, asking a reviewer about unknown keys. See Resolve relations
Save RecordDataCreate or update records in a data object. See Save records
Save EmailsDataSave emails as records, and their attachments in Files, from a Microsoft 365 or Gmail mailbox or the workspace's own Mailbox. See Email ingestion
Apply File LabelDataLabel incoming files by rules on their names. See File-triggered workflows
Extract Market DataDataFetch prices and reference data from Quodd and Morningstar
Financial Data EnrichmentDataSend the received file, byte for byte, for backend data enrichment
Canvas to PDFDataPrint a canvas as a PDF and save it in Files. See Export a canvas to PDF
Map to FIGIDataMap a column of identifiers (ISINs, CUSIPs, SEDOLs, tickers) to their FIGIs with OpenFIGI, up to 10,000 a run
Search OpenFIGIDataSearch instruments by keywords with OpenFIGI, for candidates to check
Compute AnalyticsAnalyticsCompute a Next Gate Tech analytics component in SPARK and save the results
ReconcileAnalyticsMatch two sets of records in ordered passes, and report what agrees, differs or is missing
Generate Events, Generate Exceptions, Explain ExceptionsAnalyticsRaise events from analytics signals, group them into exception tasks, and explain them. See Exceptions
Human ReviewCollaborationPause until someone approves or rejects the records. See Human-in-the-loop
Create TaskCollaborationCreate a task with its assignee, status and due date
Ask AgentCustomAsk an agent to work on the data and answer. See Ask an agent
Invoke WorkflowCustomStart another workflow with values from this run. See Invocation

Map to FIGI and Search OpenFIGI read OpenFIGI through an OpenFIGI connection in a shared vault: a workflow never uses a personal vault's connections. See Vaults.

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

Configure an action

Select a card to open its settings in the Configure tab. The head of the panel shows the action's icon, its name (click the pencil, Rename, to give this step its own name), its group badge, and the data type it takes and gives. Below that:

  • Data Sources is folded until you open it, with its count (for example 1 / 1) and any error left on the heading. See Action Inputs.
  • The action's own fields follow. Where a field can read a context variable, a braces button, Use a context variable, sits beside it.

A few you'll reach for often:

  • Ask Agent runs an agent as a step: pick the Agent, write a User instruction, and choose whether to pass it the previous step's data and whether it answers in structured fields. See Ask an agent.
  • Parse (Read) CSV reads a CSV. Set the delimiter, or leave it empty to detect it per file, and under More options skip header or footer rows. Fixed-width text files use the separate Parse TXT File action, whose Fixed Width mode takes Column ranges, one start,end range per line. See Read a CSV or Excel file.
  • Filter Records keeps only the records that match the conditions you add: a field, an operator (equals, does not equal, contains, does not contain, starts with, ends with, >, >=, <, <=, is null or is not null), and a value.
ConfigureExecutionsAsk AgentCustomAsk an agent to work on the data and answerData Sources0 / 1Agent Id*ID of the agent to invoke.NAV Oversight AnalystUser Instruction*Instructions to send to the agent.List each share class in the KIID with its ongoing charge.Use Previous Action DataWhether to include data from the previous action in the message.Structured outputReturn the answer as records with the fields below, one for eachitem it gives. The agent answers as usual, then its answer is readinto the fields and checked.Output fields*Each field is a column of the step's output.Share Class*String · The share class, as the KIID names it.Ongoing ChargeNumber · The ongoing charge, in percent.Add field
An action's settings: here Ask Agent, with its data sources, agent and instruction.

A reconciliation can also copy chosen source columns onto every output row (the Cols To Result setting). Turn that on for the columns you will want to filter or group the result by, such as a date or an account: a row that matched nothing has no other side to read them from, and those are exactly the rows a reviewer is looking for.

Save, activate and run

Save is enabled only while there are unsaved edits. Save before you leave the editor: moving to another page from the sidebar does not ask first, and edits made since the last save are lost. Saving checks that each action has the number of inputs it needs, and names the action if one has too few or too many, for example "Reconcile" has too few inputs. It requires at least 2 inputs but has 1 connection. It also highlights the cards whose required settings are missing. Saving does not make the workflow live: a new workflow stays a Draft until you activate it.

  1. Click Activate in the toolbar. It is disabled while there are unsaved edits (Save your changes first.). If an action is missing a required setting, activation is refused and the card is highlighted so you can fix it.
  2. Click Run, then confirm in the Run workflow? dialog. Run is disabled until the workflow is active and saved (hover it: Activate the workflow to run it.), and needs a trigger (Add a trigger, such as Manual Trigger, to run this workflow.). If the workflow has context variables, the Configure workflow context dialog asks for their values first.
  3. The side panel switches to its Executions tab, where the new run leads the list. Open it to follow each step; see Executions.

For a scheduled workflow, set the timing in Scheduling instead of clicking Run. To take an active workflow offline, choose Deactivate from the editor's ⋯; its status becomes Inactive.

SaveActivateRunRenameInvocation settingsLayoutArchive
The editor toolbar of a draft workflow, with its menu open.

Manage workflows from the list

Each row of the Workflows list has a ⋯ menu (right-click the row for the same menu):

  • Edit workflow opens the editor, as clicking the row does; Open in new tab opens it in a new tab.
  • Rename edits the name and description.
  • Run starts a run of an active workflow.
  • Activate or Deactivate switches the status.
  • Duplicate makes a copy at once, named <name> (copy), with the same steps, connections, context variables, invocation settings, labels and description. The copy always starts as a Draft, so a workflow that runs on uploads or a schedule does not run twice before you have looked at it. Its schedules and runs stay with the original.
  • Archive hides the workflow and stops it running, after an Archive workflow? confirmation, while keeping its run history. Restore brings it back. The archive icon next to New shows archived workflows, dimmed and marked Archived; an archived workflow cannot be opened, edited or run until restored.
Edit workflowOpen in new tabRenameRunActivateDuplicateArchive
The workflow row menu: edit, rename, run, switch status, duplicate or archive.

Organize workflows with labels

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

WorkflowsExecutionsSchedulersTrigger StatesInterventionsNewShowing 1-3 of 3 resultsRows per page50Page 1 of 1WorkflowLabelsStatusLast RunUpdatedDaily NAV checksLoads yesterday's NAV rec…NAV checksActive2 hours ago1 hour agoCMSave emails sent to the MailboxDraftNever3 hours agoCMFee checks, month endActive6 days ago2 days agoCMSet labelsNAV checksMonth-endFees
Tag workflows from the Labels column, and filter the list by label.

Share a workflow in a thread

To point someone to a workflow or one of its runs, paste the address of its page into a thread. It reads as a chip named after the workflow, or after the run, and a click opens it in the panel beside the thread. See Start a thread.

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