chat.* events — the same event keys Discord and Telegram use. A trigger scopes itself to one Slack workspace with connection:, and (when the agent listens on more than one chat provider) discriminates with a where filter on $.chat.provider. This page covers the Slack-specific behavior: how mentions address an agent, thread semantics, and the payload fields you can template and filter on.
Event keys
Trigger
event strings are not validated against a closed catalog — a misspelled key applies cleanly and never fires — so copy the keys above exactly.
Scoping to a workspace
connection: on the trigger names the Slack connection (the workspace grant). It may be omitted only when the project has exactly one active chat connection across Slack, Discord, and Telegram; with zero or several, apply fails with an error asking you to set trigger.connection. Add optional: true to let apply silently skip the trigger while the connection does not exist yet — it activates on the next apply once the connection is set up. See connections and identities.
How mentions address an agent
Two mention forms produce an addressedchat.message.mentioned event for a specific agent:
- The agent’s own bot user — when the agent has a Slack identity,
@AgentNamementions its dedicated bot user directly. - The Auto app with an alias prefix — mention the shared Auto app and address an agent by alias token:
@auto.<alias>, where<alias>is the agent’s identityusername(falling back to the agent name), matched case-insensitively. The delimiter may be.,:,/, or-.
@auto-dot-sh[bot] in a deploy notice) is downgraded to chat.message.channel with message.isMention cleared, and does not subscribe the thread.
An addressed mention is delivered only to the mentioned agent — it does not fan out to other agents subscribed to the same thread. A message that mentions several agents produces one addressed copy per agent. When a mention addresses an Auto agent, the thread is subscribed, so later replies arrive as chat.message.subscribed.
Payload
Triggermessage templates, initialPrompt, and where filters all read the same normalized payload. chat.message.channel, .direct, .mentioned, and .subscribed share this shape:
object
Event envelope:
provider ("slack" here), kind (the message kind), threadId (canonical thread id — the thread root), channelId, isDirectMessage, and messageId (the Slack message timestamp).object
The message itself:
text, author (Slack-shaped object; author.userName and author.isMe are the commonly used fields), isMention, dateSent (ISO 8601), attachments, and links.object
Auto’s own metadata:
mentioned (an agent was addressed), contextual (thread-participation context rather than an explicit mention), authored (an Auto session or agent bot wrote this message — filter it out to avoid echo loops), context.kind (explicit_mention or thread_participation), attribution / attributions (the session(s) already attached to this thread, each { sessionId, agentName }), and on addressed events agent (the mentioned agent identity, with addressing.kind one of slack_auto_prefix, slack_bot_user, discord_app_alias).object
The raw Slack event, for anything the normalized fields do not carry.
chat.message.edited
Same envelope with chat.kind: "edited", plus message.previousText (when Slack supplies it) and message.editedAt. message.isMention and auto.mentioned are always false — edits never address agents and never spawn sessions. Route edits with deliver + attributedSessions so the session already holding the conversation sees the correction.
chat.reaction.added / chat.reaction.removed
object
provider, threadId, channelId, and messageId — the id of the message that was reacted to.object
added (boolean), emojiName (canonical name, e.g. thumbsup), rawEmoji (as Slack sent it), emoji (rendered character when resolvable), and user (the reacting user; user.isMe marks the connection’s own reactions).object
The reacted-to message when available, including
author — filter $.message.author.isMe: true to react only to reactions on the agent’s own messages.Template placeholders
Placeholders render{{dot.path}} tokens against the payload above — see variables and templating. The ones you will use most:
payload. — apply rejects it.
Filters
The full filter grammar lives in the triggers reference. Filters that matter on Slack events:
When a spawn trigger and an
attributedSessions deliver trigger listen on the same event key, apply requires them to carry the mutually exclusive $.auto.attributions filters shown above — otherwise one message would both spawn a new session and deliver into the old one.
Threads and routing
Every Slack message and reaction carries a thread-level routing target: the pair (workspace connection,chat.threadId) canonicalizes to a slack.thread binding target at ingest. That gives you three routing patterns:
spawn— start a fresh session per conversation. Addbind: { target: slack.thread }so the new session owns the thread and laterbind-routed events resolve back to it.deliver+routeBy: { kind: attributedSessions }— the standard follow-up route: thread replies, edits, and reactions flow to the session(s) already attributed to the thread.bindwithtarget: slack.thread— resolve the event to the one session bound to its thread;onUnmatched(defaultdrop) decides what happens when no session holds it.
bindings: { slack.thread: { bind: onMention } }— after the router delivers an addressedchat.message.mentionedevent, the delivered session is automatically bound to the thread. Only addressed mentions auto-bind; DMs, subscribed messages, and reactions never do.- Spawned mention sessions claim their thread attribution in the session-creation transaction, so the follow-up deliver route works without any tool call from the agent.
Example: a channel assistant
A complete agent that answers mentions, keeps each conversation in its Slack thread, and receives follow-ups in the same session. Adapted from the chat assistant example..auto/agents/assistant.yaml
See also
- Triggers reference — routing kinds, filter grammar, fallback triggers
- Telegram events — the same
chat.*contract on Telegram - Chat tools — how a session replies, reads history, and reacts