IntegrationsAlerting
Microsoft Teams
Send alerts and notifications to Microsoft Teams channels. Follow the setup steps and practical guidance for using Microsoft Teams in your Parseable…
Send Parseable alerts to Microsoft Teams channels for team collaboration and incident awareness.
Overview
Integrate Parseable with Microsoft Teams to:
- Team Notifications - Alert your team in dedicated channels
- Rich Messages - Send formatted cards with alert details
- Collaboration - Discuss and resolve issues in context
- Mobile Alerts - Receive notifications on mobile devices
Prerequisites
- Microsoft Teams workspace
- Incoming Webhook connector configured
- Parseable instance with alerting configured
Setting Up Teams Webhook
Create an Incoming Webhook
- Open Microsoft Teams
- Navigate to the channel for alerts
- Click ... → Connectors
- Find Incoming Webhook and click Configure
- Name your webhook (e.g., "Parseable Alerts")
- Optionally upload an icon
- Click Create
- Copy the webhook URL
Webhook Integration
Create a webhook service to transform Parseable alerts to Teams format:
// webhook-to-teams.js
const express = require('express');
const axios = require('axios');
const app = express();
app.use(express.json());
const TEAMS_WEBHOOK_URL = process.env.TEAMS_WEBHOOK_URL;
app.post('/webhook', async (req, res) => {
const alert = req.body;
const teamsMessage = {
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": getThemeColor(alert.severity),
"summary": `Parseable Alert: ${alert.name}`,
"sections": [{
"activityTitle": `🚨 ${alert.name || 'Alert Triggered'}`,
"activitySubtitle": `Stream: ${alert.dataset}`,
"activityImage": "https://parseable.com/logo.png",
"facts": [
{ "name": "Severity", "value": alert.severity || 'Unknown' },
{ "name": "Stream", "value": alert.dataset || 'N/A' },
{ "name": "Current Value", "value": String(alert.value || 'N/A') },
{ "name": "Threshold", "value": String(alert.threshold || 'N/A') },
{ "name": "Time", "value": new Date().toISOString() }
],
"markdown": true
}],
"potentialAction": [{
"@type": "OpenUri",
"name": "View in Parseable",
"targets": [{
"os": "default",
"uri": `https://your-parseable.com/streams/${alert.dataset}`
}]
}]
};
try {
await axios.post(TEAMS_WEBHOOK_URL, teamsMessage);
res.status(200).json({ status: 'sent' });
} catch (error) {
console.error('Error sending to Teams:', error);
res.status(500).json({ error: 'Failed to send to Teams' });
}
});
function getThemeColor(severity) {
const colors = {
'critical': 'FF0000',
'high': 'FFA500',
'medium': 'FFFF00',
'low': '00FF00',
'info': '0000FF'
};
return colors[severity?.toLowerCase()] || 'FFA500';
}
app.listen(3000);Adaptive Cards (Modern Format)
For richer formatting, use Adaptive Cards:
const adaptiveCard = {
"type": "message",
"attachments": [{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": `🚨 ${alert.name}`,
"color": alert.severity === 'critical' ? 'Attention' : 'Warning'
},
{
"type": "FactSet",
"facts": [
{ "title": "Stream", "value": alert.dataset },
{ "title": "Severity", "value": alert.severity },
{ "title": "Value", "value": String(alert.value) }
]
}
],
"actions": [{
"type": "Action.OpenUrl",
"title": "View in Parseable",
"url": `https://your-parseable.com/streams/${alert.dataset}`
}]
}
}]
};Docker Compose
version: '3.8'
services:
webhook-to-teams:
build: .
ports:
- "3000:3000"
environment:
- TEAMS_WEBHOOK_URL=https://outlook.office.com/webhook/...Best Practices
- Use Dedicated Channels - Create separate channels for different alert severities
- Include Action Links - Add buttons to view alerts in Parseable
- Format Messages - Use cards for better readability
- Rate Limiting - Implement rate limiting to avoid flooding channels
Next Steps
- Set up Parseable alerts for automated notifications
- Configure Slack as an alternative
- Create dashboards for monitoring
Was this page helpful?