How-to Guides
Slack and Discord bridge
Two-way sync between Slack or Discord channels and FluxyChat rooms, with signed inbound webhooks and retried outbound delivery.
Bridge external chat platforms into FluxyChat rooms with two-way channel mappings: room messages are delivered out to the platform, and signed webhooks sync replies back.
Manage bridges from the dashboard Bridges page or the admin REST API.
Create a bridge
curl -X POST "$WORKER_URL/admin/bridges" \
-H "Authorization: Bearer $ADMIN_JWT" \
-H "Content-Type: application/json" \
-d '{
"platform": "slack",
"name": "Support Slack",
"token": "xoxb-...",
"signingSecret": "a1b2c3..."
}'Supported platforms: slack, discord.
token(optional) is the bot token used for outbound delivery.signingSecret(optional, but inbound returns503without it) is the Slack signing secret or the Discord application public key.- Both secrets are encrypted at rest when the worker has
WEBHOOK_SECRET_ENCRYPTION_KEYconfigured.
Rotate or add secrets later without recreating the bridge (recreating deletes its mappings and message map):
curl -X PATCH "$WORKER_URL/admin/bridges/br_abc123" \
-H "Authorization: Bearer $ADMIN_JWT" \
-H "Content-Type: application/json" \
-d '{ "signingSecret": "rotated-secret" }'Inbound webhook URLs
Point your Slack Event Subscriptions or Discord interactions endpoint at:
| Platform | URL |
|---|---|
| Slack | POST {WORKER_URL}/webhooks/bridge/slack/{bridgeId} |
| Discord | POST {WORKER_URL}/webhooks/bridge/discord/{bridgeId} |
Inbound requests are verified before parsing:
- Slack:
x-slack-signature(v0 scheme);x-slack-request-timestampmust be within 5 minutes. - Discord:
x-signature-ed25519over{timestamp}{body}.
Failures are fail-closed: 401 for a bad or stale signature, 503 signature_not_configured when the bridge has no secret. Slack URL verification (url_verification challenge) is answered after the signature check.
Channel mappings
Map an external channel ID to a FluxyChat room:
curl -X POST "$WORKER_URL/admin/bridges/mappings" \
-H "Authorization: Bearer $ADMIN_JWT" \
-H "Content-Type: application/json" \
-d '{
"bridgeId": "br_abc123",
"roomId": "room_support",
"externalChannelId": "C01234567",
"externalChannelName": "#support",
"syncDirection": "both"
}'syncDirection accepts both (default), inbound, or outbound.
Outbound delivery
Messages sent in a mapped room of a connected bridge are queued in bridge_deliveries and delivered with the bridge credentials:
- Slack:
chat.postMessagewith the bot token, or the configuredwebhookUrl(incoming webhook) when no token is set. - Discord:
POST /channels/{channel_id}/messageswith the bot token, or the configured webhook URL.
Failures retry with backoff (60s, 5m, 30m, 1h) on the webhook-flush cron until BRIDGE_MAX_ATTEMPTS (default 5), then land as failed with the provider error surfaced on the bridge. Inspect the last 20 deliveries:
curl "$WORKER_URL/admin/bridges/br_abc123/deliveries" \
-H "Authorization: Bearer $ADMIN_JWT"Messages imported from a platform are never echoed back to that same platform.
Connect and monitor
# List bridges
curl "$WORKER_URL/admin/bridges" -H "Authorization: Bearer $ADMIN_JWT"
# Connect / disconnect
curl -X POST "$WORKER_URL/admin/bridges/br_abc123/connect" \
-H "Authorization: Bearer $ADMIN_JWT"
# Stats
curl "$WORKER_URL/admin/bridges/stats" -H "Authorization: Bearer $ADMIN_JWT"Troubleshooting
- 503 on webhook — no signing secret configured. Add one from the dashboard (Secrets) or with PATCH.
- 401 on webhook — signature mismatch or a Slack timestamp older than 5 minutes.
- 404 on webhook — verify
bridgeIdand platform match (slackbridge only accepts the/slack/path). - Messages not appearing inbound — confirm a mapping exists for the external
channel_idand the bridge status isconnected. - Outbound stuck pending or failed — check
GET /deliveriesforlastError; delivery needs a bot token or a webhook URL. - Slack duplicates — ignore bot subtypes; the parser skips
messageevents withsubtype.
See also Webhooks catalog for delivery signing and replay tooling, and Matrix bridge for federation.
Skill Uploads
Skill uploads let you upload custom skill bundles to AI providers. A skill is a set of files (e.g., a `SKILL.md` describing behavior) that providers load into s
Slash Commands
`createSlashCommandRegistry()` provides command parsing, registration, and execution for chat messages starting with `/`.