create_automation
Create an automation as a graph. An active rule runs on its own, as the user, whenever a trigger fires: each run costs 2 credits plus what its steps use, and its steps may add contacts to campaigns (which then email and message them from the user's connected accounts), post to Slack, enrich or validate contacts and find contacts through outside data providers, scrape web pages, run smart columns, create tasks and add records to lists. Steps and triggers that choose their operation only when the rule runs (mcp_call, composio_call, agent_step and run_code steps, and composio_event triggers) are refused here and nothing is saved; rules that need them are built in the FuseAI app. Body: name, summary (one plain sentence), triggers [{nodeKey, label (2-5 words), description (one short sentence on what starts this rule), attributes}] (min 1, any one fires the rule), steps [{stepId, nodeKey, label (2-5 words), description, dependsOn [stepIds], match ('is'|'is_not', gates only), forEach ('{{steps..output.}}' to run per item), attributes}] (min 1), status (draft|active|paused; omitted = draft — pass 'draft' for a rule the user has not yet activated, 'active' only on their explicit confirmation), optional expiresAt, sourcePrompt (the user's request) and compilerNotes. Attribute values may be literals or bindings: {{trigger.}} (ONLY fields in the trigger node's outputSchema: contactId or companyId, occurredAt, attributes., meta.; a name, email or LinkedIn URL is not on the event), {{steps..output.}}, {{item}} / {{item.}} inside a forEach. A binding to a field the trigger event does not carry is rejected at save with the fields it does carry. A step below a forEach step already runs once per item: never repeat that forEach on it (FOR_EACH_REPEATED at save), and a step that must run ONCE after a fan-out (a digest) depends on the array's producer, never on the per-item step (FAN_OUT_DEPENDENT_WITHOUT_ITEM_DATA when it uses no per-item data). A gate's path need not be in outputSchema.required; a missing value reads as false. Contact- and company-scoped condition/action nodes take the record from the trigger event when the trigger is about that entity; in any other rule (schedule, scrape, the other entity) bind their contactId / companyId attribute from an earlier step's output, or the save is rejected. nodeKeys and per-node attributes MUST come from list_automation_nodes; id-valued attributes (campaign, list, ICP, signal, email account) must be resolved with the corresponding list tools first.
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": {
"name": "<name>",
"triggers": "<triggers>",
"steps": "<steps>"
},
"name": "create_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| steps | Yes | ||
| status | No | ||
| summary | No | ||
| triggers | Yes | ||
| expiresAt | No | ||
| sourcePrompt | No | ||
| compilerNotes | No |