Skip to content

Workflows and automations

Two building blocks turn one-off analysis into recurring work: a workflow defines what to do, and an automation defines when to do it.

A workflow is a named, parameterized job Ronja writes for you in a Build mode chat, in Python unless you ask for JavaScript. Instead of redoing an analysis every month, you have it made into a workflow once and run it on demand, filling in parameters such as a date range or a region. Anyone who can open a workflow can run it, except a User Read-Only member. Edits to a shared workflow go through drafts and review.

Most workflows declare a kind for their main output:

  • Function: computes and returns a value.
  • Pipeline: reads tables and writes tables.
  • Report: produces files to download, of any type, such as an HTML summary, a PDF or an Excel export.

A workflow’s page shows what it reads (Inputs), the tables it writes (Table outputs), the shared folders it files into (File outputs), what it runs (Calls), what depends on it (Used by), its files, and its run history. Every run is recorded with a status, logs and output; the statuses are in Run statuses.

Charts and pictures a run draws are shown as well as saved, whatever the workflow’s kind and whoever started the run: in the run’s card in a chat, and under the run in its history. Both show the newest 3 and say how many more there are, and every run’s row keeps its download chips. A run’s card in a chat names at most 20 of the tables it wrote and how many more (“and 980 more”); the run’s own page lists them all behind Show all N.

Admins find every workflow they can see under Workflows in the sidebar’s Advanced group, split into Drafts, published and archived. Everyone else reaches a workflow from its feature’s page, from panels and cards in a chat, or from a link on a run or an automation.

A step more than one job needs, such as recalculating an exchange-rate table, can be its own workflow that the other jobs run as part of their own work. Fix it once and every job that uses it is fixed. A workflow that runs another either waits for its result or hands the work off and carries on; Ronja picks what the job needs.

  • A workflow can’t run itself, and a chain of workflows running workflows stops at five deep.
  • The workflow being run has to be published: until it is, the call is refused with “not published yet”, test runs included. A workflow can name one of your own that isn’t published yet, so a set that runs each other can be written, reviewed and published together.
  • Calls lists the workflows this one runs. Used by lists everything that depends on it: the workflows that run it, the automations, Saved Agents and apps built on it, and a secret that logs in with it.

Archiving a workflow, or moving it to the trash, is refused while a live workflow, automation or Saved Agent declares it, or while a secret logs in with it, and the refusal names which.

To clear a calling workflow, ask Ronja to take the call out of its code. A secret blocks until it stops using the workflow as its login workflow. The rest of Used by doesn’t block: an app that runs the workflow, or a note that mentions it, is listed so you can check it, and an app whose run button points at an archived workflow stops working. Read the whole list before you archive.

A workflow can carry a reporting timezone: the calendar it groups by when it rolls data up per day, week or month. An order placed at 23:30 lands on its local day rather than the next day in UTC.

  • A workflow that carries one uses it on every run, so a run an automation fires at 07:00 and one started by hand in the afternoon give the same numbers.
  • A new workflow takes your organization’s timezone, set by an admin on the Organization rules page, and keeps it; changing the organization’s later doesn’t move it.
  • A workflow created while your organization had none carries no calendar, so each run groups by whoever or whatever started it.
  • To change one workflow’s calendar, ask Ronja: “group this workflow’s months in Europe/Stockholm”. On a shared workflow it goes through draft and review like any change to its code.

A workflow’s report files can go into a shared folder where the right people find them. Tell Ronja where (“save the monthly report into a Reports folder”), and she names the folder in the workflow’s code. Name none, and each workflow files into its own subfolder, named after it, under a shared Workflow outputs folder that the people who can see the workflow can read.

  • When files start landing. In an existing folder, at once, test runs of a draft included. A missing folder is created when you publish the workflow, or earlier if you ask Ronja to create it while drafting. Only an admin can create a new top-level folder.
  • Who keeps access. Whoever creates a folder keeps write access to it, alongside the workflow that files there. A subfolder a run creates by itself under such a folder, such as one per month, gives no one new access, whoever started the run: it is reached through the folder above it. Publishing settles the workflow’s own access: on a shared workflow, the review dialog’s Access changes section names the folders it will write to, and the reviewing admin approves that access with the code.
  • When a run can’t reach its folder, because it doesn’t exist yet or its access was removed, the run still succeeds and saves the file unfiled, with a short delivery note saying what happened and how to fix it.
  • Where to look. The workflow’s File outputs section links each folder in Files. There an admin sees the folder’s Access and Written by, the workflows and automations that save into it. no files yet means a writer has access but hasn’t saved here, as with a report before its first run; no write access means it saved the files here but its next run can’t, so re-add its access if that isn’t intended. A writer with neither badge is healthy.

