> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levios.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose an automation trigger

> Examples for every public trigger and publication selector.

Replace only `configuration.trigger` with one example below. These are
configuration fragments, not complete create requests. IDs and URLs are
illustrative; use media belonging to the selected account.

## Comments: all publications

```json theme={null}
{
  "type": "comment",
  "publication": {
    "mode": "all"
  },
  "keywords": {
    "mode": "specific",
    "match_mode": "whole_word",
    "values": [
      "guide"
    ]
  }
}
```

`whole_word` matches an isolated word or phrase inside longer text. It does not
require the whole comment to equal the keyword. `substring` also matches within
words. Use `mode: "any"` to accept any comment.

## Comments: next publication

```json theme={null}
{
  "type": "comment",
  "publication": {
    "mode": "next_published"
  },
  "keywords": {
    "mode": "any"
  }
}
```

## Comments: one publication

```json theme={null}
{
  "type": "comment",
  "publication": {
    "mode": "specific",
    "reference": {
      "type": "url",
      "value": "https://www.instagram.com/p/ABC123/"
    }
  },
  "keywords": {
    "mode": "any"
  }
}
```

The reference accepts `type: "id"` with a discovered media ID, or `type: "url"`
with an HTTPS Instagram publication URL under `/p/` or `/reel/`.

## Story text replies

```json theme={null}
{
  "type": "story_reply",
  "response_type": "text",
  "story": {
    "mode": "any"
  },
  "keywords": {
    "mode": "specific",
    "match_mode": "substring",
    "values": [
      "guide"
    ]
  }
}
```

Story selectors accept `mode: "any"` or `mode: "specific"` with an ID reference.
Story URLs are not accepted. Text replies support both keyword modes.

## Story reactions

```json theme={null}
{
  "type": "story_reply",
  "response_type": "reaction",
  "story": {
    "mode": "specific",
    "reference": {
      "type": "id",
      "value": "18000000000000001"
    }
  },
  "reactions": {
    "mode": "specific",
    "emojis": [
      "❤️",
      "🔥"
    ]
  }
}
```

Use `reactions: {"mode":"any"}` for any reaction. A specific list has 1 to 50
distinct emojis; each must be one emoji grapheme, at most 16 Unicode scalars,
without whitespace. Camera reaction controls are not supported emoji values.

## Direct-message keywords

```json theme={null}
{
  "type": "dm_keyword",
  "keywords": {
    "mode": "specific",
    "match_mode": "whole_word",
    "values": [
      "guide"
    ]
  }
}
```

This trigger requires specific keywords. An unrestricted incoming-DM trigger
cannot be authored through this contract.

## Story mentions

```json theme={null}
{
  "type": "story_mention"
}
```

Do not add keyword or publication selectors to a story mention. For all
non-comment triggers, set `opening.public_reply` to `{"enabled":false}`.

## Shared validation rules

Specific keyword lists contain 1 to 50 values, each 1 to 100 Unicode scalars.
Remove surrounding whitespace and normalized duplicates. Discovery IDs contain 1
to 256 printable ASCII characters. Unknown fields are rejected. Response-only
legacy trigger types do not become creatable merely because they appear in a
read response.
