Microsoft Teams Integration
Receive Nadi alerts in Microsoft Teams channels.
Setup
1. Create Incoming Webhook
- Open Microsoft Teams
- Navigate to the target channel
- Click ... → Connectors
- Search for Incoming Webhook
- Click Configure
- Name it "Nadi Alerts"
- Copy the webhook URL
2. Add to Nadi
- Go to Settings → Integrations
- Click Add Microsoft Teams
- Paste the webhook URL
- Name the integration
- Click Save
3. Test Connection
- Click Test next to the integration
- Check the Teams channel for the test message
Notification Format
Standard Alert
Alert Preview
Nadi Alert: New Error in my-app (production)
TypeError: Cannot read property 'name' of undefined
- Location: app/services/UserService.php:45
- Events: 23
- Users Affected: 12
- Environment: production
[ View in Nadi ]
Adaptive Card
Nadi uses Adaptive Cards for rich formatting:
- Color-coded severity
- Expandable details
- Quick action buttons
- Links to dashboard
Features
Action Buttons
- View in Nadi - Opens issue in browser
- Resolve - Mark issue resolved
- Ignore - Mark issue ignored
Mentions
Mention users in alerts:
yaml
actions:
- channel: teams
target: "Production Alerts"
options:
mention: "[email protected]"Channel Selection
Create multiple integrations for different channels:
| Channel | Use Case |
|---|---|
| Production Alerts | Critical errors |
| Dev Team | All errors |
| SRE Team | Performance alerts |
Alert Configuration
Per-Channel Routing
Route different alerts to different channels:
yaml
# Critical to #production
name: Critical Alerts
trigger: new_issue
conditions:
levels: [fatal]
actions:
- channel: teams
target: "Production Alerts"
# Others to #dev
name: Dev Alerts
trigger: new_issue
conditions:
levels: [error, warning]
actions:
- channel: teams
target: "Dev Team"Scheduled Digests
Send daily/weekly summaries:
- Go to Alerts → Digests
- Create a digest
- Select Teams channel
- Set frequency
Multiple Teams
Different Tenants
For different Teams tenants:
- Create webhooks in each tenant
- Add each as separate integration
- Name clearly (e.g., "Teams - Company A")
Single Tenant, Multiple Channels
- Create webhooks for each channel
- Add as separate integrations
- Route alerts to appropriate channels
Troubleshooting
Webhook Not Working
- Verify webhook URL is correct
- Check webhook hasn't expired
- Test with curl:bash
curl -X POST -H "Content-Type: application/json" \ -d '{"text": "Test message"}' \ YOUR_WEBHOOK_URL
Rate Limits
If hitting rate limits:
- Reduce alert frequency
- Enable aggregation
- Use digests
Card Not Rendering
- Check Teams channel supports Adaptive Cards
- Verify JSON payload is valid
- Contact support if issue persists
Security
Webhook Security
- Webhook URLs are stored encrypted
- URLs are not exposed in logs
- Rotate webhooks periodically
Data in Teams
Alerts include:
- Error summary
- Location
- Event counts
Alerts do NOT include:
- Full stack traces
- Request/response data
- User PII
Best Practices
Channel Organization
#nadi-critical - P1 alerts, immediate response
#nadi-production - All production errors
#nadi-staging - Staging errors
#nadi-reports - Weekly digestsAlert Hygiene
- Don't over-alert (causes fatigue)
- Use appropriate channels
- Review and tune rules regularly
Next Steps
- Alert Rules - Configure rules
- Slack - Slack integration
- Webhooks - Custom integrations