Run Ai Automation
run_ai_automationTrigger a saved AI automation to run once, executing its stored prompt with only its allowed tools and posting the answer to its configured destination or a specific incident.
Instructions
Run an existing AI automation now, once. The run executes that automation's saved prompt with only the tools in its allowed_tool_keys, and posts the answer to its configured destination; it cannot run arbitrary instructions. Pass incident_id to run it against an incident, or run_id to re-run a previous run. Returns the run; poll get_ai_automation_run for its status and output. An AI automation is a saved instruction (prompt) that a Rootly AI agent runs on a schedule, on a matching event (incident, alert, Slack message, webhook) or on demand. When it runs, the agent may only use the tools listed in the automation's allowed_tool_keys (all team-allowed tools when null), and it posts its answer to the configured destination (a Slack channel or the incident timeline), or nowhere when destination_kind is none.
Requires OAuth scope ai.automations:write. For run-now requests with incident_id, or run_id of an incident-linked run, OAuth tokens also need the ir.incidents:read scope; API keys use the key's role. Limited to 30 requests per credential per minute (fixed one-minute windows), separate from the default mutation rate limit; exceeding it returns 429 with Retry-After.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ai_automation_id": "<ai_automation_id>",
"data": "<data>"
},
"name": "run_ai_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| ai_automation_id | Yes | Required. ID of the ai automation (fills `{ai_automation_id}` in /v1/ai/automations/{ai_automation_id}/runs). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||