# update_automation (/docs/mcp/tools/update-automation)

{/* Generated by scripts/sync-mcp-tools.mjs from happierleads-api. Do not edit: change src/routes/mcp/toolDocs.json there, or add content/mcp-notes/update_automation.mdx. */}

**Update automation** · Changes data · Acts outside your account

Changes an existing automation: its name, rule, action settings or on/off state. Fields you leave out keep their current values, but a new actions object replaces all of the saved action settings. To only switch it on or off, use toggle_automation. Get automationId from list_automations, and read the current setup with get_automation first. Changes apply to every future matching lead, and an active LinkedIn campaign automation enrolls matching leads when saved. Confirm with the user when it changes where leads are sent. Returns the updated automation.

| Connection | Account URL, team member URL or OAuth |
| --- | --- |

## Parameters [#parameters]

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `automationId` | `string` | Yes | Automation _id from list_automations. |
| `name` | `string` | No | New name. |
| `trigger` | `object` | No | Rule fields to change: when, then, trigger, interval, repeatWindowHours, dedupeScope (same values as create_automation). Other keys are ignored here. |
| `actions` | `any[]` | No | The action settings object, e.g. \{ "sentToSlack": \{ "sendMessagesTo": "#leads" \} \}. Replaces all saved action settings. |
| `enabled` | `boolean` | No | true to activate, false to deactivate. |

## Tool definition [#tool-definition]

What your assistant receives from `tools/list`:

```json
{
  "name": "update_automation",
  "title": "Update automation",
  "annotations": {
    "title": "Update automation",
    "readOnlyHint": false,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": true
  },
  "inputSchema": {
    "type": "object",
    "properties": {
      "automationId": {
        "type": "string",
        "description": "Automation _id from list_automations."
      },
      "name": {
        "type": "string",
        "description": "New name."
      },
      "trigger": {
        "type": "object",
        "description": "Rule fields to change: when, then, trigger, interval, repeatWindowHours, dedupeScope (same values as create_automation). Other keys are ignored here."
      },
      "actions": {
        "type": "array",
        "description": "The action settings object, e.g. { \"sentToSlack\": { \"sendMessagesTo\": \"#leads\" } }. Replaces all saved action settings."
      },
      "enabled": {
        "type": "boolean",
        "description": "true to activate, false to deactivate."
      }
    },
    "required": [
      "automationId"
    ]
  }
}
```
