Slack Audit Integration
Goal
Send audit events to Slack so the team can see:
- who changed settings
- what changed
- why it changed
This is an outbound notification integration (no MCP read tool).
What You Need
- Slack Incoming Webhook URL
- Create a Slack app -> Incoming Webhooks -> add webhook to channel
workspace_keyin memory-core (example:personal)
Environment Variables (Fallback)
MEMORY_CORE_AUDIT_SLACK_WEBHOOK_URLMEMORY_CORE_AUDIT_SLACK_ACTION_PREFIXESMEMORY_CORE_AUDIT_SLACK_DEFAULT_CHANNELMEMORY_CORE_AUDIT_SLACK_FORMATMEMORY_CORE_AUDIT_SLACK_INCLUDE_TARGET_JSONMEMORY_CORE_AUDIT_SLACK_MASK_SECRETS
Step-by-Step Setup
- Create Slack webhook
- Generate webhook URL from your Slack app.
- Keep it secret.
- Save config in Admin UI
- Open
admin-ui-> Integrations -> Slack Audit. - Save:
enabled=truewebhook_urldefault_channel(optional)action_prefixes(optional filter list)format(detailedorcompact)include_target_json/mask_secrets- optional
routesandseverity_rules
- Save config via API (optional)
curl -X PUT "$MEMORY_CORE_URL/v1/integrations" \
-H "Authorization: Bearer $MEMORY_CORE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace_key": "personal",
"provider": "slack",
"enabled": true,
"reason": "enable slack audit notifications",
"config": {
"webhook_url": "https://hooks.slack.com/services/XXX/YYY/ZZZ",
"default_channel": "#audit-core",
"action_prefixes": ["integration.", "workspace_settings.", "git.", "ci."],
"format": "detailed",
"include_target_json": true,
"mask_secrets": true,
"routes": [
{ "action_prefix": "ci.", "channel": "#audit-devflow", "min_severity": "medium" },
{ "action_prefix": "integration.", "channel": "#audit-security", "min_severity": "high" }
],
"severity_rules": [
{ "action_prefix": "integration.", "severity": "high" },
{ "action_prefix": "raw.", "severity": "low" }
]
}
}'
- Trigger and verify
- Trigger an audited action (example: save any integration setting with
reason). - Check Slack channel for message delivery.
- Check API-side logs:
curl -G "$MEMORY_CORE_URL/v1/audit-logs" \
-H "Authorization: Bearer $MEMORY_CORE_API_KEY" \
--data-urlencode "workspace_key=personal" \
--data-urlencode "action_prefix=integration." \
--data-urlencode "limit=20"
Config Reference
webhook_url: Incoming webhook endpointdefault_channel: fallback Slack channelaction_prefixes: notify only when action starts with one of prefixesformat:detailedorcompactinclude_target_json: include serialized audit targetmask_secrets: redact tokens/secrets from payload textroutes:[{ action_prefix, channel?, min_severity? }]severity_rules:[{ action_prefix, severity }]
Severity values:
lowmediumhighcritical
Env vs Admin UI Priority
- Default: workspace config in Admin UI wins over env fallback.
- Exception:
audit_reasonerusesENV > Admin UIprecedence.- Env keys:
MEMORY_CORE_AUDIT_REASONER_*,OPENAI_API_KEY,GEMINI_API_KEY - Admin UI fallback: Integrations -> Audit Reasoner
- Env keys:
- Lock option:
MEMORY_CORE_INTEGRATION_LOCKED_PROVIDERS=slack- When locked, Admin UI updates are blocked and env-only is enforced.
Troubleshooting
- No Slack message
- Verify webhook URL is valid and
enabled=true. - If
action_prefixesis set, confirm action matches prefix. - If
routes.min_severityis set, confirm severity threshold matches.
- Verify webhook URL is valid and
Integration provider "slack" is locked...- Remove
slackfromMEMORY_CORE_INTEGRATION_LOCKED_PROVIDERSor manage via env only.
- Remove