🎉 Pipedream raises $20M Series A 🎉
Read the blog post and TC Techcrunch article.
← Zoom Admin

Changes to Webinar Panelists from Zoom Admin API

Pipedream makes it easy to connect APIs for Zoom Admin and 700+ other apps remarkably fast.

Trigger workflow on
Changes to Webinar Panelists from the Zoom Admin API
Next, do this
Connect to 700+ APIs using code and no-code building blocks
No credit card required
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Trigger a workflow on Changes to Webinar Panelists with Zoom Admin API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Changes to Webinar Panelists trigger
    1. Connect your Zoom Admin account
    2. Optional- Select one or more Webinar
    3. Configure timer
  2. Add steps to connect to 700+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Changes to Webinar Panelists on Zoom Admin
Description:Emit new event every time a panelist is added or removed from a webinar, or any time their details change
Version:0.0.3
Key:zoom_admin-webinar-changes-to-panelists

Code

import crypto from "crypto";
import difference from "lodash/difference.js";
import zoomAdmin from "../../zoom_admin.app.mjs";
import { sanitizedArray } from "../../utils.mjs";

export default {
  type: "source",
  name: "Changes to Webinar Panelists",
  key: "zoom_admin-webinar-changes-to-panelists",
  version: "0.0.3",
  description: "Emit new event every time a panelist is added or removed from a webinar, or any time their details change",
  dedupe: "unique",
  props: {
    zoomAdmin,
    webinars: {
      propDefinition: [
        zoomAdmin,
        "webinar",
      ],
      type: "string[]",
      description: "Webinars you want to watch for new events. **Leave blank to watch all webinars**.",
    },
    db: "$.service.db",
    timer: {
      type: "$.interface.timer",
      default: {
        intervalSeconds: 60 * 15,
      },
    },
  },
  hooks: {
    async deploy() {
      // Fetch and emit sample events
      await this.fetchAndEmitParticipants();
    },
  },
  methods: {
    generateMeta(eventType, panelist) {
      const {
        id: panelistID,
        email,
        name,
      } = panelist;
      const summary = name
        ? `${eventType} - ${name} - ${email}`
        : `${eventType} - ${email}`;
      return {
        id: `${panelistID}-${eventType}`,
        summary,
      };
    },
    hash(str) {
      return crypto.createHash("sha256").update(str)
        .digest("hex");
    },
    async fetchAndEmitParticipants() {
      // This endpoint allows for no time filter, so we fetch all participants from
      // all configured webinars and let the deduper handle duplicates
      const webinars = sanitizedArray(this.webinars || []);
      if (!this.webinars || !this.webinars.length) {
        let nextPageToken;
        do {
          const resp = await this.zoomAdmin.listWebinars({
            nextPageToken,
          });
          for (const webinar of resp.webinars) {
            webinars.push(webinar.id);
          }
          nextPageToken = resp.next_page_token;
        } while (nextPageToken);
      }

      for (const webinarID of webinars) {
        const { panelists } = await this.zoomAdmin.listWebinarPanelists(
          webinarID,
        );
        // We keep a DB key for each webinar, which contains an object
        // of panelists with the content of the panelist metadata,
        // to support change detection.
        const oldPanelists = this.db.get(webinarID) || {};
        const oldPanelistIDs = Object.keys(oldPanelists);
        const newPanelistIDs = panelists.map((p) => p.id);

        // DELETED PANELISTS
        const deletedPanelistIDs = difference(oldPanelistIDs, newPanelistIDs);

        let eventType = "panelist.deleted";
        for (const panelistID of deletedPanelistIDs) {
          const panelist = oldPanelists[panelistID];
          this.$emit(
            {
              eventType,
              ...panelist,
              webinarID,
            },
            this.generateMeta(eventType, panelist),
          );
        }

        // ADDED PANELISTS
        const addedPanelistIDs = difference(newPanelistIDs, oldPanelistIDs);

        const newPanelists = {};
        for (const panelist of panelists) {
          newPanelists[panelist.id] = panelist;
          if (addedPanelistIDs.includes(panelist.id)) {
            eventType = "panelist.added";
            this.$emit(
              {
                eventType,
                ...panelist,
                webinarID,
              },
              this.generateMeta(eventType, panelist),
            );
          }
          if (
            panelist.id in oldPanelists &&
            this.hash(JSON.stringify(panelist)) !==
              this.hash(JSON.stringify(oldPanelists[panelist.id]))
          ) {
            eventType = "panelist.changed";
            this.$emit(
              {
                eventType,
                ...panelist,
                webinarID,
              },
              this.generateMeta(eventType, panelist),
            );
          }
        }

        this.db.set(webinarID, newPanelists);
      }
    },
  },
  async run() {
    await this.fetchAndEmitParticipants();
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Zoom AdminzoomAdminappThis component uses the Zoom Admin app.
Webinarwebinarsstring[]Select a value from the drop down menu.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
timer$.interface.timer

Authentication

Zoom Admin uses OAuth authentication. When you connect your Zoom Admin account, Pipedream will open a popup window where you can sign into Zoom Admin and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Zoom Admin API.

Pipedream requests the following authorization scopes when you connect your account:

About Zoom Admin

Video conferencing (includes account-level scopes)

About Pipedream

Stop writing boilerplate code, struggling with authentication and managing infrastructure. Start connecting APIs with code-level control when you need it — and no code when you don't.

Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
"The past few weeks, I truly feel like the clichéd 10x engineer."
@heyellieday