Workflows

List the workspace's workflows, read one with its steps, create, change, duplicate or delete one, turn one that starts itself on or off, restore a past version, and read or change its failure settings.

The workflow object

{
  "id": "665f1a2b3c4d5e6f7a8b9c0d",
  "name": "Monthly Client Report",
  "description": "Builds a client's monthly report and emails it to them",
  "url": "https://app.lodol.com/create?programId=665f1a2b3c4d5e6f7a8b9c0d",
  "folder_id": "66c4e6a8b0d2f4a6c8e0a2b4",
  "draft": false,
  "starts_from_trigger": false,
  "on": null,
  "inputs": [
    { "name": "client", "type": "text", "required": true, "default": null, "description": "The client to report on" },
    { "name": "month", "type": "text", "required": false, "default": "last month", "description": "" }
  ],
  "outputs": [
    { "name": "total", "type": "number", "description": "The month's sales, in dollars" },
    { "name": "summary", "type": "text", "description": "" }
  ],
  "created_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
  "created_at": "2026-01-15T10:30:00+00:00",
  "updated_at": "2026-01-15T10:30:00+00:00",
  "last_run_at": "2026-03-17T08:00:00+00:00",
  "program": { "kind": "Program", "version": 1, "inputs": [...], "outputs": [...], "body": [...] }
}

Fields

idstring
The workflow's ID. It stays the same when the workflow is edited, so it's safe to store.
namestring
The workflow's name.
descriptionstring
What the workflow does.
urlstring
Where to open the workflow in Lodol.
folder_idstring or null
The folder it's in, or null at the top level.
draftboolean
Whether it's a draft, which can't be run until it's published in Lodol.
starts_from_triggerboolean
Whether it starts from its own trigger or schedule. Running one turns it on rather than running it to an end: see Workflows that start themselves.
onboolean or null
For a workflow that starts from its own trigger or schedule, whether it's on, listening for it. null for a workflow that runs only when it's started.
inputsarray
The inputs the workflow declares, which a run can give values for. Empty if it declares none. A workflow that starts from a trigger or a schedule takes no inputs when run, whatever it declares.
outputsarray
The outputs the workflow declares: what a run that succeeds hands back, in the run's outputs. Empty if it declares none.
created_byobject or null
The member who created it: their id and name.
created_atstring or null
When it was created, in ISO 8601.
updated_atstring or null
When it was last changed, in ISO 8601.
last_run_atstring or null
When it last ran, in ISO 8601.
programobject
Its trigger, inputs, outputs and steps, in the format described in Workflow format. Every answer about one workflow includes it; List workflows leaves it out.

Each entry in inputs describes one input:

Input fields

namestring
The name a run gives the value under.
typestring
One of text, number, boolean, list or object.
requiredboolean
Whether every run must give it a value.
defaultany or null
The value an optional input takes when a run leaves it out.
descriptionstring
What the input is for, as written in the workflow.

Each entry in outputs describes one output:

Output fields

namestring
The name the value is under in a run's outputs.
typestring
One of text, number, boolean, list or object.
descriptionstring
What the output is, as written in the workflow.

A workflow that starts from its own trigger is described under Workflows that start themselves.

Workflow IDs and versions

Editing a workflow can save a new version of it, but its id stays the same, so you can store it and use it to run the workflow later. Every endpoint that takes a workflow ID also accepts the ID of any version of it, such as an ID this API returned before the workflow was edited, and acts on the workflow as it is now. A run records the version that ran as its version_id.


List workflows

GET/api/v1/workflows

Returns the workflows in the workspace the API key belongs to that the member who created the key can see, a page at a time. Requires the workflows:read scope.

Query parameters

searchstring
Only workflows whose name contains this text, in any case.
limitinteger
How many to return, from 1 to 100.Default: 50.
cursorstring
For the next page: the next_cursor of the page you have.
curl https://api-prod.lodol.com/api/v1/workflows \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: a page of the workspace's workflow objects, by name, each without its program. next_cursor gets the next page; see Paging through lists.

