Due to COVID-19, online meetings have their own importance. So why not we try python to automate the message sending in the google meet.
For this, you need basic knowledge of selenium, python, and HTML.
In this blog, I am going to share the script of automating messages so if you are a beginner then I will suggest readers to read Automate Whatsapp Using Python to get knowledge of selenium. You can modify the below script according to your need.
# importing required modules from selenium import webdriver from selenium.webdriver.common.keys import Keys # Your Google meet URL meet_url = 'https://meet.google.com/agz-sraz-efj' # Initialising drivers. driver = webdriver.Chrome('C:\chromedriver.exe') # Due to security reasons google has blocked Sign In from automated or third-party applications. # To login your google account enable less secure apps in your Google settings. # After this you can do the login manually or by writing two more lines in the same code. # (I am not writing code for log in because when you try on your own you learn many new things.) driver.get('https://gmail.com') # going to the meet URL after login. driver.get(meet_url) # getting the message button in google meet. xpath_btn = '/html/body/div/c-wiz/div/div/div/div/div/div/div/div/div/span/span/div/div/span' btn = driver.find_element_by_xpath(xpath_btn) btn.click() # finding the text box to type message in text box. x_path = '/html/body/div/c-wiz/div/div/div/div/div/div/div/div/div/span/div/div/div/div/div/textarea' t_box = driver.find_element_by_xpath(x_path) # sending messages. message = 'Hello, I am Sankalp from FreshlyBuilt.' t_box.send_keys(message,Keys.ENTER)
Key points about what we have done in this script are:-
- importing the required modules.
- google meet URL.
- Driver Initialisation. (If you don’t have the drivers then search on google about web drivers of your default browser.)
- login using your Google account.
- getting on the page of the meet.
- finding the message button using selenium (find_element_by_xpath.)
- finding text box using selenium (find_element_by_xpath.)
- The final step, sending your messages.
If you like my blog post then follow me on LinkedIn.