Workflows
A member sees a workflow when it is shared with the workspace, when the member owns it, or when it is shared with the member or a department. A member who may edit every agent sees all of them. A call that changes a workflow returns403 with You cannot change this workflow. when the role does not allow it.
Create a workflow
201. It carries id, name, slug, description, graph, is_active,
trigger_signal, version, summary, starts, steps, owner_id, can_edit, sharing, problems and the
times. A new workflow is off.
nameis required, up to 255 characters.graphis required on create.- A
graphhasnodesandedges. A node hasid,type,dataand an optionalposition. An edge hassource,targetand an optionalsourceHandle. - The graph has one
triggerstep. Itsonissignal,scheduleormanual. The step types, the settings of each one and the signals you can start on come fromGET /api/v1/workflows/palette. The signal names are the event types. - A changed graph is saved as the next numbered version.
is_activemust betrueorfalse. A workflow with problems cannot be switched on. The call returns400withdetailand a list ofproblems, each{node_id, message}.
Run a workflow
input (an object), agent_id and test. A live run needs the workflow on: otherwise the call
returns 409 with This workflow is switched off. A workflow with problems returns 400. The reply is the run, with
status 201.
Runs
A run has
id, workflow, workflow_name, version, agent_id, test, status, current_node_id,
step_count, wake_at, wait_kind, resolution and last_error. A test run belongs to the person who started it.
Stopping a run that already ended returns 409. decide returns 409 when the run does not wait for an approval,
and only the person the card names can answer it.
Tasks
A task has a title, notes, an assignee (a person or an agent), a due time, a reminder, a priority, a status, a board stage, a list, labels, a checklist and links to a conversation, a contact or an app record.repeated_from, source, created_by, completed_at, created_at and updated_at.
The request takes title, notes, assignee, due_at, remind_at, priority (low, normal or high),
status, stage_id, list_id, labels, checklist, repeat (empty, daily, weekdays, weekly or monthly), case_id, contact_id and record
({app, entity, record_id}). assignee is me, a member id or agent:<id>. Without it, the task is yours. Times
need an offset. A task status is open, in_progress, done or cancelled.
The task list takes these filters:
assignee (me, none, all, a member id or agent:<id>), status (also
active and all), due (today, overdue or week), case, contact, list, stage, label, priority,
source (agents or people), record (app:entity:id), q and offset. The reply is
{"results": [...], "enabled": true, "next_offset": 50}. Send next_offset as offset for the next page. A page holds
50 tasks.
POST /api/v1/tasks/bulk takes {"ids": [...], "action": "...", "value": ...} with up to 200 ids. The action is
complete, reopen, cancel, archive, assign, due, priority, stage, list, label_add or
label_remove. The reply is {"updated": n, "results": [...]}.
Stages and lists can be created, ordered and removed by owners and admins. A stage has a kind of todo, doing or
done.
App records
An app keeps its own records in entities. These calls read and write them for any installed app.
The page reply is
{results, count, page, page_size, pages}. The page size is 20 unless you ask for another from 1 to
100. Read the entities and fields of an app from GET /api/v1/apps/{slug}. A record that does not exist returns
404 with There is no such record.
ImpelLabs raises record.created, record.updated and record.status_changed when records change. A workflow or a
webhook can start on them. See event types.