Schedule a Workbench flow
workbench_flows_scheduleSet 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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Fixed input envelope every run executes with — {"kind":"chat","messages":[…]} or {"kind":"form","values":{…}}, the same shape workbench_flows_run takes. Constant across runs. | |
| label | No | ||
| flowId | Yes | Flow to schedule (id from workbench_flows_list). | |
| delivery | No | ||
| interval | No | Plain cadence: hourly, daily, or weekly. Omit when passing recurrence. | |
| workspace | No | Workspace slug. Personal tokens with no default workspace MUST pass this. Ignored for workspace API keys. | |
| approvalId | No | Approval id from a prior needs_confirmation response. Omit on the first call. | |
| recurrence | No | 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. | |
| scheduleTime | No | ||
| scheduleTimezone | No | ||
| scheduleDayOfWeek | No |