Skip to docs content

Slack & Discord bots

Fluxtab talks to chat in two different ways. This page is about the spend bots (/fluxtab spend). Alert webhooks are separate — see Alert Channels.

| Feature | What you create | Where it lives in Fluxtab | | --- | --- | --- | | Spend bot | Nothing on the Developer portal — you install Fluxtab’s app into your workspace/server | OAuth link under Settings (or the install URLs below) | | Alert webhook | An Incoming Webhook URL inside Slack or Discord | Settings → Alert channels |

Why use the spend bots

Ask for month-to-date spend and forecast from Slack or Discord without opening the dashboard. The reply is ephemeral (only you see it). The workspace or Discord server must be linked to the Fluxtab account that owns your provider connections.

Slack bot

What it does

After you authorize Fluxtab, Slack sends /fluxtab (or /fluxtab spend) to Fluxtab. Fluxtab looks up your linked workspace and returns MTD spend. Forecast numbers in that reply are an estimate, not a guarantee.

Connect your workspace

You do not create a new app at api.slack.com for a normal Fluxtab account. Fluxtab already hosts the Slack app. You only install it into your workspace.

  1. Sign in to Fluxtab in the browser (same account that has your provider connections).
  2. Open Connect Slack (you must be logged in; you will be sent through Slack’s authorize screen).
  3. Pick the Slack workspace that should see your spend and allow the requested bot scopes (commands, chat:write, incoming-webhook).
  4. When Slack returns you to Fluxtab Settings, the workspace is linked.
  5. In that workspace, run /fluxtab spend (or bare /fluxtab).

If Slack says the workspace isn’t linked, repeat the connect step while signed into the correct Fluxtab account. Team members share the owner’s linked workspace once the owner has connected it.

Create a Slack Incoming Webhook (alerts only)

For threshold/anomaly alerts, create a webhook yourself and paste it under Alert Channels:

  1. In Slack, open the channel → Integrations / Apps → add an Incoming Webhook (or create one from api.slack.com → your webhook app → Incoming Webhooks).
  2. Copy the URL (https://hooks.slack.com/services/…).
  3. In Fluxtab: Settings → Alert channels → type Slack → paste the URL → Save.

That webhook is only for push alerts. It does not enable /fluxtab spend by itself.

Discord bot

What it does

Same spend check as Slack, via /fluxtab spend in a Discord server (not DMs). On install, Fluxtab registers the guild command automatically.

Connect your server

You do not create a new application at the Discord Developer Portal for a normal Fluxtab account. You install Fluxtab’s bot into your server.

  1. Sign in to Fluxtab.
  2. Open Connect Discord.
  3. Choose the Discord server, authorize the bot (bot + applications.commands). No elevated guild permissions are required for spend checks.
  4. Wait for Fluxtab to finish linking and registering commands (you land back on Settings).
  5. In that server, type /fluxtab spend (or /fluxtab).

If Discord can’t resolve the server id, the Fluxtab Discord app must have Require OAuth2 Code Grant enabled (already true for the hosted app). Re-run Connect Discord and select the server again.

Create a Discord channel webhook (alerts only)

For push alerts, create a channel webhook and paste it under Alert Channels:

  1. Discord server → Server Settings → Integrations → Webhooks → New Webhook.
  2. Pick a channel, copy the URL (https://discord.com/api/webhooks/…).
  3. In Fluxtab: Settings → Alert channels → type Discord → paste → Save.

Troubleshooting

  • Unauthorized / signature errors — the hosted Slack Signing Secret or Discord Public Key must match what Slack/Discord send. End users can’t fix this; it’s a Fluxtab (or self-host) config issue.
  • Command unknown in Discord — wait a minute after install, or re-run Connect Discord so guild commands are registered again.
  • Wrong account’s spend — the Fluxtab user who clicked Connect owns the link. Use that account (or a team member under that owner).

Self-hosting: create the Slack and Discord apps

If you run your own Fluxtab instance, create the developer apps once, put credentials in env, then users connect via the same install URLs as above.

Slack app (operator)

  1. Go to api.slack.com/appsCreate New App → From scratch.
  2. OAuth & Permissions → Redirect URL: {NEXT_PUBLIC_SITE_URL}/api/integrations/slack/callback.
  3. Bot Token Scopes: chat:write, incoming-webhook, commands (or set SLACK_BOT_SCOPES to match).
  4. Slash Commands → Create /fluxtab with Request URL {NEXT_PUBLIC_SITE_URL}/api/slack/commands.
  5. Basic Information → copy Signing Secret. OAuth → copy Client ID and Client Secret.
  6. Set SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, and SLACK_SIGNING_SECRET in your Fluxtab environment and redeploy.

Discord application (operator)

  1. Go to Discord Developer PortalNew Application.
  2. Bot → Add Bot → copy the Bot Token (DISCORD_BOT_TOKEN).
  3. General Information → copy Application ID (DISCORD_CLIENT_ID) and Public Key (DISCORD_PUBLIC_KEY).
  4. OAuth2 → copy Client Secret (DISCORD_CLIENT_SECRET). Add redirect {NEXT_PUBLIC_SITE_URL}/api/integrations/discord/callback.
  5. Enable Require OAuth2 Code Grant so the token exchange returns guild.
  6. Interactions Endpoint URL: {NEXT_PUBLIC_SITE_URL}/api/discord/interactions (Discord will verify the signature).
  7. Redeploy Fluxtab with those env vars. Users then use Connect Discord.