Documentation
Connecting Civagent to Slack
Overview
- Link an existing Slack app to your Civagent agent.
- No code changes; just paste your Bot Token and Signing Secret.
- Works in public channels, private channels (where the bot is invited), and DMs.
What You’ll Need
- A Slack app with a Bot User and permissions to post messages.
- The Bot User OAuth Token (starts with
xoxb-). - The Signing Secret from the app’s Basic Information page.
- Access to your Civagent dashboard (Channels tab).
Step-by-Step Setup
-
Open Civagent Channels
In your agent’s dashboard, open Channels and choose Slack. -
Add Credentials
Paste the Bot User OAuth Token and Signing Secret from your Slack app. Save. -
Copy the Request URL
Civagent shows a secure URL ending with/channels/slack/events. Copy it. -
Update Slack App Settings
- In Slack’s App settings, open Event Subscriptions.
- Enable events and paste the Civagent Request URL. Wait for the green check.
- Under Subscribe to bot events, add
app_mention,message.channels, andmessage.im. Save.
-
Reinstall the App
If Slack prompts, click Reinstall to Workspace so the new settings take effect. -
Invite the Bot to Channels
In any channel, type/invite @YourBotso it can read and reply there.
How It Works (Plain English)
- Slack sends each message event to the Civagent URL you provided.
- Civagent checks the signing secret and timestamp, then has the agent craft a reply.
- Civagent replies via the Slack Web API, showing up in the same channel or thread.
Testing
- In Slack, mention the bot in a channel:
@YourBot What are today’s hours? - You should see a reply in a few seconds.
- If nothing appears, re-check the Request URL and make sure the bot is invited.
Security & Compliance Notes
- Every webhook from Slack is HMAC-verified with your Signing Secret and a short replay window.
- Bot tokens stay within your Civagent project; they are not shared or used for training.
- Replies use Slack’s Web API with your bot’s least-privilege token.
Troubleshooting
- URL not verified in Slack: double-check https and paste the exact Civagent Request URL.
- Bot silent in a channel: ensure it is invited and that
message.channelsis enabled. - 401 or signature errors: rotate the Signing Secret in Slack and update Civagent.
Support
Need help with a change-control memo or data flow summary? Your Civagent customer team can provide a short security brief tailored for public-sector reviewers.