Communicatie die de organisatie verbindt
Mattermost is de centrale hub voor teamcommunicatie. Meer dan alleen chat - het is het zenuwstelsel dat alle ASD-PMA services verbindt via real-time notificaties, slash commands en integraties.
| Channel | Doel | Integraties |
|---|---|---|
| #general | Algemene communicatie | - |
| #support | Support team discussies | Zammad alerts |
| #development | Development updates | Redmine, Git |
| #business | Business updates | ERPNext events |
| #alerts | Systeem notificaties | n8n monitoring |
| Type | Voorbeelden |
|---|---|
| Async | Messages, Thread Replies, Reactions |
| Real-time | Voice Calls, Screen Share |
| Structured | Slash Commands, Bot Responses |
Reageer direct op tickets in elk systeem:
Voorbeelden:
# Reply naar Redmine issue
/reply #23 Code review is klaar, ready for merge
# Reply naar Zammad ticket
/reply ZD#74001 Klant heeft bevestigd, kan worden gesloten
# Reply naar ERPNext task
/reply TASK-2025-00006 Milestone bereikt
# Auto-detect uit recent channel bericht
/reply Goed punt, ik pak dit op
| Type | Zichtbaarheid | Gebruik |
|---|---|---|
in_channel |
Iedereen | Publieke updates |
ephemeral |
Alleen jij | Bevestigingen, errors |
Ontvang notificaties van andere services:
Webhook Payload:
{
"channel": "support",
"username": "Zammad Bot",
"icon_emoji": ":ticket:",
"text": "**Urgent Ticket**\n\n**ZD#74001**: Server down\nPriority: High\nCustomer: Acme Corp"
}
Ticket notificaties automatisch:
| Trigger | Channel | Bericht |
|---|---|---|
| Nieuw P1 ticket | #support | Urgent: titel |
| SLA warning | #support | SLA: 20 min remaining |
| Ticket closed | #support | Resolved: titel |
| mattermost tag added | #development | Escalated: titel |
Development updates:
| Trigger | Channel | Bericht |
|---|---|---|
| Issue created | #development | New: subject |
| Status changed | #development | #23 naar In Progress |
| Issue closed | #development | Closed: #23 |
Business events:
| Trigger | Channel | Bericht |
|---|---|---|
| Deal won | #business | Won: 50K - Acme Corp |
| Invoice overdue | #finance | Overdue: INV-2024-001 |
| Project milestone | #business | Milestone: Project X Phase 1 |
// n8n Code Node - Mattermost notification
const webhookUrl = 'https://mattermost.example.com/hooks/xxx';
const message = {
channel: 'development',
username: 'ASD Bot',
icon_emoji: ':robot:',
text: `**New Deployment**\n\nService: ${service}\nVersion: ${version}\nStatus: Success`,
props: {
card: JSON.stringify({
header: 'Deployment Details',
body: `Deployed by: ${user}\nTime: ${timestamp}`
})
}
};
await $http.post(webhookUrl, message);
{
"text": "Approve deployment?",
"attachments": [{
"actions": [{
"id": "approve",
"name": "Approve",
"integration": {
"url": "https://n8n.example.com/webhook/approve",
"context": {
"deployment_id": "deploy-123"
}
}
}, {
"id": "reject",
"name": "Reject",
"style": "danger",
"integration": {
"url": "https://n8n.example.com/webhook/reject",
"context": {
"deployment_id": "deploy-123"
}
}
}]
}]
}
# Personal Access Token
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://mattermost.example.com/api/v4/users/me
# Post bericht
POST /api/v4/posts
{
"channel_id": "xxx",
"message": "Hello from API"
}
# Create incoming webhook
POST /api/v4/hooks/incoming
{
"channel_id": "xxx",
"display_name": "My Bot",
"description": "Posts notifications"
}
# Get channel by name
GET /api/v4/teams/{team_id}/channels/name/{channel_name}
# Search users
GET /api/v4/users/search
{
"term": "john"
}
Wanneer een slash command wordt aangeroepen, ontvangt je webhook:
{
"token": "xxx",
"team_id": "xxx",
"channel_id": "xxx",
"user_id": "xxx",
"user_name": "john.doe",
"command": "/reply",
"text": "#23 Code review done",
"response_url": "https://mattermost.example.com/hooks/commands/xxx"
}
#team-{naam} - Team channels (#team-support)
#project-{naam} - Project channels (#project-alpha)
#topic-{naam} - Topic channels (#topic-architecture)
#alert-{naam} - Automated alerts (#alert-monitoring)
Gebruik threads om discussies georganiseerd te houden:
| Mention | Gebruik |
|---|---|
@channel |
Hele kanaal (urgent) |
@here |
Online leden |
@username |
Specifieke persoon |
@team-support |
Team groep |
**Service Down**
**Service:** Zammad
**Status:** Unreachable
**Since:** 14:32 UTC
**Impact:** Customer support affected
[Check Status Page](https://status.example.com)
| Shortcut | Actie |
|---|---|
Ctrl+K |
Quick channel switcher |
Ctrl+Shift+L |
Toggle sidebar |
Ctrl+Shift+M |
Recent mentions |
Ctrl+/ |
Keyboard shortcuts help |
Up Arrow |
Edit last message |
Ctrl+Enter |
Send message |
| Probleem | Oorzaak | Oplossing |
|---|---|---|
| Slash command niet herkend | Cache | Herstart Mattermost |
| Webhook 403 | Token invalid | Regenereer token |
| Mentions werken niet | Notification settings | Check preferences |
# Server logs
docker logs asd-mattermost
# Webhook logs
docker exec asd-mattermost cat /mattermost/logs/mattermost.log | grep webhook
# Via mmctl
docker exec asd-mattermost mmctl --local token generate USER_ID "new-token"
# Nooit tokens in chat delen
# Gebruik environment variables
export MM_TOKEN="your-token"
# Roteer tokens regelmatig
mmctl token revoke OLD_TOKEN
mmctl token generate USER_ID "new-token"
| Type | Wie kan joinen | Gebruik |
|---|---|---|
| Public | Iedereen | General discussion |
| Private | Invited only | Sensitive topics |
| Group DM | Selected users | Quick collaboration |
| User Type | Public Channels | Private Channels | Direct Messages |
|---|---|---|---|
| Member | Yes | By membership | Yes |
| Guest | Yes | By invitation only | Yes |