Use this guide when you created an agent from the Agents hub and want Slack channels or threads to run that agent automatically. AptlyStar wires a Slack trigger block to your Agent block, stores conversation memory per thread, and ensures the agent can send messages back to Slack.
For canvas-only workflows (no Agents product), the underlying trigger is the same — see Slack triggers and the Slack block setup wizard on the canvas.
Prerequisites
- A workspace where you can create agents and deploy workflows
- Permission to create a Slack app in your Slack workspace (or approval from an admin)
- An agent with instructions and tools configured (at minimum, the agent should be able to answer the kinds of messages you expect in Slack)
How it works
Slack event → AptlyStar webhook → Agent workflow run
→ conversation memory key: slack:{team}:{channel}:{thread}
→ Agent block (user message from Slack)
→ optional tool calls (e.g. slack send message)
→ reply posted to Slack when the model uses the send toolEach thread (or top-level message timestamp) gets its own conversation id so multi-turn Slack threads stay coherent.
Setup
Go to Agents in the workspace sidebar. Create an agent or open an existing one. Confirm Settings has the persona, model, and tools you need.
Deploy is required before Slack can call your webhook — you will deploy in a later step.
Open the agent → Channels → Slack.
Enter:
| Field | Required | Purpose |
|---|---|---|
| Signing secret | Yes | Verifies requests from Slack (Basic Information → App Credentials) |
| Bot token | Recommended | xoxb-… so the agent can post replies and read file attachments |
| Include file attachments | No | Downloads files from messages; needs bot token with files:read |
Click Enable Slack. AptlyStar adds a Slack trigger block on the workflow graph, connects it to the Agent block, turns on conversation memory, and adds the Slack send tool if it was missing.
On the Channels tab, use Deploy workflow in the Web chat section if needed, then configure and Launch Chat in the same panel (no need to open the canvas deploy sheet).
Until the workflow is deployed, the webhook URL is not active.
After deploy, the Channels tab shows your webhook URL (format: {APP_URL}/api/webhooks/trigger/{path}).
In the Slack API → your app → Event Subscriptions:
- Turn Enable Events on
- Paste the Request URL from AptlyStar
- Wait for Slack to verify the URL (the endpoint must be reachable and the signing secret must match)
Subscribe to the bot events your use case needs, for example:
| Event | Use when |
|---|---|
app_mention | Users @-mention the bot in a channel |
message.im | Direct messages to the bot |
message.channels | Messages in public channels the bot joined |
message.groups | Messages in private channels the bot joined |
message.mpim | Group DMs |
Under OAuth & Permissions, install the app to the workspace with scopes that match your events (e.g. chat:write for replies, channels:history for public channel messages). The canvas Slack setup wizard on the trigger block can generate a manifest with the right scopes if you prefer that flow.
Invite the bot to the channel you use for testing. Send a message or @-mention the bot.
Check Overview → View runs (logs filtered to this agent) to confirm a run started. A successful reply means the agent run completed and the Slack send message tool executed with your bot token.
Credentials and security
- Signing secret — Required. AptlyStar rejects webhooks that fail Slack signature verification.
- Bot token — Stored on the Slack trigger block (same as canvas workflows). Use a bot token dedicated to this agent; rotate it in Slack if compromised.
- Webhook URL — Treat it as sensitive; only paste it into your Slack app’s Event Subscriptions.
Do not commit signing secrets or bot tokens to source control. Enter them only in the Agents Channels UI or the canvas trigger block.
Conversation memory
When Slack is enabled, AptlyStar sets the Agent block to conversation memory and assigns a stable id:
slack:{team_id}:{channel_id}:{thread_ts_or_message_ts}Replies in the same Slack thread reuse the same memory key. New threads start a new conversation from the model’s perspective.
Replies
Enabling Slack automatically ensures the Slack send operation is on the agent’s tool list. The model must call that tool to post back to a channel; there is no separate “auto-reply” step outside the agent run.
If users see runs in logs but nothing in Slack:
- Confirm a bot token with
chat:writewas saved - Confirm the bot is in the target channel
- Review the run trace for failed
slack_*tool calls or missing channel id
Orchestrator agents
Agents in orchestrator mode still use the same Slack ingress. The parent run receives the Slack message; delegated sub-sessions are separate executions (see agent Settings → orchestrator limits). For simple “message in, reply in thread” setups, focused mode is usually enough.
Troubleshooting
| Symptom | What to check |
|---|---|
| URL verification fails | Workflow deployed, signing secret matches Slack app, NEXT_PUBLIC_APP_URL / public URL correct |
| Events received but no runs | Bot events subscribed, bot invited to channel, event type matches (e.g. app_mention vs plain message) |
| Runs succeed, no Slack reply | Bot token present, chat:write scope, send tool on agent, channel id in tool args |
| Wrong thread context | Thread ts in event; memory key uses thread_ts when present |
| File content missing | Enable Include file attachments and files:read on the bot token |
Advanced: canvas and custom graphs
- Open canvas from the Channels tab to edit the Slack trigger block, add steps after the Agent block, or use the Slack setup wizard sub-block for manifest generation.
- Output shape of the trigger matches Slack webhook trigger (
event.text,event.channel, etc.).
Related
- Product agents overview
- Slack tools — all send/read/update operations
- Slack triggers — trigger output reference