Workflow
Stored in the workflows collection. createdAt and updatedAt are maintained automatically.
Returned by DELETE /workflow, GET /workflow, POST /workflow, DELETE /workflow/:id, GET /workflow/:id, PUT /workflow/:id and 3 more.
Example
One real Workflow as returned by GET /workflow, taken from the data array. Recorded from a live response, so the defaults, denormalised snapshots and populated fields are the actual ones:
{
"_id": "6a957378859eafb47bf2280d",
"name": "Welcome new website leads",
"company": "6a9572df859eafb47bf225d7",
"triggerEventType": "lead.created",
"status": "draft",
"publishedVersion": 0,
"latestVersion": 1,
"publishedSnapshot": null,
"schedule": {
"minute": "*",
"hour": "*",
"dayOfMonth": "*",
"month": "*",
"dayOfWeek": "*"
},
"createdBy": {
"_id": "6a9572df859eafb47bf225d9",
"name": "Docs Test User",
"email": "test@test.test",
"status": "owner"
},
"updatedBy": {
"_id": "6a9572df859eafb47bf225d9",
"name": "Docs Test User",
"email": "test@test.test",
"status": "owner"
},
"createdAt": "2026-08-31T12:28:40.441Z",
"updatedAt": "2026-08-31T12:28:40.441Z",
"__v": 0,
"nodes": [],
"edges": []
}
:::note Trimmed for reading A populated reference is shown by the fields that identify it rather than in full — it arrives as the entire referenced document. Long arrays are cut to the first two entries and marked, long strings are truncated, and any field that could carry a credential is dropped rather than masked. :::
Fields
| Field | Type | Notes |
|---|---|---|
name | string | required |
normalizedName | string | |
activeName | string | |
company | ObjectId -> Company | required |
triggerEventType | string | |
status | string | default draft · one of draft, published, paused, archived |
publishedVersion | number | default 0 |
latestVersion | number | default 1 |
config | any | default {} |
publishedSnapshot | any | default null |
publishedAt | date | |
schedule.minute | string | default * |
schedule.hour | string | default * |
schedule.dayOfMonth | string | default * |
schedule.month | string | default * |
schedule.dayOfWeek | string | default * |
createdBy | ObjectId -> Member | |
updatedBy | ObjectId -> Member | |
_id | ObjectId | |
createdAt | date | set once |
updatedAt | date |