Skip to Content
Runbase

Workflow nodes

Every workflow node, generated from the block catalog and the connectors.

Built-in nodes run in the workflow engine. Connector nodes (node.<id>) come from connectors/ and run in the functions sandbox. Workspace functions are also available as fn.<name> nodes.

Built-in nodes

ai.decide

AI decision. The AI picks one of the declared branches and explains why.

Branches: .

Input

NameTypeRequiredDescription
promptstringyes
contextanyno
branchesarrayyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "branch": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    },
    "confidence": {
      "type": "number"
    }
  },
  "required": ["branch", "reason", "confidence"],
  "additionalProperties": false
}

ai.extract

AI extraction. The AI extracts structured fields from a text.

Branches: ok.

Input

NameTypeRequiredDescription
textstringyes
fieldsarrayyes
instructionsstringno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "propertyNames": {
    "type": "string"
  },
  "additionalProperties": {}
}

ai.run

AI agent. The AI follows an instruction and can read or update objects.

Branches: ok.

Input

NameTypeRequiredDescription
promptstringyes
contextanyno
objectsarrayyes
schemaobjectno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "result": {}
  },
  "required": ["result"],
  "additionalProperties": false
}

condition

Condition (yes / no). Checks one or more rules on the record (relations included), or compares any run value ({ left: "{{steps.x.output.y}}", op, right }): continues on Yes if true, otherwise on No.

Branches: true, false.

Input

No parameters.

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "result": {
      "type": "boolean"
    }
  },
  "required": ["result"],
  "additionalProperties": false
}

data.set

Set values. Creates named values (text, number, variables) to reuse in the following steps.

Branches: ok.

Input

NameTypeRequiredDescription
valuesobjectyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "propertyNames": {
    "type": "string"
  },
  "additionalProperties": {}
}

data.transform

Reshape data. Extracts fields from an object (e.g. an event's content) under new names.

Branches: ok.

Input

NameTypeRequiredDescription
sourceanyyes
mappingobjectyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "propertyNames": {
    "type": "string"
  },
  "additionalProperties": {}
}

date

Compute a date. Formats a date, adds a duration or computes the gap between two dates.

Branches: ok.

Input

No parameters.

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "value": {
      "type": ["string", "number"]
    }
  },
  "required": ["value"],
  "additionalProperties": false
}

event.emit

Emit an event. Publishes an event that can trigger other workflows.

Branches: ok.

Input

| Name | Type | Required | Description | | ---------------- | --------- | -------- | ----------- | --- | | type | string | yes | | | recordId | string \ | null | no | | | payload | object | yes | | | occurredAt | string | no | | | idempotencyKey | string | no | |

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string"
    },
    "duplicate": {
      "type": "boolean"
    }
  },
  "required": ["eventId", "duplicate"],
  "additionalProperties": false
}

formatter

Format a value. Transforms a value without AI: text (case, replace, split, extract email/URL/number, slug), number (parse, format, round, math), date (parse, format, add, diff), lookup table, first non-empty, list/join.

Branches: ok.

Input

No parameters.

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "value": {}
  },
  "required": ["value"],
  "additionalProperties": false
}

http.request

HTTP request. Calls an external URL and returns the response.

Branches: ok, error.

Input

NameTypeRequiredDescription
methodstringyesOne of: GET, POST, PUT, PATCH, DELETE.
urlstringyes
headersobjectyes
bodyanyno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    },
    "body": {}
  },
  "required": ["status", "body"],
  "additionalProperties": false
}

human.approve

Human approval. Pauses the run until it is approved or rejected, with an optional timeout.

Branches: approved, rejected, expired.

Input

NameTypeRequiredDescription
messagestringyes
timeoutstringno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": ["message"],
  "additionalProperties": false
}

list.aggregate

Compute on a list. Counts items or computes a sum, average, minimum or maximum, overall or per group.

Branches: ok.

Input

