Set a specific built flow to run automatically on a cadence — the deterministic counterpart to a routine. Each run executes the flow's latest PUBLISHED revision with the fixed `input` envelope and routes the output per `delivery`. USE THIS when the user wants a flow they've built to run on a schedule ("run my digest flow every morning"). Do NOT create a routine for this — a routine runs a free-form instruction, not a built flow. The schedule runs the PUBLISHED flow, so the flow must be published (check workbench_flows_revisions_list; publish with workbench_flows_publish if it isn't). `input` is fixed for every run, so the flow itself should fetch anything time-varying at run time. Manage existing schedules with workbench_flows_schedules_list / workbench_flows_schedules_update.
View input schema
{
"type": "object",
"properties": {
"flowId": {
"type": "string",
"description": "Flow to schedule (id from workbench_flows_list)."
},
"label": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"scheduleTime": {
"anyOf": [
{
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
{
"type": "null"
}
]
},
"scheduleTimezone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"scheduleDayOfWeek": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 6
},
{
"type": "null"
}
]
},
"recurrence": {
"description": "When it runs, like a calendar event repeats; use it for anything beyond a plain hourly/daily/weekly at one time (then omit interval). {\"freq\":\"hourly\"|\"daily\"|\"weekly\"|\"monthly\"|\"yearly\",\"every\":N,\"times\":[\"HH:MM\"],\"weekdays\":[0=Sun…6=Sat],\"monthDays\":[1…31,-1=last],\"nthWeekdays\":[{\"nth\":1…5|-1,\"weekdays\":[…]}],\"months\":[1…12],\"minutes\":[…],\"hours\":{\"from\",\"to\"},\"timezone\":\"<IANA>\",\"starts\",\"ends\",\"skip\":[\"YYYY-MM-DD\"]}. Examples: weekdays at 8 → {\"freq\":\"weekly\",\"weekdays\":[1,2,3,4,5],\"times\":[\"08:00\"],\"timezone\":\"America/Chicago\"}; the last business day of the month → {\"freq\":\"monthly\",\"nthWeekdays\":[{\"nth\":-1,\"weekdays\":[1,2,3,4,5]}],\"timezone\":\"…\"}; every other Friday → {\"freq\":\"weekly\",\"every\":2,\"weekdays\":[5],\"starts\":\"<a Friday>\",\"timezone\":\"…\"}. null clears it.",
"anyOf": [
{
"type": "object",
"properties": {
"freq": {
"type": "string",
"enum": [
"hourly",
"daily",
"weekly",
"monthly",
"yearly"
]
},
"every": {
"default": 1,
"type": "integer",
"minimum": 1,
"maximum": 366
},
"times": {
"minItems": 1,
"maxItems": 24,
"type": "array",
"items": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
}
},
"minutes": {
"minItems": 1,
"maxItems": 12,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 59
}
},
"hours": {
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"to": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
}
},
"required": [
"from",
"to"
]
},
"weekdays": {
"minItems": 1,
"maxItems": 7,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
}
},
"monthDays": {
"minItems": 1,
"maxItems": 31,
"type": "array",
"items": {
"type": "integer",
"minimum": -1,
"maximum": 31
}
},
"nthWeekdays": {
"minItems": 1,
"maxItems": 5,
"type": "array",
"items": {
"type": "object",
"properties": {
"nth": {
"type": "integer",
"minimum": -1,
"maximum": 5
},
"weekdays": {
"minItems": 1,
"maxItems": 7,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
}
}
},
"required": [
"nth",
"weekdays"
]
}
},
"months": {
"minItems": 1,
"maxItems": 12,
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 12
}
},
"timezone": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"starts": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"ends": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"skip": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
}
},
"required": [
"freq",
"timezone"
]
},
{
"type": "null"
}
]
},
"delivery": {
"type": "string",
"enum": [
"history",
"notification",
"email"
]
},
"interval": {
"description": "Plain cadence: hourly, daily, or weekly. Omit when passing recurrence.",
"type": "string",
"enum": [
"hourly",
"daily",
"weekly"
]
},
"input": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "chat"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "null"
}
]
},
"tool_calls": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"function": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"arguments": {}
},
"additionalProperties": {}
}
},
"additionalProperties": {}
}
},
"tool_call_id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"role"
],
"additionalProperties": {}
}
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"kind",
"messages"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "form"
},
"values": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"kind",
"values"
]
}
],
"description": "Fixed input envelope every run executes with — {\"kind\":\"chat\",\"messages\":[…]} or {\"kind\":\"form\",\"values\":{…}}, the same shape workbench_flows_run takes. Constant across runs."
},
"workspace": {
"description": "Workspace slug. Personal tokens with no default workspace MUST pass this. Ignored for workspace API keys.",
"type": "string"
},
"approvalId": {
"description": "Approval id from a prior needs_confirmation response. Omit on the first call.",
"type": "string"
}
},
"required": [
"flowId",
"input"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}