Slack Integration

Set up HookWatch to receive Slack webhooks for workspace events like messages, reactions, channel updates, and app interactions.

Prerequisites

Step 1: Create a HookWatch endpoint

  1. Go to your Endpoints page
  2. Click "Create Endpoint"
  3. Enter a name like "Slack Webhooks"
  4. Enter your destination URL (where you want webhooks forwarded)
  5. Copy the generated webhook URL

Your HookWatch URL will look like:

https://hook.hookwatch.dev/wh/abc123xyz

Step 2: Configure Slack Event Subscriptions

  1. Go to Slack API > Your Apps
  2. Select your app (or create a new one)
  3. Click "Event Subscriptions" in the sidebar
  4. Toggle "Enable Events" to On
  5. Paste your HookWatch URL in the "Request URL" field
  6. Under "Subscribe to bot events", add the events you want
  7. Click "Save Changes"

Common events to subscribe to:

message.channels
message.groups
message.im
reaction_added
app_mention
member_joined_channel
channel_created
file_shared

Step 3: Verify webhooks on your server

Slack signs webhook payloads using HMAC-SHA256. HookWatch forwards the X-Slack-Signature and X-Slack-Request-Timestamp headers so you can verify authenticity.

You'll find your signing secret in your app's Basic Information > App Credentials section.

Node.js / Express

Slack webhook headers

HookWatch forwards all Slack headers. Here are the important ones:

HeaderDescription
X-Slack-SignatureHMAC-SHA256 signature for verification
X-Slack-Request-TimestampUnix timestamp of the request
Content-TypeAlways application/json for Event Subscriptions

URL Verification

When you first set the Request URL, Slack sends a url_verification challenge. Your server must respond with the challenge value. Make sure your forwarding destination handles this before configuring the URL in Slack.

Testing the integration

  1. Send a message in a channel your bot is in
  2. Mention your app with @YourApp
  3. Add a reaction to a message
  4. Check your HookWatch Events page to see the events

Common issues

URL verification fails

Make sure your destination server responds to the url_verification challenge within 3 seconds. Slack requires an immediate response with the challenge token.

Not receiving events

Check that your bot has been invited to the channels you want to monitor. Bot events only fire for channels where the bot is a member.

Duplicate events

Slack may retry events if it doesn't receive a 200 response within 3 seconds. Use the event_id field to deduplicate on your server.