NameTypeRequiredDescription
itemsarrayyes
opstringyesOne of: count, sum, avg, min, max.
pathstringno
groupBystringno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "value": {
      "type": ["number", "null"]
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "value": {
            "type": ["number", "null"]
          }
        },
        "required": ["key", "value"],
        "additionalProperties": false
      }
    }
  },
  "required": ["value"],
  "additionalProperties": false
}

list.dedupe

Remove duplicates. Removes duplicate items from a list (by a field or the whole item).

Branches: ok.

Input

NameTypeRequiredDescription
itemsarrayyes
pathstringno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "default": [],
      "type": "array",
      "items": {}
    },
    "removed": {
      "type": "number"
    }
  },
  "required": ["items", "removed"],
  "additionalProperties": false
}

list.filter

Filter a list. Keeps the records of a list that match a condition.

Branches: ok.

Input

NameTypeRequiredDescription
objectstringyes
itemsarrayyes
conditionanyyes
limitintegeryes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "default": [],
      "type": "array",
      "items": {}
    },
    "truncated": {
      "type": "boolean"
    }
  },
  "required": ["items", "truncated"],
  "additionalProperties": false
}

list.limit

Keep the first items. Keeps a limited number of items from a list.

Branches: ok.

Input

NameTypeRequiredDescription
itemsarrayyes
limitintegeryes
offsetintegeryes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "default": [],
      "type": "array",
      "items": {}
    },
    "total": {
      "type": "number"
    }
  },
  "required": ["items", "total"],
  "additionalProperties": false
}

list.map

Transform a list. Turns each item of a list into an object.

Branches: ok.

Input

NameTypeRequiredDescription
itemsarrayyes
mappingobjectyes
limitintegeryes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "default": [],
      "type": "array",
      "items": {}
    },
    "truncated": {
      "type": "boolean"
    }
  },
  "required": ["items", "truncated"],
  "additionalProperties": false
}

list.sort

Sort a list. Sorts the items of a list by a field.

Branches: ok.

Input

NameTypeRequiredDescription
itemsarrayyes
pathstringno
orderstringyesOne of: asc, desc.

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "default": [],
      "type": "array",
      "items": {}
    }
  },
  "required": ["items"],
  "additionalProperties": false
}

loop

Loop. Repeats a sequence of steps for each item of a list.

Branches: done.

Input

NameTypeRequiredDescription
itemsarrayyes
limitintegeryes
includearrayno
doarrayyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "iterations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number"
          },
          "durationMs": {
            "type": "number"
          },
          "cost": {
            "type": "number"
          }
        },
        "required": ["index", "durationMs", "cost"],
        "additionalProperties": false
      }
    },
    "truncated": {
      "type": "boolean"
    }
  },
  "required": ["results", "iterations", "truncated"],
  "additionalProperties": false
}

mcp.call

MCP call. Calls a tool on a configured MCP server.

Branches: ok, error.

Input

NameTypeRequiredDescription
serverstringyes
toolstringyes
argumentsobjectyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "result": {}
  },
  "required": ["result"],
  "additionalProperties": false
}

record.create

Create a record. Creates a record in an object of a database.

Branches: ok.

Input

NameTypeRequiredDescription
objectstringyes
dataobjectyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "record": {}
  },
  "required": ["record"],
  "additionalProperties": false
}

record.delete

Delete a record. Permanently deletes a record.

Branches: ok, not_found.

Input

NameTypeRequiredDescription
recordIdstringyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deleted": {
      "type": "boolean"
    }
  },
  "required": ["deleted"],
  "additionalProperties": false
}

record.get

Read a record. Reads a record by its id.

Branches: found, not_found.

Input

NameTypeRequiredDescription
idstringyes
includearrayno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "record": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ]
    }
  },
  "required": ["record"],
  "additionalProperties": false
}

record.map

Copy a record. Copies a record to an object in any database, field by field.

Branches: ok.

Input

NameTypeRequiredDescription
sourcestringyes
sourceObjectstringno
objectstringyes
modestringyesOne of: create, update, upsert.
recordIdstringno
keystringno
externalIdstringno
mappingobjectyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "record": {},
    "created": {
      "type": "boolean"
    }
  },
  "required": ["record", "created"],
  "additionalProperties": false
}