{
  "workflows": [
    {
      "id": "665f1a2b3c4d5e6f7a8b9c0d",
      "name": "Monthly Client Report",
      "description": "Builds a client's monthly report and emails it to them",
      "url": "https://app.lodol.com/create?programId=665f1a2b3c4d5e6f7a8b9c0d",
      "folder_id": "66c4e6a8b0d2f4a6c8e0a2b4",
      "draft": false,
      "starts_from_trigger": false,
      "on": null,
      "inputs": [
        { "name": "client", "type": "text", "required": true, "default": null, "description": "The client to report on" }
      ],
      "outputs": [
        { "name": "total", "type": "number", "description": "The month's sales, in dollars" }
      ],
      "created_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
      "created_at": "2026-01-15T10:30:00+00:00",
      "updated_at": "2026-01-15T10:30:00+00:00",
      "last_run_at": "2026-03-17T08:00:00+00:00"
    }
  ],
  "next_cursor": null
}

Get a workflow

GET/api/v1/workflows/:id

Returns one workflow, including its steps as a program. Requires the workflows:read scope. :id can be the workflow's id or the ID of any of its versions; the response always describes the workflow as it is now, under its id.

curl https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: the workflow object, with its program: the workflow's trigger and steps, in the format described in Workflow format.

{
  "id": "665f1a2b3c4d5e6f7a8b9c0d",
  "name": "Monthly Client Report",
  "program": {
    "kind": "Program",
    "version": 1,
    "inputs": [...],
    "body": [...]
  },
  "...": "the other workflow fields"
}

Create a workflow

POST/api/v1/workflows

Saves a new workflow, published, so it can be run straight away, and private to the member who created the key until they share it. Creating a workflow doesn't run it. Requires the workflows:write scope (Create and edit workflows, folders, documents and websites, which you tick when you create the key), and the member who created the key must be allowed to create workflows.

The workflow is checked as it is when your AI tool saves one: its program must be valid, and may use only the apps, connections and other workflows that member can use. A workflow that fails a check isn't saved: the request gets 400 with the code invalid_workflow and a message saying what to fix. Validate a workflow checks that the program is valid without saving it, but not what the member may use, so a workflow can pass it and still be refused here.

Headers

Idempotency-Keystring
Makes the request safe to retry: a repeat with the same key returns the first response instead of saving another workflow. See Idempotency.

Body

namestring
The workflow's name, up to 255 characters.Required.
descriptionstring
What it does, up to 5,000 characters.
programobject
Its trigger, inputs, outputs and steps, in the format described in Workflow format.Required.
curl -X POST https://api-prod.lodol.com/api/v1/workflows \
  -H "Authorization: Bearer $LODOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-greeting-workflow" \
  -d '{
    "name": "Greeting",
    "program": {
      "kind": "Program",
      "version": 1,
      "inputs": [{ "name": "who", "type": "text", "required": true }],
      "outputs": [{ "name": "greeting", "type": "text" }],
      "body": [
        {
          "kind": "LetStmt",
          "name": "greeting",
          "init": {
            "kind": "BinaryExpr",
            "op": "+",
            "left": { "kind": "Literal", "value": "Hello, " },
            "right": { "kind": "VarRef", "name": "who" }
          }
        }
      ]
    }
  }'

Response 201: the new workflow object, with its program and these fields too:

Also returned

version_idstring
The ID of the version that was saved.
apps_to_connectarray
Apps the workflow uses that the key's member hasn't connected yet. Connect them in Lodol before running it.
notestring
Anything Lodol filled in for you, such as an empty branch for a step's failures. Left out when there's nothing to say.
{
  "id": "6ae1295539658490afe878cc",
  "name": "Greeting",
  "description": "",
  "url": "https://app.lodol.com/create?programId=6ae1295539658490afe878cc",
  "folder_id": null,
  "draft": false,
  "starts_from_trigger": false,
  "on": null,
  "inputs": [{ "name": "who", "type": "text", "required": true, "default": null, "description": "" }],
  "outputs": [{ "name": "greeting", "type": "text", "description": "" }],
  "created_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
  "created_at": "2026-12-01T20:25:14.687000+00:00",
  "updated_at": "2026-12-01T20:25:14.687000+00:00",
  "last_run_at": null,
  "program": { "kind": "Program", "version": 1, "...": "..." },
  "version_id": "6ae1295539658490afe878cc",
  "apps_to_connect": []
}

