Workflows: create
workflows_createCreates a draft neonloops workflow that automates a task, in one of two ways:
without description: an empty draft whose only step is a Start (id start-1), to build with workflows_edit;
with description, the task in plain words: a ready draft with a Start on the trigger you give (on demand, a schedule or an app event), an Agent that does the task and an End. The answer gives its id and revision, plus, for a description, a builder link, apps to connect and next steps. Like every write here it is marked destructive, yet it only adds: nothing is published, run or changed. Each call makes a new draft; workflows_edit changes one. Without project_id it uses the one project it can build in, is refused with a list when there are several, and needs new_project_name when there are none.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "workflows_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apps | No | With description only. Slugs of the apps involved, e.g. ["gmail"] (connectors_search finds a slug). An unknown slug refuses the call. Narrows the trigger search and lists what still needs connecting. | |
| name | No | The workflow's name. Defaults to the description's first line, or "Untitled workflow" without one. A name already used in the project gets a number. | |
| trigger | No | With description only. What starts it; omit it to run on demand ("manual"). {"when": "a new email arrives from a customer"} for an app event (the 'when …' part of the user's sentence; add "event", a trigger slug connectors_search returned for that sentence, to pick one of several), {"schedule": {"cron": "0 9 * * 1"}} for a time (5-field cron, in the workspace's timezone, UTC when it has none), or "manual". | |
| project_id | No | The project to build in. Omit it when this connection reaches exactly one project; with several, the call is refused with their names and ids. | |
| agent_tools | No | With description only. App action slugs the Agent may call, e.g. ["GMAIL_SEND_EMAIL"], each checked against the real catalogue (connectors_search with an app's toolkit lists them). Omit for an Agent without tools. | |
| description | No | The task in the user's own words, the whole task and not only its trigger. Given, the draft is built as Start, Agent and End, and this becomes the Agent's instructions. Omitted, the draft has only a Start step. | |
| new_project_name | No | For a workspace with no project yet: a project with this name is created first, and the workflow is built in it. Refused when a project is already in reach. Not with project_id. |