record.merge

Merge records. Merges duplicates into one record: fields, relations and timeline, all or nothing.

Branches: ok.

Input

NameTypeRequiredDescription
keepstringyes
mergearrayyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "record": {},
    "merged": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": ["record", "merged"],
  "additionalProperties": false
}

record.search

Search records. Searches the records of an object with a filter.

Branches: found, empty.

Input

NameTypeRequiredDescription
objectstringyes
filteranyno
limitintegerno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "records": {
      "type": "array",
      "items": {}
    }
  },
  "required": ["records"],
  "additionalProperties": false
}

record.transact

Batch writes. Applies several creates, updates and deletes in one transaction.

Branches: ok.

Input

NameTypeRequiredDescription
opsarrayyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {}
    }
  },
  "required": ["results"],
  "additionalProperties": false
}

record.update

Update a record. Updates one or more fields of a record.

Branches: ok.

Input

NameTypeRequiredDescription
recordIdstringyes
dataobjectyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "record": {},
    "changed": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": ["record", "changed"],
  "additionalProperties": false
}

record.upsert

Create or update a record. Upsert by unique field (email, domain…) or external id, without duplicates.

Branches: created, updated.

Input

NameTypeRequiredDescription
objectstringyes
dataobjectyes
matchstringno
externalIdstringno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "record": {},
    "created": {
      "type": "boolean"
    },
    "changed": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": ["record", "created", "changed"],
  "additionalProperties": false
}

slack.send

Slack message. Sends a message to Slack through an Incoming Webhook URL.

Branches: ok, error.

Input

NameTypeRequiredDescription
webhookUrlstringyes
textstringyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    }
  },
  "required": ["status"],
  "additionalProperties": false
}

stop.error

Stop with an error. Stops the workflow with an error message; the error shows up in the error center.

Branches: .

Input

NameTypeRequiredDescription
messagestringyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

switch

Switch. Routes to a branch based on a record field's value, or on any run value ({ value: "{{steps.x.output.y}}", cases }): one case per value, then Otherwise.

Branches: dynamic (from the configuration).

Input

No parameters.

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "case": {
      "type": ["string", "null"]
    },
    "label": {
      "type": "string"
    },
    "reason": {
      "type": "string"
    }
  },
  "required": ["case", "label", "reason"],
  "additionalProperties": false
}

wait

Wait. Pauses the run for a duration.

Branches: done.

Input

NameTypeRequiredDescription
durationstringyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "until": {
      "type": "string"
    }
  },
  "required": ["until"],
  "additionalProperties": false
}

wait.until

Wait until a date. Pauses the run until a specific date and time.

Branches: done.

Input

NameTypeRequiredDescription
untilstringyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "until": {
      "type": "string"
    }
  },
  "required": ["until"],
  "additionalProperties": false
}

webhook.emit

Send a webhook. Sends a signed payload to a URL.

Branches: ok, error.

Input

NameTypeRequiredDescription
urlstringyes
secretstringyes
payloadanyyes

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": {
      "type": "number"
    }
  },
  "required": ["status"],
  "additionalProperties": false
}

workflow.run

Run another workflow. Runs another workflow and waits for its result, or continues without waiting.

Branches: ok, error.

Input

| Name | Type | Required | Description | | ---------- | --------- | -------- | ----------- | --- | | workflow | string | yes | | | recordId | string \ | null | no | | | event | any | no | | | wait | boolean | yes | |

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "runId": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "output": {},
    "error": {
      "type": "string"
    }
  },
  "required": ["runId"],
  "additionalProperties": false
}

Connector nodes

node.slack.post_message

Post a Slack message. Posts a message to a Slack channel (or a thread reply with threadTs) as the connected bot.

Branches: ok.

Input

NameTypeRequiredDescription
channelstringyes
textstringyes
threadTsstringno

Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "channel": {
      "type": "string"
    },
    "ts": {
      "type": "string"
    }
  },
  "required": ["channel", "ts"],
  "additionalProperties": false
}

On this page