Tutorials

How to build a Zoom bot: A guide for developers

Amanda Zhu

April 7, 2023

Introduction

With the leaps in generative AI, conversation data has become more usable than ever before. This has opened up a world of possibilities for meeting data, which can now be analyzed and transformed into valuable insights. The simplest way to access this data is by using a bot that joins the video call. You may have seen tools like Gong or Otter use this method. Unfortunately, many video call platforms, including Zoom, do not have a native bot API. However, you have three other options:

  1. Build the Zoom bot from scratch
  2. Use an open source Zoom bot repository as a starting point
  3. Use Recall.ai, a third-party meeting bot API.

Before we discuss how to build the Zoom bot, let's weigh the pros and cons of each option.

Pros and Cons

Option 1: Build the Zoom bot from scratch

  • Pros: You have full control over the bot and can add features at your own pace.
  • Cons: It takes several months to build the infrastructure for the bot. It drains significant engineering resources to maintain and operate the infrastructure for the bot after it is built. Complexity increases if more platforms are added. (eg. Google Meet, Microsoft Teams, etc).

Option 2: Use an open source Zoom bot repository as a starting point

  • Pros: It's faster to get started than building from scratch.
  • Cons: There are no maintained repositories. The code may not work and may not be ready for production. You are fully responsible for the maintenance and operation burden of the infrastructure.

Option 3: Use Recall.ai, a third party API for Zoom bots

  • Pros: Building, maintenance, and infrastructure are fully abstracted away, so you can quickly go to market and focus on your core product instead of building video call bots.
  • Cons: Reliance on a third-party API may come with platform risks.

In this Zoom bot guide, we’ll be using the third option, Recall.ai. The bot will join a Zoom meeting and produce a video recording at the end of the meeting.

Prerequisites

  • A Recall.ai API key. If you don’t have one, you can get an API key here.
  • Your terminal of choice to send HTTP requests.

Sending a bot to your video call

To send a bot to your video call, open up your terminal and use the Recall.ai Create Bot API endpoint. Copy and paste the following request:


curl -X POST https://api.recall.ai/api/v1/bot \
     -H 'Authorization: Token {{YOUR-TOKEN}}' \
     -H 'Content-Type: application/json' \
     -d '{"meeting_url": "{{MEETING-URL}}", \
          "bot_name": "Bot"}'

Put your Recall API key where it says `YOUR-TOKEN` and a Zoom meeting URL where it says `MEETING-URL`. Then, send the request. When you send the request, the bot should join your meeting in less than 5 seconds. You will get a response that looks like this:

{
    "id": "5983dea-a137-4b35-995c-gec5812c8d",
    "video_url": null,
    "status_changes": [
        {
            "code": "ready",
            "message": null,
            "created_at": "2023-04-07T18:59:40.391872Z"
        }
    ],
    "meeting_metadata": null,
    "meeting_participants": [],
    "speaker_timeline": {
        "timeline": []
    },
    "calendar_meeting_id": null,
    "calendar_user_id": null,
    "calendar_meetings": []
}

Note the `id` in the first line. This is the bot id. **Save it - we’ll need it in the next step.**

Retrieving the video recording

To get the video recording, end the meeting. The bot will leave automatically. Then, make this request:


curl -X GET https://api.recall.ai/api/v1/bot/{{BOT-ID}} \
     -H 'Authorization: Token {{YOUR-TOKEN}}'

Replace `BOT-ID` with your bot's id, and `YOUR-TOKEN` with your Recall API key. Once you send the request, you'll get a response that looks like this:

{
    "id": "5983dea-a137-4b35-995c-gec5812c8d",
    "video_url": "https://recallai-prod-bot-data.s3.amazonaws.com/5603dea6-b633-4b35-995c-f5ec5415c8d9/video.mp4?AWSAccessKeyId=ASIAVO7R4VZXGRMCWGEG&Signature=MAcf%2BT60SRkLWsJGpCQFByiWUIk%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEPb%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLWVhc3QtMSJHMEUCIAng4YEGGZ9OK804stMvVIp2AJTyBXshfAWnv9Hi7OQmcZSaIE3h8A36mZCNMRwi%2B6sixPO8%2BJ3izmtAwghcLnZLdK4v1xLhpWik0h8e1RVA2hb4t9KFmPKvAxecXc2KCONPYpUvF1V1KSmJzvYOBmcqAt7nKWZMjMWVW6C%2FcQPMo6tm65BlUdO8bSYpa6Wjs2CqfmytFpxxEr5RrFAG1NkMAKDZXvhcukjZfrJsC%2BppCOviIEGocdb6CtJTJrwFvuZ8DzRPmDiPemF2KLP2SA7nSiZH0UYgBmhokDT8Cjlc0B13Edf%2BrfH8xr8RlA5vFHKULYwi4O6Ls4YDD%2B7dMeDLjxC&Expires=1680203740",
    "media_retention_end": "2023-04-14T19:15:38.453951Z",
    "status_changes": [
        {
            "code": "ready",
            "message": null,
            "created_at": "2023-03-23T18:59:40.391872Z"
        },
        {
            "code": "joining_call",
            "message": null,
            "created_at": "2023-03-23T19:05:33.221294Z"
        },
        {
            "code": "in_waiting_room",
            "message": null,
            "created_at": "2023-03-23T19:05:36.773949Z"
        },
        {
            "code": "in_call_not_recording",
            "message": null,
            "created_at": "2023-03-23T19:05:46.118246Z"
        },
        {
            "code": "in_call_recording",
            "message": null,
            "created_at": "2023-03-23T19:05:46.129127Z"
        },
        {
            "code": "call_ended",
            "message": null,
            "created_at": "2023-03-23T19:15:34.127658Z"
        },
        {
            "code": "done",
            "message": null,
            "created_at": "2023-03-23T19:15:38.453951Z"
        }
    ],
    "meeting_metadata": {
        "title": "Amanda's Personal Meeting Room"
    },
    "meeting_participants": [
        {
            "id": 16778240,
            "name": "Amanda",
            "events": [
                {
                    "code": "join",
                    "created_at": "2023-03-23T19:05:40.196603Z"
                }
            ]
        }
    ],
    "calendar_meeting_id": null,
    "calendar_user_id": null,
    "calendar_meetings": []
}

Note the `video_url` key that has a link to an MP4 file. This is the recording of the meeting with both video and audio.

Summary

We’ve just created a Zoom bot with the Recall.ai bot API in just a few lines of code. This bot will work on other video call platforms beyond Zoom such as Google Meet, Microsoft Teams, Webex and more!