Scripting Zoom App - A Work In Progress

I know that zoom.us is not technically scriptable with Applescript but I have gotten so tired of repeatedly doing the same things when I set up a Zoom session that I started trying to automate the process using System Events and tell process. I was surprised by how much I could automate but then ran into a couple of brick walls. If anyone else is interested in this I'd like to brainstorm on the forum to see how much is possible.

Here's some scripting steps I have been playing with. Part of what I decided to do in order to simplify the data entry involved in scheduling a new meeting and sending an email to the client was to run everything from Filemaker. The variables shows as $theMonth, $theDay, etc are being set in FileMaker before the Perform Applescript step so this is not a viable Applescript. You could use three separate Applescript dialog boxes to get the name date and time. The key code 48 is a tab to move between fields on the zoom interface. Key code 76 is the enter key which will OK the automatic entries in the Calendar so that I can quit Calendar and get back to zoom. There seems to be no way to stop zoom from automatically posting a new session in the Calendar.

tell application "zoom.us" to activate
tell application "System Events"
tell process "zoom.us"
repeat until window "Schedule Meeting" exists
click menu item "Schedule Meeting..." of menu "Zoom.us" of menu bar 1
delay 0.2
end repeat
set topicField to text field 1 of "Schedule Meeting"
keystroke "Whatever You Want It To Be""
key code 48
keystroke $theMonth as text
key code 48
keystroke $theDay as text
key code 48
keystroke $theYear as text
key code 48
keystroke $theHour as text
key code 48
keystroke $theMinute as text
key code 48
keystroke $theMonth as text
key code 48
keystroke $theDay as text
key code 48
keystroke $theYear as text
key code 48
keystroke ($theHour + 1) as text
key code 48
keystroke $theMinute as text
Delay 2
key code 36
key code 76
key code 76
end tell
end tell
tell application "Calendar" to quit

tell application "zoom.us" to activate
tell application "System Events"
tell process "zoom.us"
repeat until window "Schedule Meeting" exists
click menu item "Schedule Meeting..." of menu "Zoom.us" of menu bar 1
delay 0.2
end repeat
select button ??????
end tell
end tell

The zoom.us interface for Meetings has what appear to be buttons for each scheduled meeting. I am trying to figure out how to select the right button so that I can then copy the invitation to put in an email. Tabbing does not let me select the button. If anyone has any ideas, I'd love to hear them, and if my further experiments produce any results, I'll post them.
Thanks

Replies

Progress Update in case anyone is interested:

tell application "zoom.us" to activate
tell application "System Events"
tell process "zoom.us"
repeat until window "Schedule Meeting" exists
click menu item "Schedule Meeting..." of menu "Zoom.us" of menu bar 1
delay 0.2
end repeat
set topicField to text field 1 of "Schedule Meeting"
keystroke "Whatever It Will Be"
key code 48
keystroke "5" -- the month
key code 48
keystroke "24" -- the day
key code 48
keystroke "2021" -- the year
key code 48
keystroke "10" -- the hour
key code 48
keystroke "00" -- the minutes
key code 48
keystroke "AM" - the period
key code 48
keystroke "11" -- the hour for the end of the meeting
key code 48
keystroke "00" -- the minutes for the end of the meeting
key code 48
keystroke "AM"
key code 48
keystroke "5" -- to make sure the meeting ends of the same date it started (may not be necessary)
key code 48
keystroke "24"
key code 48
keystroke "2021"
delay 2
key code 36 -- return the save the scheduling information. Zoom will automatically go to Calendar to post it
delay 2
key code 76 -- Enter to accept the Calendar entry
delay 2
key code 76 -- Enter to dismiss the Calendar display of all the info about the meeting
end tell
end tell

tell application "Calendar" to quit

tell application "zoom.us" to activate

tell application "System Events"
tell process "zoom.us"
click button 3 of window "Zoom" -- Meetings button probably not necessary
select row 4 of outline 1 of scroll area 1 of group 1 of splitter group 1 of window "Zoom"
click button 5 of splitter group 1 of window "Zoom" -- Copy Invitation
end tell
end tell

tell application "Mail" to activate
tell application "Mail"
set theFrom to "richard@rgpost.com"
set theTos to {"richardpatterson@roadrunner.com"}
set theSubject to "Zoom Info"
set theContent to the clipboard
set theSignature to "Richard"
set theMessage to make new outgoing message with properties {sender:theFrom, subject:theSubject, content:theContent, visible:false}
repeat with theTo in theTos
make new recipient at end of to recipients with properties {address:theTo}
end repeat
send theMessage
end tell

1) I rearranged the order of the tabs and keystrokes to fill in the date and time because the zoom interface reverses the order for the scheduled end of the meeting. (I have never figured out what difference it makes anywhere in zoom how you set the end of the meeting.)
2) I found an Applescript that examines the content of an applications window and returns a description of all the items in the window:
tell application "zoom.us" to activate
tell application "System Events"
tell process "zoom.us"
set processName to its name
tell front window
set windowName to its name
set entireContentsOfWindow to entire contents
end tell
end tell
end tell
return entireContentsOfWindow

In this simple form it returns an unformatted text of all the items that make up the window. The Script Debugger application will sort out the returned text or you can just use a few search and replace commands to format it enough to make sense of it. What I found was that the Copy Invitation button is button 5 of splitter group 1 of window "Zoom" and I am hoping it will always be that. In my sample window the meeting I had scheduled could be selected by selecting row 4 of outline 1 of scroll area 1 of group 1 of splitter group 1 of window "Zoom". This will not always be the case and I am hoping the solution will be to give each meeting a unique topic that will become the identifier for its UI element.

Once the invitation has been copied it is a straightforward task to generate and send the email with Mail, which is scriptable. It will require that the recipients of the email are in Contacts with email addresses.




Hi @RGPatt - Did you get further with this?

I created this repo for very similar reasons: https://github.com/ksylvan/Zoom_OPM

I'd like to figure out some other common tasks:

  1. Co-hosting certain participants when they come into the meeting.
  2. Renaming certain participants automatically
  3. Creating named breakout rooms automatically.

My current implementation works pretty well, and I'm happy to have others contribute.

I've gotten a lot further with this. Item 2 and 3 above are done.