Replace a workflow

PUT/api/v1/workflows/:id

Replaces a workflow's program, its name, its description, or any of them. It's saved as an edit in Lodol is: as a new version, or, if the workflow was saved within the last few minutes, over that version, so version_id stays the same. It keeps its id, whether it's a draft, and who it's shared with. Requires the workflows:write scope; the member who created the key must be allowed to edit workflows, and have edit access to this one (otherwise 403 with the code item_view_only).

A new program is checked as for Create a workflow, and one that fails a check changes nothing. Sending a program with no steps for a workflow that has some is refused too, as it's far more often a mistake: leave program out to change only the name or description.

Headers

Idempotency-Keystring
Makes the request safe to retry, as for Create a workflow.

Body

At least one of these.

programobject
The new program, in the format described in Workflow format.
namestring
A new name.
descriptionstring
A new description.
curl -X PUT https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d \
  -H "Authorization: Bearer $LODOL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Monthly Client Report (EU)"}'

Response 200: the workflow as saved, as for Create a workflow, and trigger_paused, which is true when the workflow was on and this save turned it off, and false otherwise.

A workflow that's on runs as the member who turned it on. A change to its steps saved with that member's key keeps it on, listening with the new version. A change to its steps saved with anyone else's key turns it off, as does saving it as a draft or a change that leaves its trigger unable to start. A change to only its name or description keeps it on. To turn it back on with the new version, turn it on or run it.


Edit a workflow

PATCH/api/v1/workflows/:id

Changes part of a workflow's program with JSON Patch operations, and optionally its name or description, and saves it the way Replace a workflow does. Use it instead of replacing for a change short of a rewrite. It requires what replacing a workflow does, and is checked the same way.

Headers

Idempotency-Keystring
Makes the request safe to retry, as for Create a workflow.

Body

operationsarray
1 to 100 operations, applied in order to the program as it is now. Each has an op (replace, add or remove), a path into the program, such as /body/0/init/value, and for add and replace a value. To add to a list, give the index to insert at, or - to add at the end.Required.
namestring
A new name.
descriptionstring
A new description.
curl -X PATCH https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d \
  -H "Authorization: Bearer $LODOL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operations": [{"op": "replace", "path": "/body/0/init/left/value", "value": "Hi, "}]}'

When an edit touches several places in one list, put the operations from the highest index down, so an insert or removal doesn't move the ones after it. An operation that can't be applied, such as a path that isn't there, returns 400 with the code invalid_request and a message naming it, and nothing changes.

Response 200: as for Replace a workflow.


Validate a workflow

POST/api/v1/workflows/validate

Checks a program without saving anything, and previews what it would do: a dry run against stand-ins for its apps, its steps, and warnings about likely mistakes, such as a field it reads that the step before never returns. Requires the workflows:write scope.

It checks the program itself: that it's valid, and uses only apps this workspace has. Saving checks more, so a program that passes can still be refused with invalid_workflow when you create or change a workflow with it: it may use only the connections and other workflows the member who created the key can use.

Body

programobject
The program to check, in the format described in Workflow format.Required.
curl -X POST https://api-prod.lodol.com/api/v1/workflows/validate \
  -H "Authorization: Bearer $LODOL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"program": {"kind": "Program", "version": 1, "body": [{"kind": "Nope"}]}}'

Response 200: valid says whether the program is valid. When it isn't, error says what to fix:

{ "valid": false, "error": "Invalid Stmt kind: Nope (at /body/0)" }

When it is, the response has the preview: preview (the dry run), steps, actions (the app actions it calls), has_trigger, and warnings (an empty object when there are none). Either way, note says what Lodol filled in, such as an empty branch for a step's failures, when it filled anything.


Delete a workflow

DELETE/api/v1/workflows/:id

