---
title: "Get automation details"
method: GET
path: "/v1/comment-automations/{automationId}"
tags: ["Comment Automations"]
---

# Get automation details

`GET /v1/comment-automations/{automationId}`

Returns an automation with its configuration, stats, and recent trigger logs.

## Path parameters

- `automationId` string, required

## Response `200`

Automation details with stats and recent trigger logs

- object
  - `success` boolean
  - `automation` object
    - `id` string
    - `name` string
    - `platform` string
    - `trigger` 'comment' | 'story_reply'
    - `accountId` string
    - `platformPostId` string
    - `postId` string
    - `postTitle` string
    - `keywords` string[]
    - `matchMode` 'exact' | 'contains' | 'word' — How a keyword is compared with the comment. 'contains' (default) matches anywhere, even inside another word (keyword 'app' fires on 'happy'). 'word' matches the keyword only as a standalone word. 'exact' requires the whole comment to be exactly the keyword.
    - `excludeKeywords` string[] — Comments containing one of these never trigger the automation, even when a trigger keyword also matches. Compared using the same matchMode.
    - `typoTolerance` boolean — Only with matchMode=word: also fire on close misspellings of a keyword (one edit for 4-7 character keywords, two from 8 up). Keywords shorter than 4 characters are never fuzzy-matched.
    - `dmMessage` string
    - `buttons` DmButton[] — Inline DM buttons (up to 3). Omitted when none are set.
      - `type` 'url' | 'postback' | 'phone', required
      - `title` string, required — Button label (20 chars max)
      - `url` string, uri — Target URL (required when type is url)
      - `payload` string — Postback payload delivered via the messaging_postbacks webhook (required when type is postback)
      - `phone` string — Phone number, e.g. +14155551234 (required when type is phone; Facebook only)
    - `template` CommentAutomationTemplate — A Meta generic template (product card) sent as the automation's first DM. It REPLACES the plain `dmMessage` bubble: a Meta message carries one body shape, and a comment gets exactly one private reply, so the card and the text cannot both be delivered. Put your selling copy in `subtitle`. Mutually exclusive with `buttons` (sending both is a 400). Works on both the `comment` and `story_reply` triggers. Up to 10 elements, rendered as a horizontally swipeable carousel. Rendering confirmed on the Instagram and Messenger mobile apps.
      - `type` 'generic', required
      - `elements` CommentAutomationTemplateElement[], required
        - `title` string, required — Card headline (80 chars max). Also used as the Inbox preview for the sent DM.
        - `subtitle` string — Card description, e.g. the price or a short pitch (80 chars max).
        - `imageUrl` string, uri — Publicly reachable http(s) image rendered large above the card.
        - `buttons` object[] — Up to 3 card buttons. A generic template has NO phone button, on either platform. `url` buttons are click-tracked when linkTracking is on.
          - `type` 'url' | 'postback', required
          - `title` string, required
          - `url` string, uri — Target URL (required when type is url)
          - `payload` string — Postback payload delivered via the messaging_postbacks webhook (required when type is postback)
    - `commentReply` string
    - `dmMessageVariations` string[] — Alternate DM texts rotated at random with dmMessage. Omitted when none.
    - `commentReplyVariations` string[] — Alternate public replies rotated at random with commentReply. Omitted when none.
    - `linkTracking` boolean
    - `clickTag` string
    - `dmDelaySeconds` integer — Seconds waited after the trigger before the DM is sent. Absent when the DM goes out immediately.
    - `commentReplyDelaySeconds` integer — Seconds waited before the public reply is posted. Absent when it follows the DM immediately.
    - `audience` CommentAutomationAudience — Who a comment automation answers. Instagram only - Meta exposes the follow relationship on no other platform, and only for people who have MESSAGED the account (a comment grants no consent). `whenUnknown` is therefore the important setting: it decides what happens for a first-time commenter.
      - `followerStatus` 'any' | 'follower' | 'non_follower'
      - `minFollowerCount` integer — Skip commenters with fewer followers than this. Omit for no size rule.
      - `whenUnknown` 'send' | 'skip' | 'verify' — What to do when Instagram will not reveal the follow relationship. * `send` (default) - deliver the DM anyway (fails open). * `skip` - stay silent. * `verify` - send `followGate.message` with a confirm button. Tapping it is a message, which grants consent, so the re-check on the tap resolves and the real DM (or `followGate.notFollowingMessage`) follows automatically.
    - `followGate` CommentAutomationFollowGate — Copy for the follow gate. Sensible defaults are used for any field left empty.
      - `message` string — Confirmation DM sent when whenUnknown=verify.
      - `buttonLabel` string — Confirm button label. Defaults to "I'm following".
      - `notFollowingMessage` string — Sent to a commenter we know does not follow (followerStatus=follower). Omit to stay silent on a keyword comment; a confirm tap always gets an answer.
    - `alsoMatchInDms` boolean — Whether these keywords also fire on a plain inbound DM.
    - `isActive` boolean
    - `stats` object
      - `totalTriggered` integer
      - `totalSent` integer
      - `totalFailed` integer
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
  - `logs` object[]
    - `id` string
    - `commentId` string
    - `commenterId` string
    - `commenterName` string
    - `commentText` string
    - `source` 'comment' | 'story_reply' | 'dm' — Which door triggered this send. Absent on rows written before this field existed (all of those are comment-triggered).
    - `status` 'pending' | 'sent' | 'failed' | 'skipped' | 'gated' — DM outcome. 'pending' = the automation has a dmDelaySeconds and the response is queued but not sent yet. 'gated' = the follow-gate confirmation DM went out and we are waiting for the tap; it flips to 'sent' or 'skipped' when they tap.
    - `audienceOutcome` 'passed' | 'blocked' | 'gate_sent' | 'gate_passed' | 'gate_failed' — How the audience rule resolved. Absent on automations without one.
    - `commenterIsFollower` boolean — Follow relationship at decision time. Absent when Instagram would not tell us (the commenter never messaged the account).
    - `commenterFollowerCount` integer
    - `error` string — DM error message if status is failed
    - `commentReplyStatus` 'sent' | 'failed' | 'skipped' — Outcome of the optional public reply on the triggering comment. 'skipped' if no commentReply was configured or if the DM failed (the public reply is not attempted in that case).
    - `commentReplyError` string — Public-reply error message if commentReplyStatus is failed
    - `nextDueAt` string, date-time — When the next queued send fires. Present only while something is still pending.
    - `createdAt` string, date-time

## Other responses

- `401` — Unauthorized
- `404` — Resource not found

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/revisions/f81ca70ea6b9/schema)
