ruben-burr / zoom-slack-status-updater

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 ZEIT account

First, make sure you have now and all dependencies installed.

npm install -g now
yarn # or npm i

Setup & Deployment

Step 1 - Setup now.sh

  1. Create a ZEIT account
  2. Run now login (login with your ZEIT account) in your terminal

Step 2 - Setup Slack

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

Create Webhook Only Zoom App

Step 3 - Configure App

  1. Duplicate the example config and rename it to slack-status-config.js. This should happen automatically thanks to a postinstall script.
  2. Create a config object for each slack workspace you want to update when a Zoom meeting starts.

You can either use now secret for the token values, or copy the token string right into the workspace config. I used the secret option described below:

now secrets

When working with now secret you need to do the following for each secret (aka Slack app token):

Step 1 - create a secret

now secret add SLACK_TOKEN_1 "xoxp-xxx-xxx"

Step 2 - add the secret to now.json

  "env": {
    "SLACK_TOKEN_1": "@slack_token_1"
  }

Step 3 - add process.env.<secret name> to your configuration file

  {
    name: 'Slack Workspace 1',
    token: process.env.SLACK_TOKEN_1,
    ...
  }

Example configuration

You can add as many slack workspaces as you want here, just make sure you have created an app for each of them.

module.exports = [
  {
    // this name can be anything and is only for you, it is not used in the app
    name: 'Slack Workspace 1',
    // either copy & paste the token string here or use
    // process.env.SLACK_TOKEN_1 (now secret add SLACK_TOKEN_1 "xoxp-xxx-xxx")
    token: 'xoxp-xxx-xxx',
    meetingStatus: {
      text: "I'm in a meeting",
      emoji: ':warning:', // emoji code
    },
    noMeetingStatus: {
      text: '',
      emoji: '',
    },
  },
]

Step 4 - Deploy App to now.sh

# 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? ./
now

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

Tip: Do not use an obvious name for your now.sh URL here, something random or other people could mess with your Slack status. 😆

Step 5 - 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 and the generated now.sh domain for Event notification endpoint URL.

Setup Zoom App

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

Step 6 - Test :)

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

now commands

# deploy to now
now

# remove previous deployments from now.sh
now your-app --safe --yes
# deploy and remove previous builds
now && now rm your-app --safe --yes

# list all deployments
now ls

Other solutions

References

License

MIT

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Stefan Natter

🤔 💻

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

About

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

License:MIT License


Languages

Language:JavaScript 100.0%