Slack Huddle Bots Integration Guide

This guide walks you through integrating a Slack bot with Recall.ai to capture Slack Huddle data. You’ll set up a bot, configure webhooks, and activate it to join a Slack workspace and listen to huddles

Pre-requisites

  • Slack Workspace: A workspace where you have permission to invite bots
  • Domain: A custom domain or subdomain which will be added to Recall for us to read incoming emails to your Slack bot’s email (e.g., [email protected])

Overview - How It Works

This flow can be broken down into 4 parts:

  1. Your customer invites your Slack bot to their workspace using a dedicated bot email
  2. Recall receives the slack email invite and sends a webhook to your endpoint notifying you of the invite
  3. You activate the bot which gets it to joins your customer's Slack workspace
  4. Bot watches for huddles and joins automatically/by invite

Integration Steps

Step 1: Configure your webhook in your app

Add a webhook to your app to listen for events related to our new Slack integration. You can either:

  • Create a new webhook endpoint specifically for these events, or
  • Modify an existing webhook by adding the code snippet below.

Since all webhook events are sent to the endpoints configured in the Recall.ai dashboard, your webhook will automatically receive relevant Slack integration events.

const RECAL_DOMAIN = "https://us-east-1.recall.ai";

interface SlackTeamEvent {
  event: "slack_team.invited" | "slack_team.access_revoked";
  data: {
    slack_team: {
      id: string;
      metadata: object;
    };
  };
}

/**
 * Handles Slack webhook events.
 * @param slackEvent - The Slack event payload.
 */
const handleRecallWebhookEvent = async (slackEvent: SlackTeamEvent) => {
  const { event, data } = slackEvent;
  const slackTeamId = data.slack_team.id;

  switch (event) {
    case  "slack_team.invited": {
      // Send PATCH request to activate slack bot
      const recallApiUrl = `${RECAL_DOMAIN}/api/v2/slack-teams/${slackTeamId}/`;
      try {
        const response = await fetch(recallApiUrl, {
          method: "PATCH",
          headers: {
            Authorization: `Bearer ${process.env.RECALL_API_KEY}`,
            "Content-Type": "application/json",
          },
        });
        if (!response.ok) {
          throw new Error(
            `Failed to update Slack team: ${response.statusText}`
          );
        }
      } catch (error) {
        console.error("Error sending PATCH request:", error);
      }
      break;
    }

    case "slack_team.access_revoked": {
      // Send PATCH request to activate slack bot
      const recallApiUrl = `${RECAL_DOMAIN}/api/v2/slack-teams/${slackTeamId}/`;
      try {
        const response = await fetch(recallApiUrl, {
          method: "PATCH",
          headers: {
            Authorization: `Bearer ${process.env.RECALL_API_KEY}`,
            "Content-Type": "application/json",
          },
        });
        if (!response.ok) {
          throw new Error(
            `Failed to update Slack team: ${response.statusText}`
          );
        }
      } catch (error) {
        console.error("Error sending PATCH request:", error);
      }
      break;
    }
  }
};

// Webhook endpoint
app.post("/webhook", async (req: Request, res: Response) => {
  try {
    const slackEvent: SlackTeamEvent = req.body;
    await handleSlackEvent(slackEvent);
    res.status(200).send("Webhook received");
  } catch (error) {
    console.error("Error handling webhook:", error);
    res.status(500).send("Internal server error");
  }
});

Step 2: Register Your Webhook in the Dashboard

Regardless of whether you’re using an existing webhook or a new one, make sure the webhook endpoint URL is registered in the Recall dashboard. This ensures that Slack-related events are properly routed to your webhook

To do this, you can:

  • Go to the Recall.ai Dashboard -> Webhooks
  • Add your webhook URL endpoint (ex. https://example.com/api/webhooks/recallai)

📘

Tip for local development

When testing locally, use a local development tunnel like Ngrok to expose your local server for testing. Then add the ngrok link to the Recall webhooks dashboard

Step 3: Create the Email Inbox for Your Slack Bot

Once your DNS records are verified, the next step is to create an actual email inbox where Slack-related emails will be received

  1. Go to Your Domain's Email Provider
    • Log in to your email provider (e.g., Google Workspace, Zoho Mail, Microsoft 365)
  2. Create a New Email Address
    • Set up an inbox with your desired email address (e.g., [email protected])
    • Ensure this email is correctly routed and can receive messages
  3. Confirm the Inbox is Active
    • Send a test email to verify that messages are being received

Step 4: Configure DNS for Email Integration

Recall.ai needs permission to read emails sent to your bot's domain so that we can receive the Slack workspace invite emails. This requires setting up DNS records for your domain.

Set Up a Custom Email for Your Slack Bot

  1. Add Your Bot's Domain in the Recall.ai Dashboard
    • Navigate to the Recall.ai dashboard and enter your domain (e.g., yourdomain.com)
    • This allows Recall to generate the necessary DNS records for your domain (~10 minutes to generate the records)
  2. Retrieve the Generated DNS Records
    • Once the domain is added, Recall.ai will generate 5 DNS records (MX, TXT, etc.)
  3. Add the DNS Records to Your DNS Provider
    • Copy the generated records and add them to your DNS provider (e.g., Cloudflare, GoDaddy).
  4. Wait for DNS Verification
    • Once the records are added, Recall.ai will attempt to verify them (~1 hour for the records to propagate, set a low TTL)

Once verification is complete, Recall will be able to receive emails sent to your Slack bot's domain

Step 5: Invite the Email to Your Slack Workspace

Now that your email inbox is set up, you need to invite it to your Slack workspace:

  1. Send an Invite to the Bot Email
  2. For SSO-Enabled Workspaces
    • If your Slack workspace uses Single Sign-On (SSO), invite the bot as a guest user with limited channel access to every channel you want it to join
    • This ensures the bot can join without requiring full SSO authentication. Once invited, the bot will be able to participate in Slack channels and process messages as expected

What Happens Next?

Now that you’ve invited the bot to your Slack workspace, here’s what to expect:

  • Bot Activation (~15 Minutes)
    • The bot will take up to 15 minutes to join the workspace and come online
    • You’ll know it’s ready when you see the green online status on its profile picture
  • Inviting the Bot to Huddles
    • Once the bot is online, you can invite it to join Slack Huddles just like any other member
    • At this point, your Slack bot is fully integrated and ready to handle events within your workspace! 🚀

How to Get Meeting Data

Once the bot is online and joins Slack Huddles, Recall.ai will automatically send webhook events containing meeting data—just like it does for other meeting platforms.

Receiving Webhook Events

  • Webhook events will be sent to the endpoint(s) you configured earlier in the Recall.ai dashboard.

Handling Webhook Events

To process the incoming data:

  1. Listen for Incoming Events – Ensure your webhook endpoint is actively receiving and logging webhook events.
  2. Parse the Payload – The event format will match Recall.ai’s standard meeting event structure.
  3. Integrate with Your System – Store or process the meeting data as needed for your application.

📘

Retrying webhook events

You can retrigger webhook events directly from the recall webhooks dashboard

At this stage, your integration is fully functional, and your bot can collect meeting data from Slack Huddles seamlessly! 🎯