Building blocks of a workflow
In short: a workflow step is always one block from a fixed catalogue. This article gives the overview of all blocks with their technical name, the label in the editor, the kind and the exits, and explains the rules that apply to many blocks at once. The full reference per block (all inputs, exits and output fields) is in six articles, one per group.
Where to find this
Account > Workflows, open a workflow and choose Add step. The menu groups the blocks by kind. Who: from the role Organisation admin; only an Account admin can change a workflow of the whole account.
The Add step menu in the workflow editor under Account > Workflows, with the blocks grouped by kind: Fetch, AI, Work on, Do, Decide, Repeat, Wait, A person and Agents.
All blocks
| Technical name | Label | Kind | Exits | Reference |
|---|---|---|---|---|
plugin.read |
Fetch from a connected system | Fetch | found, none, failed |
Connected systems |
record.find |
Customer’s record | Fetch | found, none, several |
Connected systems |
record.read |
Read the record’s details | Fetch | found, none, failed |
Connected systems |
ai.transform |
AI step | AI | none (next) |
AI and editing |
data.format |
Calculate and format | Work on | none (next) |
AI and editing |
document.create |
Make a document | Do | none (next) |
Connected systems |
message.send |
Message to the customer | Do | sent, failed, rejected, expired |
Conversation and messages |
plugin.action |
Plugin action | Do | executed, failed, rejected, expired |
Connected systems |
ticket.forward |
Forward by e-mail | Do | none (next) |
Conversation and messages |
ticket.label |
Put on a label | Do | none (next) |
Conversation and messages |
ticket.update |
Update conversation | Do | none (next) |
Conversation and messages |
flow.condition |
Condition | Decide | true, false |
Deciding, repeating, waiting |
flow.switch |
Choose a route | Decide | the values in cases, plus other |
Deciding, repeating, waiting |
message.check |
Check the message | Decide | true, false |
Deciding, repeating, waiting |
flow.foreach |
For each | Repeat | each, done |
Deciding, repeating, waiting |
flow.wait |
Wait | Wait | none (next) |
Deciding, repeating, waiting |
human.request |
Ask a person | A person | the values in exits, plus expired |
People |
task.create |
Task | A person | none (next) |
People |
agent.choose |
Choose from a list | Agents | the values in options, plus other |
Agents |
agent.reply |
Write the reply | Agents | drafted, sent, not_needed, failed |
Agents |
agent.task |
Carry out a task | Agents | done, proposed, not_possible |
Agents |
case.process |
Update cases | Agents | none (next) |
Agents |
The block object.read (Read an object) still exists in older workflows and keeps working there, but you can no longer add it. Read the content of what an event refers to directly as a content field, for example {{trigger.recording.transcript}} (see Triggers and events).
The kinds
The editor draws each kind in its own colour and groups the Add step menu by it.
| Kind (label) | What it does |
|---|---|
| Fetch | Reads or looks up data and changes nothing. |
| AI | aishaa works with AI on what the run knows. |
| Work on | Reworks a value without AI: dates, numbers, text. |
| Do | Changes something: a message, a document, an action in a connected system, the conversation itself. |
| Decide | Chooses how the run continues. |
| Repeat | Repeats steps for each item of a list. |
| Wait | Holds the run until a moment. |
| A person | Puts work with a colleague: a question, a task. |
| Agents | An AI agent writes, chooses or carries out a task. |
In the editor, agent.reply, agent.choose and agent.task are one agent step with a choice under Task. Switching keeps the agent and the task. In the definition they remain three blocks, because their exits differ.
Exits or “Then”
- A block with exits continues per exit (
exits). In the editor there is a choice If exit for each exit. - A block without exits continues with
next(in the editor Then). - Never both. An exit that leads nowhere, or a step without
next, ends the run (in the editor End). - Every step can also have
onError(in the editor If this fails): the step the run goes to if this block fails.
Everything about routing is in References, routing, repeating and choosing.
Propose or do at once (mode)
Three blocks do something the outside world notices. They have the input mode:
| Block | propose (default) |
execute |
|---|---|---|
plugin.action |
Propose to a person: a colleague approves, edits or rejects; the step waits. | Execute at once, in the name of the workflow. |
message.send |
A colleague reads and sends it; the step waits. | Send at once, under the name of the organisation with its automatic signature. |
ticket.forward |
A colleague checks and sends it; the step waits. | Send at once, under the name of the organisation. |
agent.reply has no mode but send: there, the trust a person gave the agent per topic decides whether a reply may go out by itself (see Agents).
A proposal lands in To do and on the ticket. Leave a step on propose until the organisation trusts the workflow. If the proposals of the same step have been sent or carried out unchanged 10 times in a row, aishaa offers Do this itself from now on on the ticket to whoever may change workflows. An edit, a rejection or an expired proposal resets that count, and so does a new version in which the step does something different. After confirmation, aishaa publishes the live version again with only that step on execute. This is only possible for ticket.forward, message.send and plugin.action, and not while the draft of the workflow has other changes.
For whom (assignee) and deadline
Blocks that put work with a person (human.request, task.create, and in propose also plugin.action, message.send and ticket.forward) have an assignee (in the editor For) and usually a deadline.
assigneeis the user id of a colleague who may handle tickets of the workflow’s organisation, or a reference to the colleague the event mentions, such as{{trigger.recordedByUserId}}.- If you leave out
assignee, the work is for everyone who may pick it up. - If the workflow names a fixed colleague who may not handle the organisation’s tickets, the step fails.
- If the reference from the event is a person who does not handle tickets, the work goes to everyone instead of failing.
deadlineMinutes(Deadline (minutes)): 7 days by default, at most 30 days (43,200 minutes), greater than 0. After the deadline, the request or proposal expires and the step continues viaexpired.task.createhasdueMinutes(Due in (minutes)) instead, at most 365 days; the run does not wait for a task.
Input types in the editor
Every input has a type. It determines which input field the editor shows and what you write in the definition.
| Type | In the definition |
|---|---|
| Text | One line of text; may contain references. |
| LongText | Several lines of text; may contain references. |
| Number | A number, or a reference. |
| Boolean | true or false. |
| Choice | One of the block’s fixed choice values; the first one is the default. |
| User | The user id of a colleague (a number), or a reference. |
| Answers | A list of answer ids (the exits of a request to a person). |
| AnswerLabels | An object from answer id to the text on the button. |
| Cases | A list of values that are each an exit of their own. |
| CaseNotes | A short explanation per value from the list. |
| CaseLabels | The id of a label per value from the list. |
| Conditions | A list of conditions, like those of the trigger. |
| PluginAction | A plugin action as pluginId/operationId. |
| PluginRead | A read operation of a plugin as pluginId/operationId. |
| RecordKind | A kind of record (a record group such as order or dossier). |
| RecordRead | A read operation on a record as pluginId/operationId. |
| Moment | A moment in ISO 8601, or a reference. |
| Json | A JSON object (a schema, parameters, what you show); values may be references. |
| Agent | The id of an AI agent of the account, or leave it out. |
| Label | The id of a label of the account. |
| SupportGroup | The id of a team. |
Which plugin actions, read operations, record kinds, agents, labels, teams and colleagues an organisation has differs per organisation. The editor only shows what exists; an AI assistant fetches it with workflows_get_guide (see The workflow definition).
A new step does not start empty
Some blocks start in the editor with a value already filled in, so the step works almost straight away:
| Block | Starts with |
|---|---|
human.request |
{"exits": ["approve", "reject"]} |
plugin.action, message.send, ticket.forward |
{"mode": "propose"} |
ai.transform |
{"output": {"type": "object", "properties": {"text": {"type": "string"}}}} |
agent.choose, agent.task |
{"input": "{{trigger.message.text}}"} |
plugin.read |
{"input": {}} |
data.format |
{"operation": "add_time", "unit": "days", "amount": 3} |
Good to know
- The technical name of a block never changes; it is stored in saved workflows.
- A step may have a
label(in the editor What this step does), at most 120 characters: what the step does for this organisation. People read the workflow by those labels. - A workflow has at most 100 steps. A run stops after 2,500 executed steps.
- Blocks that need a conversation (
message.send,ticket.label,ticket.update,ticket.forward) fail or go viafailedin a run that is not about a conversation, such as a run onschedule.dueorrecording.transcribedwithout a ticket.