Pick the folder and audience when you set up a recurring report, so its files land in the right place from the first run.

An automation pairs one trigger (a schedule, an email, a webhook, a table rebuild, an event, or new mail in a connected mailbox) with one action: a workflow, the same job every time, or a Saved Agent that reasons about what arrived.

Which trigger can run which action is in Choose a trigger; a workflow on an email trigger gets the email as its inputs, see Running a workflow on each email.

You create one by asking Ronja in a chat, and find it on the Automations page, with its run history and health. An automation’s run history adds entries such as Skipped to the workflow statuses; see Run statuses.

The Automations page listing automations with their schedules and next runs The Automations page: each row shows an automation, its tags, and when it next runs. Open its page to see the owning feature. What it runs — a workflow or a Saved Agent — is under Configuration, and in the All kinds filter above the list.

Ronja builds a workflow in a chat (“create a workflow that calculates monthly churn”), you test it together and commit it, and then you ask her for an automation that runs it every morning. From then on it runs on its own, and a failing automation tells someone: see Who hears that an automation broke. Every run leaves a trace you can inspect step by step; see Monitor runs and traces.

A workflow can also stop at one step for a person’s decision, and still run from an automation; see Mid-run approvals. An older workflow with a legacy Pre-run approval gate can’t run from an automation; see Approval before a run.

Workflow run failed covers a workflow however it was started: by an automation, by hand, from an app or by Ronja in a chat. It is on from the start.

Where Who and how often
The Notifications bell One for every failed run, for the people who maintain the workflow’s feature, or its author when nobody maintains its feature, and the person who started the run
Email At most one a day per workflow. Before an admin sets up delivery on Notification routing, to the feature’s maintainers, the person who started the run and your organization’s Admins (for a workflow in a private feature, only its owner among the Admins, or every Admin, once that owner has left your organization); after, to the recipients chosen there. A failed run an automation started sends none: Automation run failed covers it

What the failed run wrote stays written. A workflow’s table writes land as it makes them, so the notification lists the tables the run wrote before it failed, each linking to its table, and warns that running the workflow again writes them again: rows it adds are added a second time. To undo a write, restore an earlier version from the table’s history.

The person who started the run is whoever started it in the first place, and only while they are still in your organization. A run that waited for an approval, a reply or a set time and then carried on is still theirs, and so is a failed run someone resumed from where it stopped: the person who approved or resumed it isn’t told as its starter. A run another workflow started counts as started by whoever started that workflow. When an automation, an app, an API token or a Saved Agent started the run, no person is told as its starter.

The email’s subject names your organization, such as [Ronja · Midas] Workflow run failed, and Open the failed run in Ronja opens the run; if you are in a different organization, Ronja asks before switching. Until an admin sets up delivery, its last line links Notification routing, where an admin changes who gets it or turns the email off on the Workflow run failed row. The bell notifications keep appearing either way.

When someone resumes an automation’s failed run and the resumed run fails too, it is emailed like a run started by hand: the automation’s own alert already went out for the first failure.

No notification or email is sent for:

If the failed run had been approved, its approvers are told separately; see Approve a workflow run.

  • Repeat the same job on demand, with parameters → a workflow.
  • Run something without anyone asking, on a schedule or when something happens → an automation that runs a workflow or a Saved Agent.

Step by step: Create a workflow and Schedule an automation. Trigger details are in Automation triggers, and a short comparison in What’s the difference?.