Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/formbricks/formbricks/llms.txt

Use this file to discover all available pages before exploring further.

The Slack integration allows you to automatically post survey responses to Slack channels as they arrive. Perfect for keeping your team informed about customer feedback, NPS scores, or any other survey insights.

What Gets Synced

When a user completes a linked survey, Formbricks sends a formatted message to your Slack channel containing:
  • Survey name
  • Selected question responses
  • Timestamp of submission
Each response appears as a structured message with clear formatting for easy reading.

Setup for Formbricks Cloud

1

Navigate to Integrations

In your Formbricks dashboard, click Configuration in the sidebar, then go to Integrations and click Connect under the Slack card.Formbricks Integrations Tab
2

Connect with Slack

Click the Connect with Slack button to start the OAuth flow.Connect Formbricks with your Slack Workspace
3

Authorize Formbricks

You’ll be redirected to Slack’s OAuth page. Select your workspace and click Allow to grant permissions.Slack OAuth Page
4

Confirm Connection

After authorization, you’ll return to Formbricks and see a connected status.Formbricks is now connected with Slack
5

Add Formbricks Bot to Channel

Before linking a channel, you must add the Formbricks bot:
  1. Go to your target Slack channel
  2. Click the three dots at the top right
  3. Select Edit Settings > Integrations
  4. Click Add apps
  5. Search for “Formbricks” and add the bot Add Slack Bot Steps
6

Link Channel to Survey

Back in Formbricks, click Link Channel. A modal will open.Link Formbricks with a Slack Channel
7

Configure Question Mapping

Select:
  • The Slack channel to post to
  • The survey to monitor
  • Which question responses to include
Then click Link Channel.Select question to link with Slack Channel
8

Verify Setup

You’ll see your linked channel in the list. Responses will now automatically post to Slack!List of linked Slack Channels

Self-Hosted Setup

To enable Slack integration on a self-hosted instance:
HTTPS Required: Slack OAuth requires HTTPS. If running locally, use the --experimental-https flag:
package.json
"go": "next dev --experimental-https -p 3000"
Update WEBAPP_URL in your .env to https://localhost:3000 and run your terminal as admin.
1

Create Slack App

  1. Go to Slack API: Your Apps
  2. Click Create New App > From Scratch
  3. Provide an app name and select your workspace
2

Configure Scopes

Under OAuth & Permissions, add these Bot Token Scopes:
  • channels:read
  • groups:read
  • chat:write
  • chat:write.public
  • chat:write.customize
3

Set Redirect URI

Under OAuth & Permissions > Redirect URLs, add:
https://<your-domain>/api/v1/integrations/slack/callback
For local development: https://localhost:3000/api/v1/integrations/slack/callback
4

Install App

Click Install to Workspace and allow the requested permissions.
5

Copy Credentials

Go to Basic Information and copy:
  • Client ID
  • Client Secret
6

Configure Environment Variables

Add to your Formbricks .env file:
SLACK_CLIENT_ID=<your-client-id>
SLACK_CLIENT_SECRET=<your-client-secret>
7

Enable Public Distribution

  1. Go to Basic Information > Manage distribution
  2. Complete the checklist
  3. Click Activate public distribution
Once configured, follow the Cloud setup steps to link channels.

Message Format

Slack messages are formatted using blocks for readability:
{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "Customer Satisfaction Survey\n"
      }
    },
    {
      "type": "divider"
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*How satisfied are you?*"
      }
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "Very satisfied\n"
      }
    }
  ]
}
Messages are automatically truncated if they exceed Slack’s message limit.

API Implementation

The integration uses Slack’s Web API:
  • Fetch Channels: GET https://slack.com/api/users.conversations
  • Post Message: POST https://slack.com/api/chat.postMessage
Messages are sent via apps/web/lib/slack/service.ts:writeDataToSlack() whenever a response is submitted for a linked survey.

Remove Integration

1

Open Integrations

Go to Configuration > Integrations
2

Manage Slack

Click Manage on the Slack card
3

Delete

Click Delete Integration and confirm
Delete Slack Integration

Troubleshooting

Ensure the Formbricks bot has been added to the channel (see Step 5 in setup).
  • Verify the bot has chat:write and chat:write.public permissions
  • Check that the survey is linked to the correct channel
  • Ensure the survey has at least one question mapped
If you see a token expiration error, disconnect and reconnect the integration to refresh the OAuth token.
Need more help? Join our GitHub Discussions!