Before you begin
- The
reliantCLI, v1.21 or later, signed in (Sign in and tokens), and a Reliant project for the repository the workflow lives in. - The Slack integration connected to the workspace under Settings → Integrations.
- In an organization with other members: an organization AI account for the agent. See What this does not do.
1
Invite the bot to a channel
Run
/invite @Reliant in the channel the bot should answer in. Mentions only fire in conversations the bot is a member of. Copy the channel’s ID (such as C0123ABCD) from the bottom of its details; match: takes the ID, not the #name.2
Write the workflow
.reliant/workflows/slack-ask.yaml
inputs, so the nodes never read trigger.payload. thread_ts is the mention’s thread when it was posted inside one, and otherwise the mention itself, so the answer always lands in a thread. ack reacts with 👀 so the asker knows the question was picked up. automation_only: true keeps the workflow out of chat pickers, since it only makes sense with a mention.3
Check the thread mapping
reliant workflow eval runs a mapping against Slack’s declared app_mention payload, with your fields merged over it:terminal
"thread_ts":"" the same command prints the mention’s own ts.4
Test it with scenarios
A scenario fires the trigger with a payload and mocks the reaction, the agent and the reply:Set
.reliant/workflows/slack-ask/scenarios/mention_gets_an_answer_in_thread.yaml
thread_ts: "" for a top-level mention. The scenario’s payload is merged over a sample that fills every field, so leaving it out tests a mention inside a thread instead. Add a scenario for a mention in a thread and one where reply returns is_error: true, then run them:terminal
reliant workflow lint reports 0 lint error(s), 0 warning(s). Without the lint:allow comment it warns [action-error-unread] on ack, because nothing reads its is_error. Here a failed reaction shouldn’t stop the answer.5
Enable it with no machine
Commit the workflow. In the app, open Workflows → Library, open slack-ask, choose Enable, set Runs on to No machine and pick the Slack connection to listen through. From a terminal:The activation listens through your default Slack connection;
terminal
--connection slack=<connection-id> picks another (reliant integrations list --integration slack prints the ids). An event reaches it only through a connection to the workspace it came from.6
Mention the bot and verify the reply
Post The newest row should say
@Reliant what changed in Postgres 18 for async I/O? in the channel. The message should get a 👀 reaction, then a reply in its thread. Each mention is a firing:terminal
launched with a chat ID. Open that run under Workflows → Runs to see the agent’s research, or follow it with reliant workflow follow <chat-id>.What this does not do
- It doesn’t see the thread. The agent gets the mention’s text only. Slack’s
conversations.historyaction returns thread parents, not replies, so earlier messages in the thread aren’t available to it. Each mention is a separate run. - It answers mentions, not every message. A reply in the thread without
@Reliantstarts nothing. Messages from bots, Reliant’s own included, never fire, so the bot can’t trigger itself. - It doesn’t trust the question. Anyone in the channel can mention the bot with any text. The prompt labels the message as data and the agent has only web tools, but a message can still try to steer it. Don’t give this agent write tools or integration tools without an approval in front of them.
- In an organization with other members, runs spend only the organization’s AI accounts. Without one that can serve the model, the run starts, reacts, and pauses at
answer.
Troubleshooting
Mentions start no run
Mentions start no run
The bot must be a member of the channel, the channel’s ID must match
match: channel, and the automation must listen through a connection to that workspace. reliant trigger events lists nothing for a mention that never reached the trigger.Slack rejected the credential (token_revoked): reconnect Slack in Settings.
Slack rejected the credential (token_revoked): reconnect Slack in Settings.
A workspace admin removed or reinstalled the app. Reconnect Slack under Settings → Integrations. The run ends at
failed with this text.needs a machine (…), so it cannot run with no machine
needs a machine (…), so it cannot run with no machine
Something in the workflow needs a machine, such as an agent given the default tools. Keep
tools: ["tag:web"], or enable it on a machine.Next steps
Post a daily digest to Slack
Post on a schedule instead of answering mentions.
Start an agent from a webhook
Start the same kind of run from any service that can send a request.
Slack integration
Every Slack action, event and
match attribute.How automations fire
Event dedupe, filters, funding and no-machine runs.