Slack & Microsoft Teams Integration
| Field | Value |
|---|---|
| Document ID | ASCEND-NOTIF-002 |
| Version | 1.0.0 |
| Last Updated | December 19, 2025 |
| Author | Ascend Engineering Team |
| Publisher | OW-KAI Technologies Inc. |
| Classification | Enterprise Client Documentation |
| Compliance | SOC 2 CC6.1/CC6.2, PCI-DSS 7.1/8.3, HIPAA 164.312, NIST 800-53 AC-2/SI-4 |
Reading Time: 7 minutes | Skill Level: Intermediate
Overview
ASCEND integrates with Slack and Microsoft Teams to deliver real-time notifications about actions, approvals, and alerts directly to your team's communication channels.
Slack Integration
Create Slack Webhook
- Go to Slack API Apps
- Create a new app or select existing
- Enable Incoming Webhooks
- Add webhook to workspace
- Copy the webhook URL
Configure Slack Channel
curl -X POST "https://pilot.owkai.app/api/notifications/channels" \
-H "Authorization: Bearer <admin_jwt>" \
-H "Content-Type: application/json" \
-d '{
"name": "Security Alerts",
"channel_type": "slack",
"webhook_url": "https://hooks.slack.com/services/T00/B00/xxx",
"description": "Critical security notifications",
"subscribed_events": [
"action.denied",
"action.requires_approval",
"alert.critical",
"alert.high"
],
"slack_channel_name": "#security-alerts",
"slack_username": "ASCEND Bot",
"slack_icon_emoji": ":robot_face:",
"min_risk_score": 70,
"rate_limit_per_minute": 30
}'
Slack Message Format
ASCEND sends rich Block Kit messages:
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "🚨 High-Risk Action Requires Approval",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Agent *trading-bot-001* requested *trade_execution* with risk score *85*"
}
},
{
"type": "section",
"fields": [
{"type": "mrkdwn", "text": "*Agent:*\ntrading-bot-001"},
{"type": "mrkdwn", "text": "*Risk Score:*\n85 (Critical)"},
{"type": "mrkdwn", "text": "*Action:*\ntrade_execution"},
{"type": "mrkdwn", "text": "*Amount:*\n$50,000"}
]
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Priority: :warning: HIGH | Event: `action.requires_approval` | Time: 2025-12-15 10:30:00 UTC"
}
]
},
{"type": "divider"}
],
"attachments": [
{
"color": "#ff9500",
"fallback": "High-Risk Action Requires Approval"
}
]
}
Event-Specific Icons
| Event Type | Icon | Color |
|---|---|---|
action.approved | ✅ | #28a745 (Green) |
action.denied | ❌ | #dc3545 (Red) |
action.requires_approval | ⏳ | #ffc107 (Yellow) |
alert.critical | 🚨 | #dc3545 (Red) |
alert.high | ⚠️ | #ff9500 (Orange) |
agent.killed | 🛑 | #dc3545 (Red) |
Microsoft Teams Integration
Create Teams Webhook
- Go to your Teams channel
- Click ... → Connectors
- Find Incoming Webhook
- Configure and copy the webhook URL
Configure Teams Channel
curl -X POST "https://pilot.owkai.app/api/notifications/channels" \
-H "Authorization: Bearer <admin_jwt>" \
-H "Content-Type: application/json" \
-d '{
"name": "AI Governance Alerts",
"channel_type": "teams",
"webhook_url": "https://outlook.office.com/webhook/xxx",
"description": "AI agent governance notifications",
"subscribed_events": [
"action.approved",
"action.denied",
"action.requires_approval"
],
"teams_title": "ASCEND Alert",
"min_risk_score": 50,
"rate_limit_per_minute": 30
}'
Teams Message Format
ASCEND sends MessageCard format for maximum compatibility:
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "ff9500",
"summary": "High-Risk Action Requires Approval",
"sections": [
{
"activityTitle": "ASCEND Alert",
"activitySubtitle": "High-Risk Action Requires Approval",
"activityImage": "https://owkai.app/logo-64.png",
"facts": [
{"name": "Agent", "value": "trading-bot-001"},
{"name": "Risk Score", "value": "85 (Critical)"},
{"name": "Action Type", "value": "trade_execution"},
{"name": "Priority", "value": "HIGH"},
{"name": "Timestamp", "value": "2025-12-15 10:30:00 UTC"}
],
"markdown": true,
"text": "Agent trading-bot-001 requested trade_execution with risk score 85"
}
],
"potentialAction": [
{
"@type": "OpenUri",
"name": "View in ASCEND",
"targets": [
{
"os": "default",
"uri": "https://dashboard.owkai.app/actions/act_xyz"
}
]
}
]
}
Testing Integration
Send Test Notification
curl -X POST "https://pilot.owkai.app/api/notifications/channels/{channel_id}/test" \
-H "Authorization: Bearer <admin_jwt>" \
-d '{
"custom_message": "This is a test notification from ASCEND"
}'
Success Response:
{
"success": true,
"message": "Test notification sent successfully",
"http_status_code": 200,
"response_time_ms": 245
}
Verify Channel Status
curl "https://pilot.owkai.app/api/notifications/channels/{channel_id}" \
-H "Authorization: Bearer <admin_jwt>"
{
"id": 1,
"name": "Security Alerts",
"channel_type": "slack",
"is_active": true,
"is_verified": true,
"verified_at": "2025-12-15T10:00:00Z",
"total_notifications": 150,
"successful_notifications": 148,
"failed_notifications": 2
}
Event Subscriptions
Available Events
| Event | Description | Default Priority |
|---|---|---|
action.submitted | New action submitted | Normal |
action.approved | Action approved | Normal |
action.denied | Action denied | High |
action.requires_approval | Pending approval | High |
action.expired | Approval timeout | Normal |
alert.critical | Critical alert | Urgent |
alert.high | High priority alert | High |
alert.medium | Medium priority alert | Normal |
alert.low | Low priority alert | Low |
agent.registered | New agent | Normal |
agent.killed | Agent terminated | Urgent |
agent.health_warning | Health issue | High |
Filter by Risk Score
Only receive notifications for high-risk actions:
{
"min_risk_score": 70,
"risk_levels": ["high", "critical"]
}
Rate Limiting
Per-Channel Limits
{
"rate_limit_per_minute": 30
}
Check Rate Limit Status
curl "https://pilot.owkai.app/api/notifications/channels/{channel_id}/rate-limit" \
-H "Authorization: Bearer <admin_jwt>"
{
"limit_per_minute": 30,
"current_count": 12,
"window_start": "2025-12-15T10:00:00Z",
"remaining": 18
}
Error Handling
Automatic Retries
ASCEND retries failed deliveries with exponential backoff:
| Attempt | Delay |
|---|---|
| 1 | 1 second |
| 2 | 2 seconds |
| 3 | 4 seconds |
| 4 | 8 seconds |
| 5 | 16 seconds |
Circuit Breaker
After 10 consecutive failures, the channel is automatically paused:
{
"is_paused": true,
"paused_at": "2025-12-15T10:30:00Z",
"paused_reason": "Circuit breaker: 10 consecutive failures"
}
Resume Paused Channel
curl -X POST "https://pilot.owkai.app/api/notifications/channels/{channel_id}/resume" \
-H "Authorization: Bearer <admin_jwt>"
Notification Metrics
Get Channel Metrics
curl "https://pilot.owkai.app/api/notifications/metrics" \
-H "Authorization: Bearer <admin_jwt>"
{
"total_channels": 5,
"active_channels": 4,
"paused_channels": 1,
"total_notifications_24h": 342,
"successful_24h": 338,
"failed_24h": 4,
"success_rate_24h": 98.83,
"avg_response_time_ms": 245,
"by_channel_type": {
"slack": {"total": 200, "success": 198},
"teams": {"total": 142, "success": 140}
},
"by_event_type": {
"action.approved": 150,
"action.denied": 45,
"alert.high": 20
}
}
Best Practices
1. Channel Organization
#ascend-critical → Critical/High alerts only
#ascend-approvals → Pending approval notifications
#ascend-activity → All action notifications
2. Use Appropriate Filters
- Critical channels:
min_risk_score: 80 - Standard channels:
min_risk_score: 50 - Activity feed: No filter
3. Set Rate Limits
Prevent notification spam:
- Critical channels: 60/min (high volume expected during incidents)
- Standard channels: 30/min
- Activity feeds: 10/min
4. Monitor Health
Regularly check:
- Channel verification status
- Delivery success rate
- Response times
Troubleshooting
Notifications Not Arriving
- Verify webhook URL is correct
- Test channel with test notification
- Check if channel is paused
- Verify subscribed events
High Failure Rate
- Check webhook endpoint health
- Verify rate limits aren't exceeded
- Check for expired webhook URLs
- Review error messages in delivery history
Duplicate Notifications
- Check for multiple channels with same events
- Verify idempotency key handling
- Review subscription overlap
Next Steps
- Webhooks - Custom HTTP notifications
- Smart Alerts - Configure alert rules
- PagerDuty - On-call integration
Document Version: 1.0.0 | Last Updated: December 2025