Automations
Create a personal scheduled automation from a Cortex conversation through one governed operation
action.automations.create creates a personal automation that runs on a schedule,
searches the web and posts one message to its owner's Cortex chat. Cortex calls it
for a person in a private chat, after that person approves a card. The person's
view of this is Create an automation from chat.
The operation is available only inside a live Cortex turn, run as a person, in that person's own personal workspace. A call from anywhere else is refused. Workflow Agents never get the tool, and an extension reaches the operation only while it runs for a Cortex turn.
const { automationId, schedule, status } = await platform.action.automations.create({
name: 'Daily political news digest',
instruction: "Summarise today's political news.",
schedule: { every: 'day', at: '08:00' },
tools: ['web_search'],
})| Operation | HTTP | What it does |
|---|---|---|
action.automations.create | POST /api/platform/v1/action/automations/create | Creates and deploys one personal automation. Needs workflows:write. The platform never retries the call for you. |
Input
| Field | Type | Meaning |
|---|---|---|
name | string, 1 to 80 characters | The automation's name. |
instruction | string, 1 to 500 characters | What the automation does on each run. |
schedule.every | day, weekday or week | How often it runs. Nothing runs more than once a day. |
schedule.at | HH:MM, 24-hour | The time of day, in the person's time zone. |
schedule.on | mon to sun | The day. Required for week, refused otherwise. |
tools | ["web_search"] | Exactly one tool. |
@scrydon/sdk/platform exports the bounds as AUTOMATION_NAME_MAX_CHARS,
AUTOMATION_INSTRUCTION_MAX_CHARS and AUTOMATION_TIME_PATTERN, so you can check
an input before you send it.
The input has no workspace, organization, user, cron expression, time zone or model. The platform takes the workspace and the person from the run, the time zone from the person's preferences (then the organization's, then UTC), and the model from the organization's default at each run. Unknown fields are refused.
Result
automationId, name, workspace (always personal), schedule (the compiled
cronExpression, the timeZone and a description such as every day at 08:00 (Europe/Brussels)), and status: created, or existing when the same approved
call is replayed and finds the automation it already made.
Errors
A refusal leads its message with a stable code you can match on.
| Code | Meaning |
|---|---|
PERSONAL_WORKSPACE_REQUIRED | The call did not run in the caller's own personal workspace. |
WEB_SEARCH_NOT_CONFIGURED | No Web Search extension is installed or enabled. An administrator fixes it in Settings → Platform → Extensions. |
DEFAULT_MODEL_NOT_CONFIGURED | The organization has no default model. An administrator sets one in Settings → Platform → Extensions → Models & defaults. |
INVALID_REQUEST | The input did not pass validation. |
A call that does not come from a Cortex turn, or does not run as a person, is
refused with FORBIDDEN.