Moves a workflow and every version of it to the Trash, as deleting it in Lodol does. It can be restored from the Trash for 30 days; after that it's deleted for good. Requires the workflows:delete scope, and the member who created the key must be allowed to delete workflows (the Delete workflows role permission); otherwise the request gets 403.

Deleting a workflow:

  • stops any run of it in progress
  • stops its trigger or schedule from listening
  • turns off its public link, if it has one
  • keeps its folder, its sharing, and the secrets and values scoped to it
  • keeps its past runs, which you can still read under Runs

Restoring it puts it back in its folder, or at the top level if the folder has been deleted since. Its public link comes back on if the workspace still allows public links. If it was on, it's turned back on as the member who turned it on, unless it no longer can be, such as when its connection has been removed.

:id can be the workflow's id or the ID of any of its versions.

curl -X DELETE https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200:

{
  "id": "665f1a2b3c4d5e6f7a8b9c0d",
  "deleted": true,
  "restorable_until": "2026-04-16T10:30:00.635758+00:00"
}

restorable_until is when it leaves the Trash for good. A workflow that doesn't exist, is already in the Trash, or that the member who created the key can't see returns 404. One they can see but not edit returns 403 with the code item_view_only. A delete that fails returns 500 and leaves the workflow as it was. To retry a delete that timed out safely, send it with an Idempotency-Key: a repeat with the same key answers as the first did, rather than with 404. See Idempotency.


Restore a workflow

POST/api/v1/workflows/:id/restore

Brings a deleted workflow back from the Trash, within 30 days of its delete, as restoring it in Lodol does: every version of it, its folder, its sharing, and its trigger or schedule if it was on. Requires the workflows:delete scope, and the member who created the key must be allowed to delete workflows. List the Trash finds what can be restored.

curl -X POST https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d/restore \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: the workflow, back where it was. Its on says whether it's listening again.

A workflow that isn't in the Trash, because it was never deleted, has already been restored, or was deleted for good, returns 404.


Duplicate a workflow

POST/api/v1/workflows/:id/duplicate

Copies a workflow into a new one beside it, in the same folder and shared with the same people, as Duplicate on the Workflows page does. The copy is off and hasn't run. Requires the workflows:write scope, and the member who created the key must be allowed to create workflows; being able to see the workflow is enough to copy it.

Body

Optional.

namestring
The copy's name. Left out, it's the original's name followed by (copy).
curl -X POST https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d/duplicate \
  -H "Authorization: Bearer $LODOL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Monthly Client Report (EU)"}'

Response 201: the copy, as a workflow object. A copy of a workflow that starts itself is off until it's turned on.

{
  "id": "6ae1295539658490afe878d1",
  "name": "Monthly Client Report (EU)",
  "description": "Builds a client's monthly report and emails it to them",
  "url": "https://app.lodol.com/create?programId=6ae1295539658490afe878d1",
  "folder_id": "66c4e6a8b0d2f4a6c8e0a2b4",
  "draft": false,
  "starts_from_trigger": false,
  "on": null,
  "inputs": [{ "name": "client", "type": "text", "required": true, "default": null, "description": "The client to report on" }],
  "outputs": [{ "name": "total", "type": "number", "description": "The month's sales, in dollars" }],
  "created_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
  "created_at": "2026-12-01T20:22:18.204000+00:00",
  "updated_at": "2026-12-01T20:22:18.204000+00:00",
  "last_run_at": null,
  "program": { "kind": "Program", "version": 1, "inputs": [...], "outputs": [...], "body": [...] }
}

Turn a workflow on

POST/api/v1/workflows/:id/turn-on

Turns on a workflow that starts from its own trigger or schedule, as the switch in the editor does, so each event or scheduled time starts a run. It doesn't run it now, and its runs act as the member who created the key. Requires the workflows:execute scope, and the member who created the key must be allowed to run workflows.

It stays off, and the request gets 400 with a message saying what to fix, while an app it uses isn't connected or one of its settings is blank. A workflow that runs only when it's started has no on or off: turning it on gets 400 with the code workflow_not_runnable, and Run a workflow runs it. Turning on a workflow that's already on changes nothing.

