Skip to content

Update your Slack status automatically when you join a Zoom meeting.

License

Notifications You must be signed in to change notification settings

natterstefan/zoom-slack-status-updater

Repository files navigation

Zoom Slack Status Updater

now GitHub release (latest SemVer including pre-releases) GitHub

Build Status Coverage Status

Update your Slack status automatically when you join a Zoom meeting.

Requirements

  • a Zoom App
  • a Slack App
  • and a Vercel account

Development

Installation

Make sure you have vercel and all dependencies installed.

npm i -g vercel@latest
yarn install # or npm install

Tests

yarn test

Setup

Step 1 - Setup Vercel

  1. Create a vercel account
  2. Run vercel login (login with your vercel account) in your terminal
  3. Create a project (either in the Browser) or with the CLI (see Step 5 below).

Step 2 - Setup Slack

  1. Create a Slack App for your workspace(s)
  2. Grant each Slack app the users.profile:write and dnd:write privilege in User Token Scopes in the OAuth & Permissions view, before clicking on the "Install App" button.
  3. Copy and paste each Slack app's OAuth Access Token into the configuration file created in the subsequent step.

Create Webhook Only Zoom App

Step 3 - Configure Zoom-Slack-Status-Updater App

  1. Duplicate slack-status-config-example.js and rename it to slack-status-config.js. Do the same with .env.example and rename it to .env. This should happen automatically thanks to a postinstall script.
  2. Now you have to create a config object for each slack workspace you want to update when a Zoom meeting starts. In the next step you will get to know how to add environment variables (for your tokens)

Environment Variables

Do not copy and paste your Slack app and other tokens into the slack-status-config.js directly. Instead set up environment variables on Vercel.

  • Step 1 - Open the Project Settings of your Vercel app and select "Environment Variables".
  • Step 2 - Choose between a Plaintext or Secret for the tokens. I recommend you set up and use Secret. Because they are encrypted. Remember the name of the Environment variable and add it to the respective workspace in the configuration file.
  • Step 3 - Now add the Environment variable (e.g. process.env.<enviroment variable name>) to your configuration file
  {
    name: 'Slack Workspace 1',
    token: process.env.SLACK_TOKEN,
    // see Step 6 for more details about how to obtain this token
    zoomVerificationToken: process.env.VERIFICATION_TOKEN,
    // other configuration settings
  }

Example configuration

You can add as many Slack workspaces as you want here, just make sure you have created a Slack app for each workspace.

Here ist the example configuration.

Step 5 - Deploy App to Vercel

# example questions when setting up the now project for the first time
# What’s your project’s name? your-app-name
# In which directory is your code located? ./
vercel

This will guide you through the process of creating and deploying the project. Remember the created Deployment URL. You are going to need it in the next step for the ZOOM app.

You find the deployment URL in your Project under the "Deployments" tab (example URL: https://vercel.com/username/projectname/deployments) or in the "Settings" tab and then "Domains" (https://vercel.com/username/projectname/settings/domains)).

Make sure you select the one that looks like: https://projectname.now.sh/, whereas projectname is the name of your project. This will point to the latest deployed version of your app. If you choose another URL you would need to update Zoom (see Step 6) after each deployment.

Step 6 - Setup Zoom

Create Webhook Only Zoom App

Create a new (or use an existing) "Webhook Only" Zoom app with your Zoom account. Even if you added multiple Slack workspaces, you just need one Zoom app.

Fill out the required information and activate Event Subscriptions. Add the User’s presence status has been updated event type. Once you have deployed the app to now.sh (in a later step) you can add the Event notification endpoint URL.

The Verification Token is also visible on this page, you need to add this to the app configuration in the next step.

Setup Zoom App

You can read more about it setting up the App here.

Add the generated vercel URL from Step 5 as your Event notification endpoint URL.

Setup Zoom App

A verification token will be generated in the Feature page after you enable and save the event subscription. This token can be used to validate the POST requests that are sent by Zoom to your event notification endpoint URL. (source)

Get this verification token and add it to the configuration file, see Step 3.

Step 7 - Run and Test

Now, open both Zoom and Slack and watch the status change when you start or join a meeting.

You do not need a second account for that. Open Zoom, start a new meeting and you should see the new status on Slack.

vercel commands

# deploy to vercel
vercel

# remove previous deployments
vercel your-app --safe --yes
# deploy and remove previous builds
vercel && vercel rm your-app --safe --yes

# list all deployments
vercel ls

Other solutions

References

License

MIT

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Stefan Natter

🤔 💻

Ruben Burr

💻

This project follows the all-contributors specification. Contributions of any kind welcome!