Skip to main content

Slack & Microsoft Teams Integration

FieldValue
Document IDASCEND-NOTIF-002
Version1.0.0
Last UpdatedDecember 19, 2025
AuthorAscend Engineering Team
PublisherOW-KAI Technologies Inc.
ClassificationEnterprise Client Documentation
ComplianceSOC 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

  1. Go to Slack API Apps
  2. Create a new app or select existing
  3. Enable Incoming Webhooks
  4. Add webhook to workspace
  5. 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 TypeIconColor
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

  1. Go to your Teams channel
  2. Click ...Connectors
  3. Find Incoming Webhook
  4. 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

EventDescriptionDefault Priority
action.submittedNew action submittedNormal
action.approvedAction approvedNormal
action.deniedAction deniedHigh
action.requires_approvalPending approvalHigh
action.expiredApproval timeoutNormal
alert.criticalCritical alertUrgent
alert.highHigh priority alertHigh
alert.mediumMedium priority alertNormal
alert.lowLow priority alertLow
agent.registeredNew agentNormal
agent.killedAgent terminatedUrgent
agent.health_warningHealth issueHigh

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:

AttemptDelay
11 second
22 seconds
34 seconds
48 seconds
516 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

  1. Verify webhook URL is correct
  2. Test channel with test notification
  3. Check if channel is paused
  4. Verify subscribed events

High Failure Rate

  1. Check webhook endpoint health
  2. Verify rate limits aren't exceeded
  3. Check for expired webhook URLs
  4. Review error messages in delivery history

Duplicate Notifications

  1. Check for multiple channels with same events
  2. Verify idempotency key handling
  3. Review subscription overlap

Next Steps


Document Version: 1.0.0 | Last Updated: December 2025