Notification Channels
Mockarty supports sending notifications through external messaging services — Telegram, Slack, Discord, Microsoft Teams, and others. This allows users to receive real-time alerts about test results, fuzzing findings, contract drift, and system events directly in their preferred messenger.
Architecture
The notification system uses a two-level model:
- Admin configures system-wide notification channels (e.g., “Corporate Slack”, “Telegram Bot”)
- Users connect to available channels and configure which events they want to receive
Additionally, the AI agent can use system channels to send notifications without requiring users to provide credentials.
Supported Channels
| Channel | Type | How it works |
|---|---|---|
| Telegram | Bot API | Admin creates a bot via @BotFather, users connect via deeplink |
| Slack | Bot Token / Webhook | DM via bot token + email lookup, or channel webhook |
| Discord | Webhook | Channel-level webhook, no per-user binding needed |
| Microsoft Teams | Workflow Webhook | Adaptive Card via Power Automate Workflow webhook |
| Mattermost | Webhook | Slack-compatible incoming webhook |
| Rocket.Chat | Webhook | Slack-compatible incoming webhook |
| Пачка (Pachca) | Bot API | Direct messages via the Pachca bot API |
| VK Teams | Bot API | Messages via the VK Teams Bot API (self-hosted API address supported) |
| PagerDuty | Events API v2 | Creates incidents for critical alerts |
| OpsGenie | Alert API | Creates alerts with priority mapping |
| Google Chat | Webhook | Space-level webhook |
| Webex | Bot API | DM via bot token + email |
| Generic Webhook | HTTP POST | Custom URL with optional HMAC signature |
Admin Setup
Adding a Channel
- Go to Admin Panel → Notification Channels
- Click Add Channel
- Select the channel type
- Fill in the configuration (follow the setup hints shown for each type)
- (Optional) Set Namespace — leave empty to make the channel global (visible in every namespace) or enter a specific namespace name to scope it. The field is safe to change later via update.
- Click Save
- Use Test button to verify connectivity
Updating a Channel (secrets-safe)
When editing an existing channel, you don’t need to re-enter tokens, webhook URLs, or other sensitive fields — the UI sends an empty string for fields you leave blank and the server keeps the previously stored value for them. Only fields you actively fill in get overwritten. This lets you rename a channel, flip its enabled state, or move it between namespaces without ever exposing its secrets again.
Admin audit log
Every admin-initiated channel change is recorded in the audit log (visible in Admin Panel → Audit Log). Three action codes identify the events:
| Action | When it fires | Captured fields |
|---|---|---|
create_notification_channel |
New channel persisted | type, name, enabled, actor, IP, namespace |
update_notification_channel |
Channel PUT succeeded | type, name, enabled, actor, IP, namespace |
delete_notification_channel |
Channel DELETE succeeded | type, name (snapshot taken before delete), actor, IP, namespace |
Secret fields (bot tokens, webhook URLs, passwords) are never written to the audit log — only the public metadata is captured. Use this log to trace who configured a channel, when it was disabled, or which admin removed a target that stopped receiving alerts.
Channel Configuration Examples
Telegram
- Open Telegram, find @BotFather
- Send
/newbot, follow the prompts to create a bot - Copy the bot token (format:
123456789:ABCdef...) - In Mockarty Admin → Channels → Add → Telegram:
- Bot Token: paste the token
- Bot Username:
@YourBotName(optional, for display)
- Save and enable
Users will connect by clicking a deeplink that opens the bot in Telegram.
Slack
Option A: Bot Token (recommended for DMs)
- Go to api.slack.com/apps → Create New App
- Add Bot Token Scopes:
chat:write,users:read.email - Install to workspace, copy the Bot Token (
xoxb-...) - In Mockarty: paste as Bot Token
Users enter their Slack email to receive DMs.
Option B: Incoming Webhook (channel-level)
- In Slack App → Incoming Webhooks → Add New Webhook
- Select a channel, copy the URL
- In Mockarty: paste as Webhook URL
Discord
- In Discord: Server Settings → Integrations → Webhooks → New Webhook
- Select a channel, copy the webhook URL
- In Mockarty: paste as Webhook URL
No per-user binding needed — messages go to the channel.
Microsoft Teams
- In Teams channel: click
...→ Workflows - Select “Post to a channel when a webhook request is received”
- Follow the setup wizard, copy the webhook URL
- In Mockarty: paste as Webhook URL
Note: Legacy Office 365 Connector URLs are being retired. Use Workflows (Power Automate) webhooks.
PagerDuty
- In PagerDuty: Services → select service → Integrations tab
- Add Integration → Events API v2
- Copy the Integration Key
- In Mockarty: paste as Integration Key (
routing_key) - Optional: set Severity — one of
critical,error,warning,info(defaults are applied per event type if omitted)
OpsGenie
- In OpsGenie: Teams → select team → Integrations → Add integration → API
- Copy the API Key
- In Mockarty: paste as API Key
- Select Region —
us(api.opsgenie.com) oreu(api.eu.opsgenie.com). Using the wrong region causes silent delivery failures.
Testing a Channel
After saving, click the Test button on any channel to send a test notification. For channels that require a recipient (Telegram, Slack), you’ll need to provide a chat ID or email.
User Setup
Connecting to Channels
- Go to Settings → My Notification Channels
- Available channels configured by admin are listed under Available Channels
- Click Connect on the desired channel
Telegram Connection
- Click Connect on the Telegram channel
- A deeplink opens – click it to go to the bot in Telegram
- Press Start in the bot chat
- Connection is confirmed automatically
Slack Connection
- Click Connect on the Slack channel
- Enter your Slack workspace email
- Mockarty resolves your Slack user ID and sends DMs directly
Webhook Channels (Discord, Teams, etc.)
These are channel-level — click Connect and you’re done. All users connected to the same channel receive the same messages.
Notification Preferences Matrix
After connecting, configure which events trigger notifications. The preferences matrix lists every channel-deliverable event (dozens of them), grouped by category — test runs, performance, fuzzing, contracts, chat mentions and direct messages, meetings, task tracker, reviews, license and system alerts. Each channel column has an “All” toggle to switch the whole channel on or off in one click, and every event can be enabled or disabled per channel individually.
A few examples of canonical event IDs:
| Event ID | Description |
|---|---|
test.run.completed |
API test collection run finished |
perf.test.failed |
Performance / load test could not run to completion |
perf.test.threshold_breach |
Performance / load test finished, but one or more thresholds were not met |
fuzzing.finding.new |
Fuzzer detected a new vulnerability or anomaly |
contract.drift_detected |
Contract drift detected between recorded and live response |
system.alert |
System-level incident (cleanup failure, license issue, resource exhaustion) |
The full, always-current list comes from GET /api/v1/channels/preferences (the eventTypes field) — the UI renders the matrix from it, so new event types appear automatically.
Escalating unread notifications
If a bell notification stays unread for too long, Mockarty can escalate it to one of your connected messengers as a digest. Enable it in Settings → My Notification Channels → Escalation: pick the target channel and the threshold (how long a notification may stay unread before escalation). The feature is opt-in and off by default; enabling it requires at least one connected channel binding.
API: GET /api/v1/notifications/escalation / PUT /api/v1/notifications/escalation.
Messenger Bots — two-way commands
Telegram, Slack, VK Teams, Mattermost and Rocket.Chat channels are not just outgoing pipes: when the channel is configured for interaction, the bot also accepts commands — the same set on every messenger.
Connecting your account
A bot only acts on behalf of users it knows:
- Telegram — connect from Settings → My Notification Channels (deeplink → press Start).
- VK Teams — get a connect token in Settings → My Notification Channels and send the bot
/start <token>. - Slack — request a one-time code via
POST /api/v1/channels/slack/connect(or the Connect button in Settings), then sendconnect <code>to the bot in a DM. - Mattermost — get a connect token in Settings → My Notification Channels and send
/mockarty link <token>in Mattermost.
An unknown user who writes to a bot gets onboarding instructions instead of a refusal.
Setting up the Mattermost bot
Mattermost drives the bot over a slash command (no bot needs to stay connected):
- In the Mockarty admin, add a Mattermost channel and fill Server URL + Slash Command Token (you’ll get the token from Mattermost in the next step).
- In Mattermost, Integrations → Slash Commands → Add a command with trigger word
mockarty, Request URLhttps://<your-mockarty>/api/v1/messenger/webhook/mattermost/<channel-id>, method POST. Mattermost shows the command Token — paste it into the Mockarty channel’s Slash Command Token and save. - Users type
/mockarty <command>(e.g./mockarty ask how do I mock gRPC). Command output is private to the sender; a meeting link is posted to the channel.
The Webhook URL field stays optional — set it if you also want outgoing notifications; the interactive bot works from Server URL + Slash Command Token alone.
Setting up the Rocket.Chat bot
Rocket.Chat drives the bot over an outgoing webhook (Rocket.Chat has no Mattermost-style slash-command integration):
- In the Mockarty admin, add a Rocket.Chat channel and fill Server URL + Outgoing Webhook Token (you’ll get the token from Rocket.Chat in the next step).
- In Rocket.Chat, Admin → Integrations → New → Outgoing with event Message Sent, trigger word
mockarty, and URLhttps://<your-mockarty>/api/v1/messenger/rocketchat/outgoing/<channel-id>. Rocket.Chat shows a Token — paste it into the Mockarty channel’s Outgoing Webhook Token and save. - Users type
mockarty <command>(e.g.mockarty ask how do I mock gRPC). Because outgoing-webhook replies are public, command output posts into the room. - Optionally add Bot Auth Token + Bot User ID (a Rocket.Chat personal-access-token for a bot user) to enable the membership guard and call-lifecycle relay via the REST API.
The Webhook URL field stays optional — set it if you also want outgoing notifications; the interactive bot works from Server URL + Outgoing Webhook Token alone.
Commands
| Command | What it does |
|---|---|
/menu |
Quick actions as inline buttons (new meeting, tasks, status, help) |
/meet |
Create a video-meeting link (Discussions meeting) |
/tasks |
Your open tasks from the task tracker |
/do <request> |
Hand a task to the Mockarty AI agent |
/ask <question> |
Ask the knowledge base |
/notifications |
Your recent notifications |
/status |
Bot status |
/help |
All commands |
In group chats, address the bot as /command@BotName (Telegram) or by mentioning it (Slack @bot, VK Teams). Slack additionally supports slash commands via a configurable endpoint and always verifies request signatures with the channel’s Signing Secret. On Mattermost every command is a subcommand of the slash trigger — /mockarty ask …, /mockarty meet, /mockarty tasks, /mockarty link <token> — and each request is verified against the command’s token.
Voice messages (Telegram, VK Teams)
Send the bot a voice note (or an audio file / round video note) and it transcribes it with the Mockarty speech stack, then acts on the words:
- In a private chat the transcript is treated as a task for the Mockarty AI agent — a hands-free
/do. The bot replies with what it heard, hands the task to the agent under your account, and posts the agent’s answer back into the chat when it finishes. When speech synthesis is available on the deployment, the answer is also sent as a voice message (Telegram and VK Teams) — ask by voice, hear the reply. Requires your Telegram to be connected to a Mockarty account. - In a group chat the bot posts the transcript for everyone. If the group is linked to a discussion (
/link), the transcript also joins the buffered history, so/summarizeand/topicscover what was said out loud.
Voice notes up to 10 minutes are accepted. Transcription must be available on the deployment (a speech runner online or an external transcription API configured) — otherwise the bot says so honestly.
Linking a group chat to a discussion
A Telegram, VK Teams or Slack group can be linked to a Mockarty discussion: mint a token from the discussion panel (Sync → /link <token> in the group. From then on the bot keeps the recent history, /summarize posts a digest into the linked discussion, and /topics segments the buffered history into knowledge-base topics.
On Slack, linking additionally requires the app to subscribe to the message.channels event and be invited to the channel — that is how the bot sees the chatter it buffers for /summarize and /topics.
On Mattermost, the chat↔discussion link is /mockarty synclink <token> (distinct from /mockarty link, which binds your account), and buffering needs an outgoing webhook on the channel pointed at /api/v1/messenger/mattermost/outgoing/<Mockarty-channel-id> (use the same token as the slash command). Then /mockarty summarize and /mockarty topics work over the buffered history.
Group moderation
In groups the Telegram and VK Teams bots can guard membership with the full set /guard off | warn | grace | kick. Slack supports /guard off | warn | kick (a bound user sets it; the bot warns — or removes with the channels:manage scope + the member_joined_channel event — an unauthorized joiner); grace is available on Telegram and VK Teams. Mattermost supports /mockarty guard off | warn | kick too, but — because Mattermost gives the bot no join events — it enforces by a periodic membership poll and therefore needs an opt-in bot token (a bot account with manage_channel_members) set in the channel’s Bot Token field; without it guard stays off. Only a chat administrator can change the policy — except on Slack, where any member whose account is connected to Mockarty can, because Slack has no per-channel admin concept the bot can check. In grace mode a newcomer who is not connected to Mockarty gets a welcome message and a time window to connect before being removed; warn only warns, kick removes immediately, off disables guarding. Chat admins are always exempt — the guard never warns or removes an administrator (or the bot itself), so enabling kick will not touch the people who run the chat.
Telegram delivery mode: pull or webhook
By default the Telegram bot polls for updates (works without any inbound connectivity). For lower latency you can switch a channel to webhook mode — Mockarty registers a webhook with Telegram and receives updates on a public endpoint protected by an auto-generated secret:
POST /api/v1/admin/channels/:id/telegram/webhook
{"enabled": true} # switch to webhook (rotateSecret: true to re-issue the secret)
The mode is also editable in the channel’s settings form (Mode: pull / webhook). Switching back and forth requires no restart.
AI Agent Integration
The AI agent (notifier sub-agent) can send notifications through system channels without credentials:
list_system_channels— returns available channels with IDssend_via_channel— sends a notification through a channel by ID
Example agent interaction:
User: "Send a summary of today's test results to Slack"
Agent: [calls list_system_channels → finds Slack channel]
Agent: [calls send_via_channel with channel_id, title, text]
The agent can also use direct tools (send_slack, send_telegram, etc.) with explicit credentials if system channels are not configured.
Without AI Agent
The notification system works entirely without the AI agent:
- Automatic notifications: Events (test completions, fuzzing findings, etc.) trigger notifications through the EventBus → Channel Dispatcher pipeline
- User preferences: Control which events go where via the preferences matrix
- Admin broadcasts: Admin can test channels directly from the admin panel
API Endpoints
Admin API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/admin/channels |
List all channels |
| GET | /api/v1/admin/channels/types |
List supported channel types |
| POST | /api/v1/admin/channels |
Create a channel |
| PUT | /api/v1/admin/channels/:id |
Update a channel |
| DELETE | /api/v1/admin/channels/:id |
Delete a channel |
| POST | /api/v1/admin/channels/:id/test |
Test a channel |
| GET | /api/v1/admin/channel-delivery/dlq |
List dead-letter deliveries |
| GET | /api/v1/admin/channel-delivery/retry-queue |
List deliveries waiting for retry |
| POST | /api/v1/admin/channel-delivery/dlq/:id/requeue |
Re-queue a dead-letter entry |
| GET | /api/v1/admin/channel-templates |
List channel message templates |
| POST | /api/v1/admin/channel-templates |
Upsert a channel message template |
| DELETE | /api/v1/admin/channel-templates/:id |
Delete a template override |
| POST | /api/v1/admin/channel-templates/preview |
Render a template against a sample payload without persisting it |
| GET | /api/v1/admin/channel-templates/snippets |
Catalog of reusable template snippets for the editor |
| GET | /api/v1/notifications/catalog |
List registered event types (used by the UI router) |
Delivery reliability
Every channel dispatch is logged to channel_delivery_log with a status that progresses through pending → delivered, or pending → retrying → dead_letter after exhausting max_retries. The admin UI under Notification Channels → Delivery Log gives you two views:
- Dead Letter – deliveries that have used up all retries. You can requeue any entry with one click to send it back through the retry worker.
- Retry Queue – deliveries currently waiting for their next retry attempt, sorted by
next_retry_at.
A leader-only background worker picks up due retries, applies exponential backoff, and moves the row to dead_letter once retry_count >= max_retries.
Per-event message templates
The dispatcher renders every notification through an override-aware template engine. Lookup order is (most specific → least specific):
(eventType, channelType, lang)– fully-specific override(eventType, channelType, "")– any language(eventType, "", lang)– any channel(eventType, "", "")– any channel, any language- Built-in default shipped with the code
Templates use Go text/template syntax and have access to the raw event payload ({{ .Payload.fieldName }}), the resolved title ({{ .Title }}), body ({{ .Body }}), and deep link ({{ .Link }}).
Manage overrides from Notification Channels → Message Templates in the admin UI, or directly via the /api/v1/admin/channel-templates endpoints.
User API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/channels |
List available channels |
| GET | /api/v1/channels/bindings |
List my channel bindings |
| POST | /api/v1/channels/bindings |
Connect to a channel |
| PUT | /api/v1/channels/bindings/:id |
Update binding |
| DELETE | /api/v1/channels/bindings/:id |
Disconnect |
| POST | /api/v1/channels/telegram/connect |
Get Telegram deeplink |
| GET | /api/v1/channels/preferences |
Get notification preferences |
| PUT | /api/v1/channels/preferences |
Update a preference |
See Also
- Webhooks & Callbacks – Mock-level webhooks for HTTP, Kafka, and RabbitMQ callbacks
- Integrations Guide – Integration tokens, resolver nodes, runner agents, and CI/CD
- Administration Guide – User management, namespaces, and system configuration
- API Reference – Full REST API documentation