A Python script to auto join your zoom meetings

A python script to help auto join your zoom meetings if you forget!

VISUALS

Meetings! Aww, the good old days. I remember the days when I was working in the lab and a colleague asking me 'are you joining the meeting?'. Oh yeah, I totally forgot, let's go.

But since we have moved online and working from home, your colleague/friend is not around you to remind you IF YOU FORGET TO JOIN A MEETING. For this reason, I wrote the following python script to auto join your zoom meeting. Of course, you can add reminders to your phone, but if you would like to work keeping your phone away, this script will be of great help. (Also, what's the point of being a nerd if you won't exploit tech!)

Here is the idea of the python script

  1. Take zoom link, meeting date, meeting time as arguments
  2. Sleep until the meeting time since the execution
  3. Open the zoom link on time in chrome and open zoom app
  4. Maximize zoom app window and mute yourself

First import requied modules. In the following only pyautogui and click (for command line version) needs to be installed separately, rest come by default with python. pyautogui helps controlling mouse, keyboard from within python.

import pyautogui as pyg
import webbrowser as wb
import datetime
import time
import click

Following are the helper functions to convert human readable date, time formats to python interpretable format.

# functions to format date, time
def format_date(x):
    date_list = x.split(sep="-")
    return list(map(int, date_list))

def format_time(x):
    time_list = x.split(sep="-")
    return list(map(int, time_list))

def given_datetime(given_date, given_time):

    # YY, MM, DD, HH, MM
    return datetime.datetime(given_date[2], given_date[1], given_date[0], given_time[0], given_time[1], given_time[2])

Following is the core of the script to join the meeting. All steps from 1-4 from above are performed here.

# join the meeting
def join_meeting(zoom_link, meeting_date, meeting_time):

    meeting_date_x = format_date(meeting_date)
    meeting_time_x = format_time(meeting_time)
    required_datetime = given_datetime(meeting_date_x, meeting_time_x)

    # time difference between current and meeting time
    wait_time_sec = (required_datetime - datetime.datetime.now().replace(microsecond=0)).total_seconds()
    print("Your ZOOM meeting starts in " + str(wait_time_sec/60) + " min")
    time.sleep(wait_time_sec)

    # zoom app related
    wb.get(using='chrome').open(zoom_link, new=2) #open zoom link in a new window
    time.sleep(5) # given time for the link to show app top-up window
    pyg.click(x=805, y=254, clicks=1, interval=0, button='left') # click on open zoom.app option
    time.sleep(10) # wait for 10 sec
    pyg.click(x=195, y=31, clicks=1, interval=0, button='left') # maximize zoom app
    time.sleep(3) # wait for 3 sec
    pyg.click(x=50, y=776, clicks=1, interval=0, button='left')

What else we can do?

So far, this script takes one date and time to auto join the meeting. One can also go further and repeat the process over a given days and time periods.

The dark side of such automations is even when the actual person is away from the computer, it can still join. The evil benefit of this is attendending a class room lecture and getting credits without actually attending it.

Imroved tech comes with both good and bad benefits!

FINALLY,

the command line version of the tool is available on GitHub here

python AutoZOOM_v0.03.py --zoom_link "zoom-meeting-link" --meeting_date "06-09-2020" --meeting_time "13-00-00"

Technical notes

I use 13-inch MacBook pro, so the coordinates hardcoded in the script are suitable for this screensize. If you want to use the script for your screen size, I wrote a small notebook to help you guide through it. It is available here.

Stay safe!

Avatar
Venu Thatikonda
PhD student

Interested in Data science, Machine learning, Cancer (epi)genomics.

Related