Notification Connector
Overview
Section titled “Overview”The Notification connector delivers payloads as messages to external channels. The message body is either the JSON-marshalled payload or a string rendered from a Go text/template.
Connector Type: MeddleNotification
Supported Channels: slack, teams, email, microsoft365, webhook
Configuration Parameters
Section titled “Configuration Parameters”- channel (required): One of
slack,teams,email,microsoft365,webhook - template: Optional Go
text/templatestring. Payload fields are accessible as{{ .field }}. If empty, the payload is JSON-encoded. - webhookUrl: Target URL (used by the
webhookchannel) - slackConfig: Slack-specific options
- teamsConfig: Teams-specific options
- emailConfig: SMTP email options
- microsoft365Config: Microsoft Graph API options
{ "type": "MeddleNotification", "config": { "channel": "slack", "template": "Temperature alert: {{ .temperature }}°C on sensor {{ .sensor_id }}", "slackConfig": { "botToken": "xoxb-...", "channel": "#alerts" } }}slackConfig fields:
- botToken (required): Slack bot user OAuth token
- channel (required): Channel ID or name (e.g.
#alerts)
Microsoft Teams
Section titled “Microsoft Teams”{ "type": "MeddleNotification", "config": { "channel": "teams", "template": "Machine {{ .machine_id }} stopped. Status: {{ .status }}", "teamsConfig": { "webhookUrl": "https://outlook.office.com/webhook/..." } }}teamsConfig fields:
- webhookUrl (required): Incoming webhook URL configured in Teams
Email (SMTP)
Section titled “Email (SMTP)”{ "type": "MeddleNotification", "config": { "channel": "email", "template": "Alert from sensor {{ .sensor_id }}: {{ .message }}", "emailConfig": { "smtpHost": "smtp.example.com", "smtpPort": 587, "from": "alerts@example.com", "to": ["ops@example.com", "manager@example.com"], "username": "alerts@example.com", "password": "app-specific-password" } }}emailConfig fields:
- smtpHost (required), smtpPort (required)
- from (required, must be a valid email)
- to (required, min 1 recipient)
- username, password: Optional SMTP authentication
Microsoft 365 (Graph API)
Section titled “Microsoft 365 (Graph API)”Sends mail via Microsoft Graph using OAuth2 client credentials. Requires an Azure AD app registration with the Mail.Send application permission (admin-consented).
{ "type": "MeddleNotification", "config": { "channel": "microsoft365", "template": "Production halted on line {{ .line_id }}", "microsoft365Config": { "tenantId": "00000000-0000-0000-0000-000000000000", "clientId": "11111111-1111-1111-1111-111111111111", "authMethod": "secret", "clientSecret": "your-client-secret", "fromAddress": "alerts@yourtenant.onmicrosoft.com", "to": ["ops@yourtenant.onmicrosoft.com"], "subject": "Production Alert", "saveToSentItems": true } }}microsoft365Config fields:
- tenantId (required), clientId (required)
- authMethod:
secret(default) orcertificate - clientSecret: Required when
authMethodissecret - certificate: Required when
authMethodiscertificate. Provide eithercertificateFile+privateKeyFile(PEM) orpfxFile(+ optionalpfxPassword). - fromAddress (required, must be a valid email matching a licensed mailbox)
- to (required, min 1 recipient)
- subject: Email subject (default
Meddle Notification) - saveToSentItems: When
true, the message is saved in the mailbox’s Sent Items
Webhook
Section titled “Webhook”{ "type": "MeddleNotification", "config": { "channel": "webhook", "webhookUrl": "https://hooks.example.com/incoming", "template": "{{ .machine_id }}: {{ .status }}" }}Posts a JSON body { "message": "...", "data": { ...payload... } } to webhookUrl.
Templates
Section titled “Templates”Templates use Go’s text/template syntax. Common patterns:
Temperature: {{ .temperature }}°C{{ if gt .pressure 100.0 }}Pressure HIGH{{ end }}Sensor {{ .sensor_id }} reported {{ .status }} at {{ .timestamp }}If no template is configured, the full payload is JSON-encoded as the message.
Use Cases
Section titled “Use Cases”- Operator notifications for threshold violations
- Incident routing to on-call channels via Slack or Teams
- Audit logging via webhook to a SIEM or HTTP endpoint
- Corporate email alerts with Microsoft 365 OAuth (no SMTP password required)
Best Practices
Section titled “Best Practices”- Use templates to keep messages short, human-readable, and actionable
- Place Trigger or Rate Limiter upstream to avoid flooding channels
- For Microsoft 365, prefer certificate auth in production; rotate secrets regularly
- Use a webhook channel when sending to internal systems that do not need a specific provider integration
Related Connectors
Section titled “Related Connectors”- Alert - Stateful alerting with duration and cooldown
- Trigger - Gate notifications on a condition
- Rate Limiter - Cap notification frequency