curl -X POST https://api-prod.lodol.com/api/v1/workflows/6ae1295539658490afe878d4/turn-on \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: the workflow, with on set to true.

{
  "id": "6ae1295539658490afe878d4",
  "name": "Hourly stock check",
  "description": "Checks stock levels every hour",
  "url": "https://app.lodol.com/create?programId=6ae1295539658490afe878d4",
  "folder_id": "66c4e6a8b0d2f4a6c8e0a2b4",
  "draft": false,
  "starts_from_trigger": true,
  "on": true,
  "inputs": [],
  "outputs": [],
  "created_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
  "created_at": "2026-11-30T19:47:50.646000+00:00",
  "updated_at": "2026-11-30T19:47:50.646000+00:00",
  "last_run_at": "2026-12-01T20:22:29.528000+00:00",
  "program": { "kind": "Program", "version": 1, "body": [...] }
}

Running a workflow that starts itself turns it on too, and returns its listening run instead.


Turn a workflow off

POST/api/v1/workflows/:id/turn-off

Turns off a workflow that starts from its own trigger or schedule, so it stops listening. A run it already started finishes. Turning off a workflow that's already off changes nothing, so it's safe to repeat. Requires the workflows:execute scope, and the member who created the key must be allowed to run workflows and have the access to the workflow that running it takes.

A workflow that runs only when it's started has no on or off: the request gets 400 with the code workflow_not_runnable.

curl -X POST https://api-prod.lodol.com/api/v1/workflows/6ae1295539658490afe878d4/turn-off \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: the workflow, with on set to false.

{
  "id": "6ae1295539658490afe878d4",
  "name": "Hourly stock check",
  "description": "Checks stock levels every hour",
  "url": "https://app.lodol.com/create?programId=6ae1295539658490afe878d4",
  "folder_id": "66c4e6a8b0d2f4a6c8e0a2b4",
  "draft": false,
  "starts_from_trigger": true,
  "on": false,
  "inputs": [],
  "outputs": [],
  "created_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" },
  "created_at": "2026-11-30T19:47:50.646000+00:00",
  "updated_at": "2026-11-30T19:47:50.646000+00:00",
  "last_run_at": "2026-12-01T20:22:29.528000+00:00",
  "program": { "kind": "Program", "version": 1, "body": [...] }
}

Get a workflow's next runs

GET/api/v1/workflows/:id/next-runs

Says when a workflow that runs on a schedule runs next. Requires the workflows:read scope. A workflow without a schedule returns 400.

Query parameters

countinteger
How many of each schedule's next runs to list, from 1 to 10.Default: 3.
curl "https://api-prod.lodol.com/api/v1/workflows/6ae1295539658490afe878d4/next-runs?count=3" \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: next_runs lists its next run times, in ISO 8601, soonest first, across all its schedules. While the workflow is off, they're when it would run if it were turned on now; the list can be empty for a schedule that runs as soon as it's turned on.

{
  "workflow_id": "6ae1295539658490afe878d4",
  "next_runs": [
    "2026-12-01T21:22:29.524000+00:00",
    "2026-12-01T22:22:29.524000+00:00",
    "2026-12-01T23:22:29.524000+00:00"
  ]
}

List a workflow's versions

GET/api/v1/workflows/:id/versions

Returns a workflow's saved versions, newest first, a page at a time, as its history in Lodol lists them. Requires the workflows:read scope, on a plan with version history; on other plans the request gets 400.

Query parameters

limitinteger
How many to return, from 1 to 100.Default: 50.
cursorstring
For the next page: the next_cursor of the page you have.
named_onlyboolean
Only the versions a person gave a name.Default: false.
curl "https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d/versions?limit=2" \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200:

