Skip to content

Commit

Permalink
enhance: add support to get past meeting instances and prompts for PM…
Browse files Browse the repository at this point in the history
…I instances
  • Loading branch information
tybalex committed Mar 4, 2025
1 parent 3290e6e commit b23551c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
20 changes: 15 additions & 5 deletions zoom/tool.gpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Name: Zoom
Description: Tools for interacting with Zoom
Metadata: bundle: true
Share Tools: Get User, Create Meeting, Update Meeting, List Meeting Templates, Get Meeting, Delete Meeting, List Meetings, List Upcoming Meetings, Get Meeting Invitation, Get Meeting Recordings, List User Recordings, Get Meeting Summary, Get Past Meeting Details, List Available Timezones
Share Tools: Get User, Create Meeting, Update Meeting, List Meeting Templates, Get Meeting, Delete Meeting, List Meetings, List Upcoming Meetings, List Past Meeting Instances, Get Past Meeting Details, Get Meeting Invitation, Get Meeting Recordings, List User Recordings, Get Meeting Summary, List Available Timezones

---
Name: Get User
Description: Get the information of the current zoom user. In the response, `type` will indicate user's plan type. 1 - Basic. 2 - Licensed. 4 - Unassigned without Meetings Basic. 99 - None, which can only be set with ssoCreate.
Description: Get the information of the current zoom user. In the response, `type` will indicate user's plan type. 1 - Basic. 2 - Licensed. 4 - Unassigned without Meetings Basic. 99 - None, which can only be set with ssoCreate. This also returns the user's Personal Meeting ID(PMI).
Credential: ./credential
Share Context: Zoom Context

Expand Down Expand Up @@ -91,9 +91,10 @@ Param: meeting_id: The ID of the meeting to delete

---
Name: List Meetings
Description: List all meetings hosted by the current Zoom user.
Description: List all scheduled meetings hosted by the current Zoom user. This does not return information about instant meetings.
Credential: ./credential
Share Context: Zoom Context
Param: type: Optional. The type of the meetings to list. Default to scheduled, which will return all valid previous (unexpired) meetings, live meetings, and upcoming scheduled meetings. Must be one of: scheduled, live, upcoming, upcoming_meetings, previous_meetings.

#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py ListMeetings

Expand All @@ -108,7 +109,7 @@ Param: meeting_id: The ID of the meeting to get the invitation for

---
Name: List Upcoming Meetings
Description: List all upcoming meetings hosted by the current Zoom user.
Description: List upcoming meetings(within the next 24 hours) that the current Zoom user scheduled or invited to join.
Credential: ./credential
Share Context: Zoom Context

Expand All @@ -119,7 +120,7 @@ Name: Get Meeting Recordings
Description: Get the cloud recordings of a Zoom meeting. Cloud rerordings are only available for licensed users.
Credential: ./credential
Share Context: Zoom Context
Param: meeting_id: The ID of the meeting to get the recordings for
Param: meeting_id_or_uuid: The ID or UUID of the meeting to get the recordings for. If providing the meeting ID instead of UUID, the response will be for the latest meeting instance.

#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py GetMeetingRecordings

Expand All @@ -140,6 +141,15 @@ Param: meeting_id: The ID of the meeting to get the details for

#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py GetPastMeetingDetails

---
Name: List Past Meeting Instances
Description: List all instances of a past Zoom meeting.
Credential: ./credential
Share Context: Zoom Context
Param: meeting_id: The ID of the meeting to get the instances for

#!/usr/bin/env python3 ${GPTSCRIPT_TOOL_DIR}/main.py ListPastMeetingInstances

---
Name: Get Meeting Summary
Description: Retrieve the Zoom AI-generated summary of a Zoom meeting. This feature is available exclusively to licensed users. To access it, the host must ensure that the `Meeting Summary with AI Companion` feature is enabled in their account settings. The meeting summary's accessibility depends on the host's sharing settings, by default only the host has the access.
Expand Down
29 changes: 28 additions & 1 deletion zoom/tools/meetings.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,21 @@ def list_meetings():
headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
}
response = requests.get(url, headers=headers)
params = {}
type = os.getenv("TYPE", "")
type_enums = [
"scheduled",
"live",
"upcoming",
"upcoming_meetings",
"previous_meetings",
]
if type != "":
if type not in type_enums:
raise ValueError(f"Invalid type: {type}. Must be one of: {type_enums}")
params["type"] = type

response = requests.get(url, headers=headers, params=params)
if response.status_code != 200:
return {"message": f"Error listing meetings: {response.text}"}

Expand Down Expand Up @@ -471,3 +485,16 @@ def get_past_meeting_details():
if response.status_code != 200:
return {"message": f"Error getting past meeting details: {response.text}"}
return response.json()


@tool_registry.decorator("ListPastMeetingInstances")
def list_past_meeting_instances():
meeting_id = os.environ["MEETING_ID"]
url = f"{ZOOM_API_URL}/past_meetings/{meeting_id}/instances"
headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
}
response = requests.get(url, headers=headers)
if response.status_code != 200:
return {"message": f"Error listing past meeting instances: {response.text}"}
return response.json()
4 changes: 2 additions & 2 deletions zoom/tools/recordings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

@tool_registry.decorator("GetMeetingRecordings")
def get_meeting_recordings():
meeting_id = os.environ["MEETING_ID"]
url = f"{ZOOM_API_URL}/meetings/{meeting_id}/recordings"
meeting_id_or_uuid = os.environ["MEETING_ID_OR_UUID"]
url = f"{ZOOM_API_URL}/meetings/{meeting_id_or_uuid}/recordings"
headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
}
Expand Down

0 comments on commit b23551c

Please sign in to comment.