Save Item
cockpit.save_item
ActionBusiness appsconnection required
Calls the Cockpit API with the connection's credentials.
Create a content item, or update one by including its _id.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Cockpit
- Secret shape
- the API key, or {"api_key": "…"}
- Config it needs
- base_url, locale
- Resolved by
- config.connection_id, else node.connection_id
Configuration
2 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
model Name of the Cockpit model to work with, as it appears in the admin UI. | string | Yes | — | — | posts |
data The item's field values. Include an _id to update that item; leave it out to create a new one. | object | Yes | — | ≥ 1 characters | {"content":"Lorem ipsum...","title":"Hello World!"} |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"data": {
"content": "Lorem ipsum...",
"title": "Hello World!"
},
"model": "posts"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
model The model that was written to. | string | — |
item The saved item as Cockpit stored it. | object | — |
id The saved item's _id. | string | — |
created True when the payload carried no _id, so a new item was created. | boolean | — |
{
"created": false,
"id": "",
"item": {},
"model": ""
}Related Cockpit nodes
See Save Item run in a workflow.
In a technical demo we add the Cockpit connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.