Mendloop Docs Request access

Slack

Approval requests with buttons, thread updates from triage to merge, and /mendloop commands.

Mendloop posts approval requests to a Slack channel with buttons: Approve, Request changes, Reassign and Not a bug. A click is recorded as that person's decision, exactly as if they had clicked in the web app, and the message updates to show who decided. Updates from the ticket, the pull request and the merge land in the same thread.

Mendloop only posts messages. It reads channel names, and member emails to match Slack people to Mendloop accounts. It never reads your conversations.

Choose how to connect#

Way For What it needs
Add to Slack (OAuth) Mendloop Cloud, or a shared server Nothing on the cloud. Self-hosted: the app's credentials in the server's environment and a public HTTPS address.
Connect with tokens (Socket Mode) Self-hosting and local testing Two tokens from your own Slack app, pasted in the web app. No public URL, no .env, no restart.

Add to Slack#

  1. In Mendloop, open Integrations → Slack → Add to Slack and approve the install in Slack.
  2. Choose the default channel for notifications and, optionally, a test channel for test mode. Invite the bot to private channels with /invite @Mendloop.
  3. The checks post a test message; click Confirm in it to finish.
  4. Each teammate links their own Slack account from Settings → Notifications, so approvals reach the right person. Accounts whose emails match are linked automatically.

Self-hosting with Add to Slack#

Slack calls the server for the install redirect and for every button click, so the server needs a public HTTPS address and your own Slack app.

  1. Print the app manifest with your public address filled in: mendloop slack manifest --base-url https://app.example.com, or open /api/v1/integrations/slack/manifest.
  2. Go to api.slack.com/apps → Create New App → From a manifest, pick your workspace, choose YAML, paste the manifest, then Next → Create. Don't install it from Slack's page; Mendloop installs it.
  3. From the app's Basic Information page, set these on the server and restart:
Variable Value
SLACK_CLIENT_ID From the app's Basic Information page
SLACK_CLIENT_SECRET From the app's Basic Information page
SLACK_SIGNING_SECRET From the app's Basic Information page
MENDLOOP_PUBLIC_API_URL An address Slack can reach, with nothing after the domain

Run mendloop doctor: the slack line should say ok credentials set; Slack calls https://…. It shows only whether each setting is set, never the values. Then connect from Integrations → Slack → Add to Slack.

Connect with tokens#

With Socket Mode, Mendloop keeps a connection open to Slack and button clicks come back through it, so Slack never has to reach your server.

  1. Create the app. On Integrations → Slack, choose Connect with tokens, then Copy manifest (or run mendloop slack manifest --socket). Go to api.slack.com/apps → Create New App → From a manifest, pick your workspace, choose YAML, paste it, then Next → Create. The manifest sets the bot's permissions, the /mendloop command, and turns on Socket Mode and Interactivity.
  2. Generate the app-level token. On the app's Basic Information page, under App-Level Tokens, choose Generate Token and Scopes, name it mendloop, add the connections:write scope and Generate. It starts with xapp-.
  3. Install the app. Open OAuth & Permissions → Install to Workspace → Allow and copy the Bot User OAuth Token. It starts with xoxb-.
  4. Paste both into Mendloop (App-Level Token and Bot User OAuth Token) and choose Connect. Mendloop encrypts them and from then on shows only their last 4 characters.
  5. Pick a channel, and optionally a test channel, then choose Save and run checks. For a private channel, type /invite @Mendloop in it first, then Reload channels.

You can also paste a bot token (xoxb-…) and the signing secret by hand.

The worker holds the Socket Mode connection. It picks up a new connection within 15 seconds and reconnects by itself when Slack drops it.

The checks#

  • Bot token is valid
  • App-level token works and Socket Mode is on (tokens only)
  • Scopes granted
  • The bot can see the channel
  • Post a test message to the channel
  • Click Confirm in the test message: open Slack and click Confirm in the message Mendloop just posted. It turns green within a second or two.

Try it#

Under Try it, Send test message posts a plain message, and Send test approval posts a sample approval request (clearly labelled as a test; no code changes) with its buttons. Click Approve in Slack: the message updates to say you approved it, and Approvals in Mendloop shows the decision with the channel "Slack". Request changes and Reassign open a small form in Slack first.

In test mode, posts go only to the test channel. With no test channel, the test approval is recorded as simulated and nothing is sent to Slack.

Scopes#

chat:write, chat:write.public, commands, im:write, users:read, users:read.email, channels:read, groups:read. The app-level token for Socket Mode needs connections:write.

A channel id starts with C and is at the bottom of the channel's About tab.

Troubleshooting#

You see Do this
"Paste the Bot User OAuth Token, which starts with xoxb-" The two boxes may be swapped, or you copied the User OAuth Token (xoxp-). Copy the Bot User OAuth Token from OAuth & Permissions.
"Paste the App-Level Token, which starts with xapp-" Generate one under Basic Information → App-Level Tokens. The Client Secret and Signing Secret are not tokens.
"This app-level token is missing the connections:write scope" Generate a new app-level token with connections:write and paste it again.
"Socket Mode is off for this app" Switch on Settings → Socket Mode in the Slack app, then Run checks again.
"Slack didn't accept the bot token (invalid_auth)" Reinstalling the app gives it a new bot token. Copy the current one from OAuth & Permissions.
Click Confirm stays waiting Check the worker is running, that Interactivity & Shortcuts is on, and that both tokens come from the same Slack app.
channel_not_found, or "isn't in the private channel" Type /invite @Mendloop in the channel, then Run checks again.
Clicking Approve says "link your account" That Slack person isn't matched to a Mendloop member. They follow the link in the message, or type /mendloop link.
Slack shows an error after Approve The clicker's role can't approve (Viewers can't), or the approval policy needs someone else.
"Slack credentials are not set on the server" One of the SLACK_* values is missing, or the API wasn't restarted. Run mendloop doctor, or use Connect with tokens.
redirect_uri did not match The app's redirect URL and MENDLOOP_PUBLIC_API_URL differ. Print the manifest again, paste it under the app's App Manifest page, update the setting, restart.
"The Slack signature is not valid" in the API log SLACK_SIGNING_SECRET doesn't match the app's Signing Secret (not the Client Secret, not the Verification Token). Also check the server's clock.
The install link expired or was already used Each install link works once, for 10 minutes. Choose Add to Slack again.

To change the tokens later, paste new ones on the same page for the same workspace: the connection and its channels are kept.