Hi,
Well, we all know Zoom is a video conferencing app which allows us to attend/conduct meetings. And because of this pandemic situation, the usage of these video conferencing apps also increased drastically and even for school kids this became a new normal and sometimes these continuous online classes becomes cumbersome.
And today we gonna learn how to automate zoom such that it automatically logs into one's meetings/classes on time.
For this, we need
- python
- pyautogui
- pandas
Behind the scenes:
- An infinite loop keeps checking the current time of the system using "datetime.now" funtion.
- The zoom app is opened using "os.startfile()" funtion as soon as current time matches the time mentioned in "timings.xlsx".
- "pyautogui.locateOnScreen()" function locates the image of join button on the screen and returns the position.
- "pyautogui.locateCenterOnScreen()" function locates the center of the first found instance of the image on the screen.
- "pyautogui.moveTo()" moves the cursor to that location.
- "pyautogui.click()" performs a click operation.
- The meeting Id and Passcode are entered using the "pyautogui.write()" command.
Steps for Automating:
1. import necessary modules
import os
import pandas as pd
import pyautogui
import time
from datetime import datetime
os - Provides a way of using operating system dependent functionality.
pandas - Allows us to store and manipulate tabular data in rows and columns of variables.
pyautogui - A module which helps to control the mouse and keyboard, and other GUI automation tasks.
2. Open's zoom application from the specified location
os.startfile(" ")
3. To click join button
#place the pic location inside quotes
joinbtn=pyautogui.locateCenterOnScreen("")
pyautogui.moveTo(joinbtn)
pyautogui.click()
4. Similarly, like join button we have to take screenshot of every button to click or to locate
#To type the meeting id
#place the picture location inside quotes
meetingidbtn=pyautogui.locateCenterOnScreen("")
pyautogui.moveTo(meetingidbtn)
pyautogui.write(meeting_id)
5. To enter passcode
#Enter the passcode to join meeting
passcode=pyautogui.locateCenterOnScreen("")
pyautogui.moveTo(passcode)
pyautogui.write(password)
6. Create an excel file and add all meeting details like "Timings", "Meeting id" and "Password"
7. Now import that excel file using pandas
#place excel file location inside quotes
df = pd.read_excel('',index=False)
8. Now we will write while loop to constantly check for the current time and compare the timings in excel file
while True:
#To get current time
now = datetime.now().strftime("%H:%M")
if now in str(df['Timings']):
mylist=df["Timings"]
mylist=[i.strftime("%H:%M") for i in mylist]
c= [i for i in range(len(mylist)) if mylist[i]==now]
row = df.loc[c]
meeting_id = str(row.iloc[0,1])
password= str(row.iloc[0,2])
time.sleep(5)
signIn(meeting_id, password)
time.sleep(2)
print('signed in')
break
Check out the my GitHub repo to get code and assets for buttons
Source code for Automation
import os
import pandas as pd
import pyautogui
import time
from datetime import datetime
def signIn(meeting_id,password):
#Open's Zoom Application from the specified location
os.startfile("")
time.sleep(3)
#Click's join button
joinbtn=pyautogui.locateCenterOnScreen("")
pyautogui.moveTo(joinbtn)
pyautogui.click()
time.sleep(1)
#Type the meeting id
meetingidbtn=pyautogui.locateCenterOnScreen("")
pyautogui.moveTo(meetingidbtn)
pyautogui.write(meeting_id)
time.sleep(2)
#To turn of video and audio
mediaBtn=pyautogui.locateAllOnScreen("")
for btn in mediaBtn:
pyautogui.moveTo(btn)
pyautogui.click()
time.sleep(1)
#To join
join=pyautogui.locateCenterOnScreen("")
pyautogui.moveTo(join)
pyautogui.click()
time.sleep(2)
#Enter's passcode to join meeting
passcode=pyautogui.locateCenterOnScreen("")
pyautogui.moveTo(passcode)
pyautogui.write(password)
time.sleep(1)
#Click's on join button
joinmeeting=pyautogui.locateCenterOnScreen("")
pyautogui.moveTo(joinmeeting)
pyautogui.click()
time.sleep(1)
df = pd.read_excel('',index=False)
while True:
#To get current time
now = datetime.now().strftime("%H:%M")
if now in str(df['Timings']):
mylist=df["Timings"]
mylist=[i.strftime("%H:%M") for i in mylist]
c= [i for i in range(len(mylist)) if mylist[i]==now]
row = df.loc[c]
meeting_id = str(row.iloc[0,1])
password= str(row.iloc[0,2])
time.sleep(5)
signIn(meeting_id, password)
time.sleep(2)
print('signed in')
break
Demo video:
Lemme know if any queries
Hope it's useful
A ❤️ would be Awesome 😊
Top comments (3)
very beautiful. Health to your meat. I am trying to create a meeting with python using the zoom api and transfer the meeting link to excell. I'm a beginner in API. When I examine the zoom apis, it always shows the process with the api key. I want others to use the application. Can't I do it in a way that people can use it by directly entering the username and password of their zoom account instead of bothering with the api key. Can you guide me on this? I would be grateful if you answer.
very impressive and useful, thank you a lot
Glad you liked it!!