Integrations
Slack Integration
Connect your Engrami agents to Slack for seamless team collaboration and automated workflows.
Overview
The Slack integration allows your AI agents to interact directly with your team through Slack channels, respond to mentions, handle direct messages, and trigger workflows based on Slack events.
- Respond to @mentions in channels
- Handle direct messages to your agent bot
- Trigger workflows from slash commands
- Post notifications and updates to channels
- Interactive message actions and buttons
Setup
1. Create Slack App
First, create a new Slack app in your workspace:
- Go to api.slack.com/apps
- Click "Create New App" → "From scratch"
- Name your app (e.g., "Engrami Agent")
- Select your workspace
2. Configure OAuth Scopes
Add the following Bot Token Scopes under "OAuth & Permissions":
# Required scopes
app_mentions:read # Receive @mention events
channels:history # Read channel messages
channels:read # List channels
chat:write # Send messages
commands # Handle slash commands
im:history # Read DM history
im:read # Access DM info
im:write # Send DMs
users:read # Get user info3. Enable Event Subscriptions
Configure your app to receive events:
# Request URL
https://api.engrami.com/api/v1/integrations/slack/events
# Subscribe to bot events
app_mention
message.channels
message.im4. Connect to Engrami
Add your Slack credentials in Engrami:
curl -X POST https://api.engrami.com/api/v1/integrations \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "slack",
"config": {
"bot_token": "xoxb-your-bot-token",
"signing_secret": "your-signing-secret",
"app_id": "A0123456789"
},
"agent_id": "agent_abc123"
}'Features
Channel Mentions
Users can mention your agent in any channel where it's added:
# In Slack
@EngramiAgent what's our Q4 revenue target?
# Agent responds in thread
Based on the financial documents, your Q4 revenue target is $2.5M...Slash Commands
Create custom slash commands to trigger specific actions:
# Configure slash command
Command: /ask-agent
Request URL: https://api.engrami.com/api/v1/integrations/slack/commands
# Usage in Slack
/ask-agent summarize the latest product meeting notesInteractive Messages
Send messages with buttons and menus:
// From your workflow
{
"channel": "C0123456789",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "New support ticket requires attention"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": { "type": "plain_text", "text": "Assign to me" },
"action_id": "assign_ticket"
},
{
"type": "button",
"text": { "type": "plain_text", "text": "View details" },
"action_id": "view_ticket"
}
]
}
]
}Workflow Integration
Use Slack as a trigger or action in your workflows:
{
"name": "Slack Support Workflow",
"nodes": [
{
"id": "trigger",
"type": "slack_message",
"config": {
"channel_pattern": "#support-*",
"keyword_filter": ["help", "issue", "problem"]
}
},
{
"id": "classify",
"type": "agent",
"config": { "agent_id": "support_classifier" }
},
{
"id": "respond",
"type": "slack_reply",
"config": {
"reply_in_thread": true,
"include_emoji": true
}
}
]
}Security
- Request Verification - All incoming requests are verified using Slack's signing secret
- Token Encryption - Bot tokens are encrypted at rest using AES-256
- Audit Logging - All agent interactions are logged for compliance
- Channel Permissions - Agents only access channels they're explicitly added to