{
  "versions": [
    {
      "id": "6683e1c4b2a9d7f0e5c3a1b4",
      "workflow_id": "665f1a2b3c4d5e6f7a8b9c0d",
      "number": 5,
      "name": "Before the EU change",
      "workflow_name": "Monthly Client Report",
      "current": true,
      "saved_at": "2026-12-01T19:08:24.508000+00:00",
      "saved_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" }
    },
    {
      "id": "6683e1c4b2a9d7f0e5c3a1b2",
      "workflow_id": "665f1a2b3c4d5e6f7a8b9c0d",
      "number": 4,
      "name": null,
      "workflow_name": "Monthly Client Report",
      "current": false,
      "saved_at": "2026-11-30T19:53:48.958000+00:00",
      "saved_by": { "id": "665f1a2b3c4d5e6f7a8b9c0e", "name": "Ada Lovelace" }
    }
  ],
  "next_cursor": "2"
}

Version fields

idstring
The version's ID, which Restore a version takes, and which a run of it records as its version_id.
workflow_idstring
The workflow it's a version of.
numberinteger
Its number in the workflow's history, counting from 1.
namestring or null
What a person called the version, such as Before the EU change, or null if nobody named it.
workflow_namestring
The workflow's name as this version had it.
currentboolean
Whether it's the version the workflow is at now, which is the one that runs.
saved_atstring
When it was saved, in ISO 8601.
saved_byobject or null
Who saved it: their id and name.

Restore a version

POST/api/v1/workflows/:id/versions/:version_id/restore

Puts a past version of a workflow back, saved as a new version that becomes the current one. The version it replaces stays in the history, so a restore can be undone the same way. A workflow that was on stays on, running the restored version, unless its trigger can't start any more; the workflow's on says which. Requires the workflows:write scope, on a plan with version history; the member who created the key must be allowed to edit workflows and have edit access to this one.

It's checked as saving the workflow is, and refused with 400, changing nothing, if the version can't be saved now, such as one that used a teammate's connection. Restoring the version the workflow is at now returns 400.

curl -X POST https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d/versions/6683e1c4b2a9d7f0e5c3a1b2/restore \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200: the workflow as it now is, at the restored version.


Get a workflow's settings

GET/api/v1/workflows/:id/settings

Returns who is told when a run of the workflow fails, and when it turns itself off after failing. Requires the workflows:read scope.

curl https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d/settings \
  -H "Authorization: Bearer $LODOL_API_KEY"

Response 200:

{
  "workflow_id": "665f1a2b3c4d5e6f7a8b9c0d",
  "tell_person_it_runs_as": true,
  "also_tell": ["grace@example.com"],
  "turn_off_after_failures": 10,
  "turned_off_for_failing": null
}

Fields

workflow_idstring
The workflow these are the settings of.
tell_person_it_runs_asboolean
Whether the person a failing run ran as is told it failed.
also_tellarray
The email addresses of the other members told when it fails.
turn_off_after_failuresinteger
How many runs in a row its trigger or schedule starts that fail before it turns itself off; 0 for never. Runs started by hand don't count.
turned_off_for_failingobject or null
When it turned itself off for failing: when (turned_off_at), after how many failed runs in a row (failed_runs_in_a_row), the last run's error (last_error) and its ID (last_run_id). Otherwise null.

Change a workflow's settings

PATCH/api/v1/workflows/:id/settings

Changes who is told when a run fails, or when the workflow turns itself off after failing. Requires the workflows:write scope, and the member who created the key must be allowed to edit workflows and have edit access to this one.

Body

At least one of these.

tell_person_it_runs_asboolean
Whether the person a failing run ran as is told it failed.
also_tellarray
The email addresses of the workspace members to tell as well, up to 50. It replaces the whole list: give everyone who should be on it, or [] for nobody else. An address that isn't a member's returns 400.
turn_off_after_failuresinteger
Turn it off once its trigger or schedule has started this many runs in a row that fail, from 0 to 1,000; 0 for never.
curl -X PATCH https://api-prod.lodol.com/api/v1/workflows/665f1a2b3c4d5e6f7a8b9c0d/settings \
  -H "Authorization: Bearer $LODOL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"also_tell": ["grace@example.com"], "turn_off_after_failures": 10}'

Response 200: the settings as they are now, as Get a workflow's settings returns them.

On this page