# Add an automation to a live post

> Add one automation step to a post that is already live: repost, unrepost, delete, a plug reply after enough likes, or DMs to people who reply with a keyword. Call it only when the user asked for this in the conversation; never on your own initiative.

`queue.add_automation_step` · publish

- **MCP tool:** `queue_add_automation_step`. Catalog: reach it with `find_actions` and `run_write_action`, or turn on the full toolset.
- **REST:** `POST /v1/queue/add-automation-step`
- **CLI:** `xholic queue add-automation-step`
- **Scope:** `publish`
- **Plan:** Every plan, including the trial
- **Cost:** Free.
- **Rate limit bucket:** `write`

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `postId` | string ≤ 120 chars | Yes | Xholic scheduled post id, from get_queue. |
| `type` | "AUTO_REPOST" \\| "AUTO_UNREPOST" \\| "AUTO_DELETE" \\| "AUTO_PLUG" \\| "AUTO_DM_DISCOVERY" | Yes | The step. Each type takes only its own fields. |
| `delayMinutes` | integer 0–9007199254740991 | No | AUTO_REPOST, AUTO_UNREPOST, AUTO_DELETE: minutes after the post went live. |
| `viewsThreshold` | integer 1–9007199254740991 | No | AUTO_DELETE: delete only if the post has fewer views than this. |
| `likesThreshold` | integer 1–9007199254740991 | No | AUTO_PLUG: likes that trigger the plug reply. |
| `templateName` | string ≤ 60 chars | No | AUTO_PLUG: a short name for the plug. |
| `templateText` | string ≤ 4000 chars | No | AUTO_PLUG: the plug reply text. |
| `monitoringWindowMinutes` | integer 60–10080 | No | AUTO_PLUG: minutes after posting when watching for likes stops. |
| `replyKeyword` | string ≤ 40 chars | No | AUTO_DM_DISCOVERY: one word repliers type. |
| `requireRepost` | boolean | No | AUTO_DM_DISCOVERY: DM only people who also reposted. |
| `maxRecipients` | integer 1–100 | No | AUTO_DM_DISCOVERY: most DMs to send. |
| `messageTemplate` | string | No | AUTO_DM_DISCOVERY: the DM to send. |
| `account` | string ≤ 64 chars | No | X account to act on, as @handle. Leave it out to use the connection's default account. |
| `dryRun` | boolean | No | Return exactly what would happen without doing it. |
| `idempotencyKey` | string ≤ 200 chars | No | A unique key for this write. Repeating a call with the same key returns the first result instead of acting twice. |
