CHATBOTS

Slack /flag Toggle with Owner Approval and GitHub Audit PR

A teammate types /flag <name> on|off in Slack; the bot routes the request to the flag's owner for approval, flips the flag in Postgres.

CategoryChatbots
Enginesim
Difficultyintermediate
Triggerchat
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerTeammate runs /flag <name> on|off in SlackSlack
  • ActionRead current flag state + owner from PostgresPostgreSQLPostgres
  • LogicRoute to flag owner for approval if not owner
  • ActionWrite new flag value to Postgres storePostgreSQLPostgres
  • ActionOpen GitHub PR recording the flag changeGitHubGitHub
  • OutputConfirm new state + audit PR link in SlackSlack

What it does

Lets engineers toggle feature flags from Slack without touching the config repo directly. `/flag checkout_v2 on` pings the registered owner of that flag for sign-off, then updates the flag's state in the Postgres flag store. To keep an immutable history, it opens a GitHub PR that edits the flags manifest with the new value and a description of who requested it.

When to use it

Use it when flag changes need to be fast but accountable — you want self-serve toggling in chat, but every flip should have an owner approval and a reviewable record in version control instead of an untracked live edit.

How it works

  1. 1Teammate runs `/flag <name> on|off` in Slack (trigger).
  2. 2The bot reads the flag's current state and owner from Postgres.
  3. 3If the requester is not the owner, it posts an approval prompt to the owner and waits.
  4. 4On approval, it writes the new flag value to the Postgres flag store.
  5. 5It opens a GitHub PR updating the flags manifest, citing requester, approver, and reason.
  6. 6It confirms in Slack with the flag's new state and a link to the audit PR.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect SlackChannels, DMs, threads, mentions.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect GitHubRepos, issues, pull requests, actions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.