Skip to main content
The GTM Feedback Slack app enables your team to capture customer feedback directly from Slack conversations using reactions, commands, and an AI assistant.

Features

Reaction Capture

React to messages with :gtm-feedback: to save them as feedback

AI Assistant

Chat with the feedback bot to query and manage feedback

Slash Commands

Quick commands for creating and searching feedback

Weekly Digests

Automated summaries of feedback trends

Prerequisites

You must deploy the web app first before setting up the Slack integration.

Deployment Steps

1

Create Slack App

  1. Go to api.slack.com/apps
  2. Click Create New AppFrom a manifest
  3. Select your workspace
  4. Copy the contents of manifest.json from the repository
  5. Paste into the manifest editor and create the app
The manifest file is located at apps/slack-app/manifest.json in the repository.
2

Gather Slack Credentials

After creating your app, collect these credentials:
  1. Navigate to Basic InformationApp Credentials
  2. Copy the Signing Secret
  3. Save as SLACK_SIGNING_SECRET
  1. Navigate to OAuth & Permissions
  2. Click Install to Workspace if not already installed
  3. Copy the Bot User OAuth Token (starts with xoxb-)
  4. Save as SLACK_BOT_TOKEN
Generate a random secure string to share between Slack app and web app:
openssl rand -base64 32
Save this as SLACK_APP_VERIFICATION in both apps.
3

Deploy to Vercel

Click the deploy button below and enter your Slack credentials:

Deploy Slack App

One-click deploy to Vercel
Or deploy manually:
  1. Fork the repository
  2. Create new Vercel project
  3. Set root directory to apps/slack-app
  4. Add environment variables (see Environment Variables)
  5. Deploy
4

Update Slack App URLs

After deployment, configure your Slack app to use your Vercel URL:
  1. Go to api.slack.com/apps and select your app
  2. Navigate to Event Subscriptions:
    • Enable Events
    • Set Request URL to: https://your-slack-app.vercel.app/api/slack/events
    • Wait for verification (should show “Verified”)
  3. Navigate to Interactivity & Shortcuts:
    • Enable Interactivity
    • Set Request URL to: https://your-slack-app.vercel.app/api/slack/events
  4. Save changes
The Request URLs must be verified (show a green checkmark) for the app to work correctly.
5

Add Custom Emoji

Add the :gtm-feedback: custom emoji to your Slack workspace:
  1. Go to your workspace settings → CustomizeEmoji
  2. Click Add Custom Emoji
  3. Upload an image (or use an existing emoji)
  4. Name it exactly: gtm-feedback
  5. Save
Choose an emoji that’s easy to recognize, like a lightbulb or megaphone. Team members will use this to flag feedback in conversations.
6

Connect to Web App

Update your web app’s environment variables to enable Slack integration:
  1. Go to your web app’s Vercel project settings
  2. Add the following environment variables:
    • SLACK_BOT_TOKEN - Your bot token (from Step 2)
    • SLACK_APP_VERIFICATION - Your shared secret (from Step 2)
    • SLACK_DIGEST_CHANNEL_ID - Channel ID for weekly digests (optional)
    • SLACK_GTM_FEEDBACK_CHANNEL_ID - Channel ID for feedback notifications (optional)
  3. Redeploy the web app
  1. Open Slack in a browser
  2. Navigate to the desired channel
  3. The URL will contain the channel ID: https://app.slack.com/client/T.../C...
  4. Copy the ID starting with C

Testing the Integration

1

Add App to Channel

  1. Go to any Slack channel
  2. Type /invite @GTM Feedback (or your app name)
  3. The bot should join the channel
2

Test Reaction Capture

  1. Find a message in the channel
  2. React with :gtm-feedback:
  3. A modal should appear to capture feedback details
  4. Submit and verify it appears in your web app
3

Test AI Assistant

  1. Send a direct message to the GTM Feedback bot
  2. Try asking: “Show me recent feedback”
  3. The bot should respond with feedback data

Local Development

To develop the Slack app locally:
1

Install Dependencies

pnpm install
2

Set Up Environment

cp apps/slack-app/.env.example apps/slack-app/.env
Fill in your Slack credentials from api.slack.com/apps.
3

Link to Slack App

slack app link
  • Select “yes” to update manifest source to remote
  • Enter your App ID
  • Select “Local” environment
4

Start Dev Server

slack run
This starts the server with automatic tunneling to Slack.

Project Structure

The Slack app is organized as follows:
apps/slack-app/
├── server/
│   ├── app.ts                    # Bolt app initialization
│   ├── api/slack/events.post.ts  # Event handler endpoint
│   ├── lib/
│   │   ├── ai/                   # AI assistant logic
│   │   └── slack/                # Slack utilities
│   └── listeners/
│       ├── actions/              # Button click handlers
│       ├── commands/             # Slash command handlers
│       ├── events/               # Reaction & mention handlers
│       ├── messages/             # Direct message handlers
│       ├── shortcuts/            # Global shortcut handlers
│       └── views/                # Modal submission handlers
└── manifest.json                 # Slack app manifest

Troubleshooting

  • Ensure your Vercel deployment is successful and accessible
  • Check that SLACK_SIGNING_SECRET is correctly set in Vercel
  • Verify the URL ends with /api/slack/events
  • Check Vercel function logs for errors
  • Verify the emoji is named exactly gtm-feedback
  • Check that Event Subscriptions are enabled and verified
  • Ensure the bot is added to the channel
  • Check Vercel logs for event processing errors
  • Verify SLACK_BOT_TOKEN is correctly set
  • Check bot token scopes in Slack app settings
  • Ensure Interactivity is enabled and URL is verified
  • Check for errors in Vercel function logs
  • Verify SLACK_APP_VERIFICATION matches in both apps
  • Check that web app SLACK_BOT_TOKEN is set
  • Verify database connection in web app
  • Check web app logs for API errors

Next Steps

Environment Variables

Complete Slack configuration reference

Slack Integration Guide

Learn how to use Slack features

Build docs developers (and LLMs) love