Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

feat(zoom): list, get, update and delete meetings and list cloud recordings from flows (#16137)

Odai Ahmadf69620859abd
diff --git a/bun.lock b/bun.lock
index 0fcf1622a72..fd7e76265de 100644
--- a/bun.lock
+++ b/bun.lock
@@ -10336,7 +10336,7 @@
},
"packages/pieces/community/zoom": {
"name": "@activepieces/piece-zoom",
- "version": "0.8.1",
+ "version": "0.9.0",
"dependencies": {
"@activepieces/core-piece-types": "workspace:*",
"@activepieces/core-utils": "workspace:*",
diff --git a/packages/pieces/community/zoom/package.json b/packages/pieces/community/zoom/package.json
index f1905b39a84..a0bdeb51786 100644
--- a/packages/pieces/community/zoom/package.json
+++ b/packages/pieces/community/zoom/package.json
@@ -1,6 +1,6 @@
{
"name": "@activepieces/piece-zoom",
- "version": "0.8.1",
+ "version": "0.9.0",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"scripts": {
diff --git a/packages/pieces/community/zoom/src/i18n/translation.json b/packages/pieces/community/zoom/src/i18n/translation.json
index 8bc01c5b58b..387f50870c0 100644
--- a/packages/pieces/community/zoom/src/i18n/translation.json
+++ b/packages/pieces/community/zoom/src/i18n/translation.json
@@ -1,18 +1,33 @@
{
"Video conferencing, web conferencing, webinars, screen sharing": "Video conferencing, web conferencing, webinars, screen sharing",
- "\n 1. Go to [marketplace.zoom.us](https://marketplace.zoom.us/) and log in to your account.\n 2. In the upper-right corner, click **Develop** then **Build App**.\n 3. Select **General App**.\n 4. Copy the Client ID and Client Secret.Add Redirect URL and press continue.\n 5. Go to **Scopes** from left side bar and add **meeting:write:meeting**, **meeting:read:meeting**, **meeting:read:list_meetings**, **meeting:update:meeting**, **meeting:write:registrant**, and **user:read:user** as scopes.": "\n 1. Go to [marketplace.zoom.us](https://marketplace.zoom.us/) and log in to your account.\n 2. In the upper-right corner, click **Develop** then **Build App**.\n 3. Select **General App**.\n 4. Copy the Client ID and Client Secret.Add Redirect URL and press continue.\n 5. Go to **Scopes** from left side bar and add **meeting:write:meeting**, **meeting:read:meeting**, **meeting:read:list_meetings**, **meeting:update:meeting**, **meeting:write:registrant**, and **user:read:user** as scopes.",
+ "\n 1. Go to [marketplace.zoom.us](https://marketplace.zoom.us/) and log in to your account.\n 2. In the upper-right corner, click **Develop** then **Build App**.\n 3. Select **General App**.\n 4. Copy the Client ID and Client Secret.Add Redirect URL and press continue.\n 5. Go to **Scopes** from left side bar and add the scopes for the actions you use:\n - Meetings: **meeting:write:meeting**, **meeting:read:meeting**, **meeting:read:list_meetings**, **meeting:update:meeting**, **meeting:delete:meeting**\n - Registrants: **meeting:write:registrant**\n - Past meetings: **meeting:read:list_past_instances**\n - Cloud recordings: **cloud_recording:read:list_user_recordings**\n - Current user: **user:read:user**\n 6. After adding scopes to an existing app, reconnect this connection so Zoom grants them.": "\n 1. Go to [marketplace.zoom.us](https://marketplace.zoom.us/) and log in to your account.\n 2. In the upper-right corner, click **Develop** then **Build App**.\n 3. Select **General App**.\n 4. Copy the Client ID and Client Secret.Add Redirect URL and press continue.\n 5. Go to **Scopes** from left side bar and add the scopes for the actions you use:\n - Meetings: **meeting:write:meeting**, **meeting:read:meeting**, **meeting:read:list_meetings**, **meeting:update:meeting**, **meeting:delete:meeting**\n - Registrants: **meeting:write:registrant**\n - Past meetings: **meeting:read:list_past_instances**\n - Cloud recordings: **cloud_recording:read:list_user_recordings**\n - Current user: **user:read:user**\n 6. After adding scopes to an existing app, reconnect this connection so Zoom grants them.",
"Create Zoom Meeting": "Create Zoom Meeting",
"Create Zoom Meeting Registrant": "Create Zoom Meeting Registrant",
"Find Zoom Meeting": "Find Zoom Meeting",
"Update Zoom Meeting": "Update Zoom Meeting",
+ "Get Meeting": "Get Meeting",
+ "Update Meeting (by ID)": "Update Meeting (by ID)",
+ "List Meetings": "List Meetings",
+ "Delete Meeting": "Delete Meeting",
+ "Get Current User": "Get Current User",
+ "List Past Meeting Instances": "List Past Meeting Instances",
+ "List Cloud Recordings": "List Cloud Recordings",
"Custom API Call": "Custom API Call",
"Create a new Zoom Meeting": "Create a new Zoom Meeting",
"Create and submit a user's registration to a meeting.": "Create and submit a user's registration to a meeting.",
"Retrieve the details of an existing meeting.": "Retrieve the details of an existing meeting.",
"Update the details of an existing meeting.": "Update the details of an existing meeting.",
+ "Get the details of a meeting by its meeting ID.": "Get the details of a meeting by its meeting ID.",
+ "Change a meeting by its meeting ID. Only the fields you fill in are changed.": "Change a meeting by its meeting ID. Only the fields you fill in are changed.",
+ "List the meetings of the connected Zoom user, one page at a time.": "List the meetings of the connected Zoom user, one page at a time.",
+ "Delete a meeting, or one occurrence of a recurring meeting.": "Delete a meeting, or one occurrence of a recurring meeting.",
+ "Get the profile of the Zoom user behind this connection.": "Get the profile of the Zoom user behind this connection.",
+ "List the ended instances (UUID and start time) of a meeting.": "List the ended instances (UUID and start time) of a meeting.",
+ "List the cloud recordings of the connected user between two dates (paid Zoom plan with cloud recording).": "List the cloud recordings of the connected user between two dates (paid Zoom plan with cloud recording).",
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
"Meeting's topic": "Meeting's topic",
"Start Time": "Start Time",
+ "Timezone": "Timezone",
"Duration (in Minutes)": "Duration (in Minutes)",
"Auto Recording": "Auto Recording",
"Audio": "Audio",
@@ -21,6 +36,7 @@
"Pre Schedule": "Pre Schedule",
"Schedule for": "Schedule for",
"Join URL": "Join URL",
+ "Require Zoom Sign-in to Join": "Require Zoom Sign-in to Join",
"Meeting ID": "Meeting ID",
"First name": "First name",
"Last name": "Last name",
@@ -42,12 +58,22 @@
"Meeting": "Meeting",
"Occurrence ID": "Occurrence ID",
"Show Previous Occurrences": "Show Previous Occurrences",
- "Timezone": "Timezone",
"Host Video": "Host Video",
"Participant Video": "Participant Video",
"Join Before Host": "Join Before Host",
"Mute Upon Entry": "Mute Upon Entry",
"Waiting Room": "Waiting Room",
+ "Topic": "Topic",
+ "Duration (minutes)": "Duration (minutes)",
+ "Clear Agenda": "Clear Agenda",
+ "Passcode": "Passcode",
+ "Meeting Type": "Meeting Type",
+ "Page Size": "Page Size",
+ "Next Page Token": "Next Page Token",
+ "Notify Host and Alternative Hosts": "Notify Host and Alternative Hosts",
+ "Notify Registrants": "Notify Registrants",
+ "From Date": "From Date",
+ "To Date": "To Date",
"Method": "Method",
"Headers": "Headers",
"Query Parameters": "Query Parameters",
@@ -58,13 +84,15 @@
"Timeout": "Timeout",
"Follow redirects": "Follow redirects",
"The meeting's topic": "The meeting's topic",
- "Meeting start date-time": "Meeting start date-time",
+ "Meeting start date-time, for example 2026-11-01T15:00:00 (read in the Timezone below) or 2026-11-01T15:00:00Z (UTC).": "Meeting start date-time, for example 2026-11-01T15:00:00 (read in the Timezone below) or 2026-11-01T15:00:00Z (UTC).",
+ "IANA timezone for the start time, for example America/New_York. Defaults to UTC.": "IANA timezone for the start time, for example America/New_York. Defaults to UTC.",
"Duration of the meeting": "Duration of the meeting",
"The meeting's agenda": "The meeting's agenda",
"The password required to join the meeting. By default, a password can only have a maximum length of 10 characters and only contain alphanumeric characters and the @, -, _, and * characters.": "The password required to join the meeting. By default, a password can only have a maximum length of 10 characters and only contain alphanumeric characters and the @, -, _, and * characters.",
"Whether the prescheduled meeting was created via the GSuite app.": "Whether the prescheduled meeting was created via the GSuite app.",
"The email address or user ID of the user to schedule a meeting for.": "The email address or user ID of the user to schedule a meeting for.",
- "URL for participants to join the meeting.": "URL for participants to join the meeting.",
+ "Not used by Zoom (kept for compatibility). Zoom creates the join URL and returns it in the output.": "Not used by Zoom (kept for compatibility). Zoom creates the join URL and returns it in the output.",
+ "When on, only participants signed in to a Zoom account can join. Turn off to let anyone with the link join.": "When on, only participants signed in to a Zoom account can join. Turn off to let anyone with the link join.",
"The meeting ID.": "The meeting ID.",
"The registrant's first name.": "The registrant's first name.",
"The registrant's last name.": "The registrant's last name.",
@@ -76,6 +104,7 @@
"The registrant's two-letter country code.": "The registrant's two-letter country code.",
"The registrant's phone number.": "The registrant's phone number.",
"The registrant's questions and comments.": "The registrant's questions and comments.",
+ "Answers to the meeting's custom registration questions: use the question title as the key and the answer as the value.": "Answers to the meeting's custom registration questions: use the question title as the key and the answer as the value.",
"The registrant's industry.": "The registrant's industry.",
"The registrant's job title.": "The registrant's job title.",
"The registrant's number of employees.": "The registrant's number of employees.",
@@ -92,6 +121,30 @@
"Whether participants can join the meeting before the host starts the meeting.": "Whether participants can join the meeting before the host starts the meeting.",
"Whether to mute participants upon entry.": "Whether to mute participants upon entry.",
"Whether to enable waiting room.": "Whether to enable waiting room.",
+ "The numeric Zoom meeting ID, for example 85746065432.": "The numeric Zoom meeting ID, for example 85746065432.",
+ "Only for recurring meetings: the occurrence ID of one specific occurrence. Leave empty to target the whole meeting.": "Only for recurring meetings: the occurrence ID of one specific occurrence. Leave empty to target the whole meeting.",
+ "For recurring meetings: also include occurrences that already happened.": "For recurring meetings: also include occurrences that already happened.",
+ "The numeric Zoom meeting ID to change, for example 85746065432.": "The numeric Zoom meeting ID to change, for example 85746065432.",
+ "New meeting topic.": "New meeting topic.",
+ "New start date-time, for example 2026-11-01T15:00:00 (read in the meeting timezone) or 2026-11-01T15:00:00Z (UTC).": "New start date-time, for example 2026-11-01T15:00:00 (read in the meeting timezone) or 2026-11-01T15:00:00Z (UTC).",
+ "New duration in minutes.": "New duration in minutes.",
+ "IANA timezone, for example America/New_York.": "IANA timezone, for example America/New_York.",
+ "New agenda text.": "New agenda text.",
+ "Turn on to remove the current agenda. Ignored when Agenda is filled in.": "Turn on to remove the current agenda. Ignored when Agenda is filled in.",
+ "New passcode: up to 10 characters, letters, numbers and @ - _ * only.": "New passcode: up to 10 characters, letters, numbers and @ - _ * only.",
+ "Start video when the host joins.": "Start video when the host joins.",
+ "Start video when participants join.": "Start video when participants join.",
+ "Let participants join before the host.": "Let participants join before the host.",
+ "Mute participants when they join.": "Mute participants when they join.",
+ "Turn the waiting room on or off.": "Turn the waiting room on or off.",
+ "Which meetings to list.": "Which meetings to list.",
+ "How many records to return in this page (1-300). Default 30.": "How many records to return in this page (1-300). Default 30.",
+ "Leave empty for the first page. To get the next page, paste the Next Page Token from the previous run.": "Leave empty for the first page. To get the next page, paste the Next Page Token from the previous run.",
+ "The numeric Zoom meeting ID to delete, for example 85746065432. Find it with List Meetings.": "The numeric Zoom meeting ID to delete, for example 85746065432. Find it with List Meetings.",
+ "Email the host and alternative hosts that the meeting was cancelled.": "Email the host and alternative hosts that the meeting was cancelled.",
+ "Email registrants that the meeting was cancelled.": "Email registrants that the meeting was cancelled.",
+ "Start date in YYYY-MM-DD format (UTC), for example 2026-10-01.": "Start date in YYYY-MM-DD format (UTC), for example 2026-10-01.",
+ "End date in YYYY-MM-DD format (UTC), at most one month after From Date. Defaults to today, or to one month after From Date if that is earlier. Required with Next Page Token: use the To value from the previous page so every page covers the same dates.": "End date in YYYY-MM-DD format (UTC), at most one month after From Date. Defaults to today, or to one month after From Date if that is earlier. Required with Next Page Token: use the To value from the previous page so every page covers the same dates.",
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
"Appended to the URL as ?key=value.": "Appended to the URL as ?key=value.",
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
@@ -122,6 +175,11 @@
"Evaluator/Recommender": "Evaluator/Recommender",
"Influencer": "Influencer",
"Not involved": "Not involved",
+ "Scheduled (all valid scheduled meetings)": "Scheduled (all valid scheduled meetings)",
+ "Live (in progress)": "Live (in progress)",
+ "Upcoming": "Upcoming",
+ "Upcoming meetings (from today)": "Upcoming meetings (from today)",
+ "Previous meetings": "Previous meetings",
"GET": "GET",
"POST": "POST",
"PATCH": "PATCH",
diff --git a/packages/pieces/community/zoom/src/index.ts b/packages/pieces/community/zoom/src/index.ts
index 68a42d25606..410014b9e1d 100644
--- a/packages/pieces/community/zoom/src/index.ts
+++ b/packages/pieces/community/zoom/src/index.ts
@@ -1,14 +1,17 @@
import { createCustomApiCallAction, httpClient, HttpMethod } from '@activepieces/pieces-common';
-import {
- OAuth2PropertyValue,
- PieceAuth,
- createPiece,
-} from '@activepieces/pieces-framework';
+import { PieceAuth, createPiece } from '@activepieces/pieces-framework';
import { PieceCategory } from '@activepieces/pieces-framework';
import { zoomCreateMeeting } from './lib/actions/create-meeting';
import { zoomCreateMeetingRegistrant } from './lib/actions/create-meeting-registrant';
import { zoomFindMeeting } from './lib/actions/find-meeting';
import { zoomUpdateMeeting } from './lib/actions/update-meeting';
+import { zoomGetMeeting } from './lib/actions/get-meeting';
+import { zoomUpdateMeetingById } from './lib/actions/update-meeting-by-id';
+import { zoomListMeetings } from './lib/actions/list-meetings';
+import { zoomDeleteMeeting } from './lib/actions/delete-meeting';
+import { zoomGetCurrentUser } from './lib/actions/get-current-user';
+import { zoomListPastMeetingInstances } from './lib/actions/list-past-meeting-instances';
+import { zoomListRecordings } from './lib/actions/list-recordings';
export const zoomAuth = PieceAuth.OAuth2({
description: `
@@ -16,11 +19,16 @@ export const zoomAuth = PieceAuth.OAuth2({
2. In the upper-right corner, click **Develop** then **Build App**.
3. Select **General App**.
4. Copy the Client ID and Client Secret.Add Redirect URL and press continue.
- 5. Go to **Scopes** from left side bar and add **meeting:write:meeting**, **meeting:read:meeting**, **meeting:read:list_meetings**, **meeting:update:meeting**, **meeting:write:registrant**, and **user:read:user** as scopes.`,
+ 5. Go to **Scopes** from left side bar and add the scopes for the actions you use:
+ - Meetings: **meeting:write:meeting**, **meeting:read:meeting**, **meeting:read:list_meetings**, **meeting:update:meeting**, **meeting:delete:meeting**
+ - Registrants: **meeting:write:registrant**
+ - Past meetings: **meeting:read:list_past_instances**
+ - Cloud recordings: **cloud_recording:read:list_user_recordings**
+ - Current user: **user:read:user**
+ 6. After adding scopes to an existing app, reconnect this connection so Zoom grants them.`,
authUrl: 'https://zoom.us/oauth/authorize',
tokenUrl: 'https://zoom.us/oauth/token',
required: true,
- // scope: ['meeting:write:admin', 'meeting:write'],
scope: [],
getConnectionIdentifier: async ({ auth }) => {
try {
@@ -41,7 +49,7 @@ export const zoom = createPiece({
displayName: 'Zoom',
description: 'Video conferencing, web conferencing, webinars, screen sharing',
- minimumSupportedRelease: '0.30.0',
+ minimumSupportedRelease: '0.88.2',
logoUrl: 'https://cdn.activepieces.com/pieces/zoom.png',
categories: [PieceCategory.COMMUNICATION],
actions: [
@@ -49,13 +57,19 @@ export const zoom = createPiece({
zoomCreateMeetingRegistrant,
zoomFindMeeting,
zoomUpdateMeeting,
+ zoomGetMeeting,
+ zoomUpdateMeetingById,
+ zoomListMeetings,
+ zoomDeleteMeeting,
+ zoomGetCurrentUser,
+ zoomListPastMeetingInstances,
+ zoomListRecordings,
createCustomApiCallAction({
baseUrl: () => 'https://api.zoom.us/v2',
auth: zoomAuth,
authMapping: async (auth) => {
- const typedAuth = auth as OAuth2PropertyValue;
return {
- Authorization: `Bearer ${typedAuth.access_token}`,
+ Authorization: `Bearer ${auth.access_token}`,
};
},
}),
diff --git a/packages/pieces/community/zoom/src/lib/actions/create-meeting-registrant.ts b/packages/pieces/community/zoom/src/lib/actions/create-meeting-registrant.ts
index 72cb14327b4..433ef2f34d5 100644
--- a/packages/pieces/community/zoom/src/lib/actions/create-meeting-registrant.ts
+++ b/packages/pieces/community/zoom/src/lib/actions/create-meeting-registrant.ts
@@ -1,12 +1,8 @@
import { createAction } from '@activepieces/pieces-framework';
-import {
- HttpRequest,
- HttpMethod,
- AuthenticationType,
- httpClient,
-} from '@activepieces/pieces-common';
-import { RegistrationResponse } from '../common/models';
+import { HttpMethod } from '@activepieces/pieces-common';
import { getRegistarantProps } from '../common/props';
+import { zoomClient } from '../common/client';
+import { createRegistrantOutputSchema } from '../output-schemas';
import { zoomAuth } from '../..';
export const zoomCreateMeetingRegistrant = createAction({
@@ -17,6 +13,7 @@ export const zoomCreateMeetingRegistrant = createAction({
description: "Create and submit a user's registration to a meeting.",
audience: 'both',
aiMetadata: { description: 'Registers an attendee for an existing Zoom meeting identified by its meeting ID, capturing their name, email, and optional profile/custom-question fields. Use to add a participant to a meeting that has registration enabled. Each call submits a new registration, so it is not idempotent.', idempotent: false },
+ outputSchema: createRegistrantOutputSchema,
props: getRegistarantProps(),
async run(context) {
const body: Record<string, unknown> = {
@@ -47,23 +44,13 @@ export const zoomCreateMeetingRegistrant = createAction({
).map(([key, value]) => ({ title: key, value: value }));
}
- const request: HttpRequest = {
+ const meetingId = zoomClient.normalizeMeetingId(context.propsValue.meeting_id);
+ return zoomClient.requestObject({
+ accessToken: context.auth.access_token,
method: HttpMethod.POST,
- url: `https://api.zoom.us/v2/meetings/${context.propsValue.meeting_id}/registrants`,
+ path: `/meetings/${meetingId}/registrants`,
body,
- authentication: {
- type: AuthenticationType.BEARER_TOKEN,
- token: context.auth.access_token,
- },
- queryParams: {},
- };
-
- const result = await httpClient.sendRequest<RegistrationResponse>(request);
-
- if (result.status === 201) {
- return result.body;
- } else {
- return result;
- }
+ scope: 'meeting:write:registrant',
+ });
},
});
diff --git a/packages/pieces/community/zoom/src/lib/actions/create-meeting.ts b/packages/pieces/community/zoom/src/lib/actions/create-meeting.ts
index ae488a37ab9..3ef17d9b755 100644
--- a/packages/pieces/community/zoom/src/lib/actions/create-meeting.ts
+++ b/packages/pieces/community/zoom/src/lib/actions/create-meeting.ts
@@ -1,54 +1,20 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import {
- HttpRequest,
- HttpMethod,
- AuthenticationType,
- httpClient,
-} from '@activepieces/pieces-common';
-import { MeetingMessageBody, MeetingResponseBody } from '../common/models';
+import { HttpMethod } from '@activepieces/pieces-common';
+import { MeetingMessageBody } from '../common/models';
+import { zoomClient } from '../common/client';
+import { createMeetingOutputSchema } from '../output-schemas';
import { zoomAuth } from '../..';
-const defaults = {
- agenda: 'My Meeting',
- default_password: false,
- duration: 30,
- pre_schedule: false,
-
- settings: {
- allow_multiple_devices: true,
- approval_type: 2,
- audio: 'telephony',
-
- calendar_type: 1,
- close_registration: false,
-
- email_notification: true,
- host_video: true,
- join_before_host: false,
- meeting_authentication: true,
- mute_upon_entry: false,
- participant_video: false,
- private_meeting: false,
- registrants_confirmation_email: true,
- registrants_email_notification: true,
- registration_type: 1,
- show_share_button: true,
- host_save_video_order: true,
- },
-
- timezone: 'UTC',
- type: 2,
-};
-
const action = () => {
return createAction({
auth: zoomAuth,
- name: 'zoom_create_meeting', // Must be a unique across the piece, this shouldn't be changed.
+ name: 'zoom_create_meeting',
classification: 'WRITE',
displayName: 'Create Zoom Meeting',
description: 'Create a new Zoom Meeting',
audience: 'both',
- aiMetadata: { description: 'Schedules a new Zoom meeting on the authenticated user\'s account, returning the meeting ID and join URL. Use to set up a video call; only the topic is required, with optional start time, duration, password, and audio/recording settings. Each call creates a distinct meeting, so it is not idempotent.', idempotent: false },
+ aiMetadata: { description: 'Schedules a new Zoom meeting on the authenticated user\'s account, returning the meeting ID and join URL. Use to set up a video call; only the topic is required, with optional start time and timezone, duration, password, sign-in requirement and audio/recording settings. Each call creates a distinct meeting, so it is not idempotent.', idempotent: false },
+ outputSchema: createMeetingOutputSchema,
props: {
topic: Property.ShortText({
displayName: "Meeting's topic",
@@ -57,7 +23,12 @@ const action = () => {
}),
start_time: Property.ShortText({
displayName: 'Start Time',
- description: 'Meeting start date-time',
+ description: 'Meeting start date-time, for example 2026-11-01T15:00:00 (read in the Timezone below) or 2026-11-01T15:00:00Z (UTC).',
+ required: false,
+ }),
+ timezone: Property.ShortText({
+ displayName: 'Timezone',
+ description: 'IANA timezone for the start time, for example America/New_York. Defaults to UTC.',
required: false,
}),
duration: Property.Number({
@@ -115,44 +86,81 @@ const action = () => {
}),
join_url: Property.LongText({
displayName: 'Join URL',
- description: 'URL for participants to join the meeting.',
+ description: 'Not used by Zoom (kept for compatibility). Zoom creates the join URL and returns it in the output.',
+ required: false,
+ }),
+ require_authentication: Property.Checkbox({
+ displayName: 'Require Zoom Sign-in to Join',
+ description: 'When on, only participants signed in to a Zoom account can join. Turn off to let anyone with the link join.',
required: false,
+ defaultValue: true,
}),
},
async run(context) {
- const body: MeetingMessageBody = {
- ...defaults,
- ...context.propsValue,
- };
-
- if (context.propsValue.auto_recording) {
- body.settings.auto_recording = context.propsValue.auto_recording;
- }
-
- if (context.propsValue.audio) {
- body.settings.audio = context.propsValue.audio;
- }
- delete body['auth'];
- const request: HttpRequest<MeetingMessageBody> = {
+ const body = buildCreateMeetingBody({ propsValue: context.propsValue });
+ const response = await zoomClient.requestObject({
+ accessToken: context.auth.access_token,
method: HttpMethod.POST,
- url: `https://api.zoom.us/v2/users/me/meetings`,
- body: body,
- authentication: {
- type: AuthenticationType.BEARER_TOKEN,
- token: context.auth.access_token,
- },
- queryParams: {},
- };
-
- const result = await httpClient.sendRequest<MeetingResponseBody>(request);
-
- if (result.status === 201) {
- return result.body;
- } else {
- return result;
- }
+ path: '/users/me/meetings',
+ body,
+ scope: 'meeting:write:meeting',
+ });
+ return response;
},
});
};
export const zoomCreateMeeting = action();
+
+function buildCreateMeetingBody({ propsValue }: { propsValue: CreateMeetingProps }): MeetingMessageBody {
+ const settings: MeetingMessageBody['settings'] = {
+ allow_multiple_devices: true,
+ approval_type: 2,
+ audio: propsValue.audio ?? 'telephony',
+ calendar_type: 1,
+ close_registration: false,
+ email_notification: true,
+ host_video: true,
+ join_before_host: false,
+ meeting_authentication: propsValue.require_authentication ?? true,
+ mute_upon_entry: false,
+ participant_video: false,
+ private_meeting: false,
+ registrants_confirmation_email: true,
+ registrants_email_notification: true,
+ registration_type: 1,
+ show_share_button: true,
+ host_save_video_order: true,
+ ...(propsValue.auto_recording ? { auto_recording: propsValue.auto_recording } : {}),
+ };
+ const startTime = zoomClient.optionalText(propsValue.start_time);
+ const password = zoomClient.optionalText(propsValue.password);
+ const scheduleFor = zoomClient.optionalText(propsValue.schedule_for);
+ return {
+ topic: propsValue.topic,
+ type: 2,
+ agenda: zoomClient.optionalText(propsValue.agenda) ?? 'My Meeting',
+ default_password: false,
+ duration: typeof propsValue.duration === 'number' ? propsValue.duration : 30,
+ pre_schedule: propsValue.pre_schedule ?? false,
+ timezone: zoomClient.optionalText(propsValue.timezone) ?? 'UTC',
+ ...(startTime ? { start_time: startTime } : {}),
+ ...(password ? { password } : {}),
+ ...(scheduleFor ? { schedule_for: scheduleFor } : {}),
+ settings,
+ };
+}
+
+type CreateMeetingProps = {
+ topic: string;
+ start_time?: string;
+ timezone?: string;
+ duration?: number;
+ auto_recording?: string;
+ audio?: string;
+ agenda?: string;
+ password?: string;
+ pre_schedule?: boolean;
+ schedule_for?: string;
+ require_authentication?: boolean;
+};
diff --git a/packages/pieces/community/zoom/src/lib/actions/delete-meeting.ts b/packages/pieces/community/zoom/src/lib/actions/delete-meeting.ts
new file mode 100644
index 00000000000..40a0076ce9d
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/actions/delete-meeting.ts
@@ -0,0 +1,59 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { HttpMethod } from '@activepieces/pieces-common';
+import { zoomAuth } from '../..';
+import { ZoomApiError, zoomClient } from '../common/client';
+import { zoomProps } from '../common/props';
+import { deleteMeetingOutputSchema } from '../output-schemas';
+
+export const zoomDeleteMeeting = createAction({
+ auth: zoomAuth,
+ name: 'zoom_delete_meeting',
+ displayName: 'Delete Meeting',
+ description: 'Delete a meeting, or one occurrence of a recurring meeting.',
+ classification: 'DESTRUCTIVE',
+ audience: 'both',
+ aiMetadata: {
+ description: 'Deletes a Zoom meeting, or one occurrence of a recurring meeting, and can email the host and registrants a cancellation. Use only when the user asks to cancel a meeting; this cannot be undone. Not idempotent: a repeat call fails with meeting not found, because Zoom cannot tell an already-deleted meeting from a wrong ID.',
+ idempotent: false,
+ },
+ outputSchema: deleteMeetingOutputSchema,
+ props: {
+ meeting_id: zoomProps.meetingId({ description: 'The numeric Zoom meeting ID to delete, for example 85746065432. Find it with List Meetings.' }),
+ occurrence_id: zoomProps.occurrenceId(),
+ schedule_for_reminder: Property.Checkbox({
+ displayName: 'Notify Host and Alternative Hosts',
+ description: 'Email the host and alternative hosts that the meeting was cancelled.',
+ required: false,
+ defaultValue: false,
+ }),
+ cancel_meeting_reminder: Property.Checkbox({
+ displayName: 'Notify Registrants',
+ description: 'Email registrants that the meeting was cancelled.',
+ required: false,
+ defaultValue: false,
+ }),
+ },
+ async run(context) {
+ const meetingId = zoomClient.normalizeMeetingId(context.propsValue.meeting_id);
+ const occurrenceId = zoomClient.optionalText(context.propsValue.occurrence_id);
+ try {
+ await zoomClient.request({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.DELETE,
+ path: `/meetings/${meetingId}`,
+ query: {
+ occurrence_id: occurrenceId,
+ schedule_for_reminder: context.propsValue.schedule_for_reminder === true ? 'true' : 'false',
+ cancel_meeting_reminder: context.propsValue.cancel_meeting_reminder === true ? 'true' : 'false',
+ },
+ scope: 'meeting:delete:meeting',
+ });
+ } catch (error) {
+ if (error instanceof ZoomApiError && error.status === 404 && error.code === 3001) {
+ throw new Error(`Zoom meeting ${meetingId} was not found. It may already be deleted, or the meeting ID is wrong. Check it with List Meetings.`);
+ }
+ throw error;
+ }
+ return { success: true, meeting_id: meetingId, occurrence_id: occurrenceId ?? null };
+ },
+});
diff --git a/packages/pieces/community/zoom/src/lib/actions/find-meeting.ts b/packages/pieces/community/zoom/src/lib/actions/find-meeting.ts
index 4359299b144..ef1f3b1a0f2 100644
--- a/packages/pieces/community/zoom/src/lib/actions/find-meeting.ts
+++ b/packages/pieces/community/zoom/src/lib/actions/find-meeting.ts
@@ -1,11 +1,7 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import {
- HttpMethod,
- AuthenticationType,
- httpClient,
-} from '@activepieces/pieces-common';
-import { MeetingResponseBody } from '../common/models';
import { zoomMeetingDropdown } from '../common/props';
+import { zoomMeetings } from '../common/meetings';
+import { getMeetingOutputSchema } from '../output-schemas';
import { zoomAuth } from '../..';
export const zoomFindMeeting = createAction({
@@ -14,8 +10,9 @@ export const zoomFindMeeting = createAction({
classification: 'READ',
displayName: 'Find Zoom Meeting',
description: 'Retrieve the details of an existing meeting.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Fetches the full details of an existing Zoom meeting by its meeting ID. Use to look up a meeting before acting on it; optionally target a specific occurrence of a recurring meeting or include all previous occurrences. Read-only and idempotent.', idempotent: true },
+ outputSchema: getMeetingOutputSchema,
props: {
meeting_id: zoomMeetingDropdown,
occurrence_id: Property.ShortText({
@@ -33,28 +30,11 @@ export const zoomFindMeeting = createAction({
}),
},
async run(context) {
- const cleanMeetingId = context.propsValue.meeting_id;
-
- const queryParams: Record<string, string> = {};
-
- if (context.propsValue.occurrence_id) {
- queryParams['occurrence_id'] = context.propsValue.occurrence_id;
- }
-
- if (context.propsValue.show_previous_occurrences) {
- queryParams['show_previous_occurrences'] = 'true';
- }
-
- const result = await httpClient.sendRequest<MeetingResponseBody>({
- method: HttpMethod.GET,
- url: `https://api.zoom.us/v2/meetings/${cleanMeetingId}`,
- authentication: {
- type: AuthenticationType.BEARER_TOKEN,
- token: context.auth.access_token,
- },
- queryParams,
+ return zoomMeetings.getMeeting({
+ accessToken: context.auth.access_token,
+ meetingId: context.propsValue.meeting_id,
+ occurrenceId: context.propsValue.occurrence_id,
+ showPreviousOccurrences: context.propsValue.show_previous_occurrences,
});
-
- return result.body;
},
});
diff --git a/packages/pieces/community/zoom/src/lib/actions/get-current-user.ts b/packages/pieces/community/zoom/src/lib/actions/get-current-user.ts
new file mode 100644
index 00000000000..063ffdb91ef
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/actions/get-current-user.ts
@@ -0,0 +1,28 @@
+import { createAction } from '@activepieces/pieces-framework';
+import { HttpMethod } from '@activepieces/pieces-common';
+import { zoomAuth } from '../..';
+import { zoomClient } from '../common/client';
+import { getCurrentUserOutputSchema } from '../output-schemas';
+
+export const zoomGetCurrentUser = createAction({
+ auth: zoomAuth,
+ name: 'zoom_get_current_user',
+ displayName: 'Get Current User',
+ description: 'Get the profile of the Zoom user behind this connection.',
+ classification: 'READ',
+ audience: 'both',
+ aiMetadata: {
+ description: "Returns the profile of the Zoom user behind this connection (ID, email, name, plan type, timezone, personal meeting ID). Use to learn whose account the agent acts on, whether the plan is free or licensed, or the user's timezone before scheduling. Read-only and idempotent.",
+ idempotent: true,
+ },
+ outputSchema: getCurrentUserOutputSchema,
+ props: {},
+ async run(context) {
+ return zoomClient.requestObject({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ path: '/users/me',
+ scope: 'user:read:user',
+ });
+ },
+});
diff --git a/packages/pieces/community/zoom/src/lib/actions/get-meeting.ts b/packages/pieces/community/zoom/src/lib/actions/get-meeting.ts
new file mode 100644
index 00000000000..6b74104ebba
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/actions/get-meeting.ts
@@ -0,0 +1,37 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { zoomAuth } from '../..';
+import { zoomMeetings } from '../common/meetings';
+import { zoomProps } from '../common/props';
+import { getMeetingOutputSchema } from '../output-schemas';
+
+export const zoomGetMeeting = createAction({
+ auth: zoomAuth,
+ name: 'zoom_get_meeting',
+ displayName: 'Get Meeting',
+ description: 'Get the details of a meeting by its meeting ID.',
+ classification: 'READ',
+ audience: 'ai',
+ aiMetadata: {
+ description: 'Fetches one Zoom meeting by its numeric meeting ID, optionally a specific occurrence of a recurring meeting. Use after List Meetings or Create Meeting to read the join URL, settings or start time. Read-only and idempotent.',
+ idempotent: true,
+ },
+ outputSchema: getMeetingOutputSchema,
+ props: {
+ meeting_id: zoomProps.meetingId({ description: 'The numeric Zoom meeting ID, for example 85746065432.' }),
+ occurrence_id: zoomProps.occurrenceId(),
+ show_previous_occurrences: Property.Checkbox({
+ displayName: 'Show Previous Occurrences',
+ description: 'For recurring meetings: also include occurrences that already happened.',
+ required: false,
+ defaultValue: false,
+ }),
+ },
+ async run(context) {
+ return zoomMeetings.getMeeting({
+ accessToken: context.auth.access_token,
+ meetingId: context.propsValue.meeting_id,
+ occurrenceId: context.propsValue.occurrence_id,
+ showPreviousOccurrences: context.propsValue.show_previous_occurrences,
+ });
+ },
+});
diff --git a/packages/pieces/community/zoom/src/lib/actions/list-meetings.ts b/packages/pieces/community/zoom/src/lib/actions/list-meetings.ts
new file mode 100644
index 00000000000..7c24d449f4b
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/actions/list-meetings.ts
@@ -0,0 +1,55 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { HttpMethod } from '@activepieces/pieces-common';
+import { zoomAuth } from '../..';
+import { zoomClient } from '../common/client';
+import { zoomProps } from '../common/props';
+import { listMeetingsOutputSchema } from '../output-schemas';
+
+export const zoomListMeetings = createAction({
+ auth: zoomAuth,
+ name: 'zoom_list_meetings',
+ displayName: 'List Meetings',
+ description: 'List the meetings of the connected Zoom user, one page at a time.',
+ classification: 'SEARCH',
+ audience: 'both',
+ aiMetadata: {
+ description: "Lists the connected user's meetings of one type (scheduled, live, upcoming or previous), one page at a time with a next_page_token. Use to find a meeting ID before getting, updating or deleting it. Read-only and idempotent.",
+ idempotent: true,
+ },
+ outputSchema: listMeetingsOutputSchema,
+ props: {
+ type: Property.StaticDropdown({
+ displayName: 'Meeting Type',
+ description: 'Which meetings to list.',
+ required: false,
+ defaultValue: 'scheduled',
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Scheduled (all valid scheduled meetings)', value: 'scheduled' },
+ { label: 'Live (in progress)', value: 'live' },
+ { label: 'Upcoming', value: 'upcoming' },
+ { label: 'Upcoming meetings (from today)', value: 'upcoming_meetings' },
+ { label: 'Previous meetings', value: 'previous_meetings' },
+ ],
+ },
+ }),
+ page_size: zoomProps.pageSize(),
+ next_page_token: zoomProps.nextPageToken(),
+ },
+ async run(context) {
+ const pageSize = zoomClient.pageSizeOf({ value: context.propsValue.page_size, fallback: 30 });
+ const body = await zoomClient.requestObject({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ path: '/users/me/meetings',
+ query: {
+ type: zoomClient.optionalText(context.propsValue.type) ?? 'scheduled',
+ page_size: pageSize,
+ next_page_token: zoomClient.optionalText(context.propsValue.next_page_token),
+ },
+ scope: 'meeting:read:list_meetings',
+ });
+ return zoomClient.listPage({ body, itemsKey: 'meetings' });
+ },
+});
diff --git a/packages/pieces/community/zoom/src/lib/actions/list-past-meeting-instances.ts b/packages/pieces/community/zoom/src/lib/actions/list-past-meeting-instances.ts
new file mode 100644
index 00000000000..93dccaa57ae
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/actions/list-past-meeting-instances.ts
@@ -0,0 +1,33 @@
+import { createAction } from '@activepieces/pieces-framework';
+import { HttpMethod } from '@activepieces/pieces-common';
+import { zoomAuth } from '../..';
+import { zoomClient } from '../common/client';
+import { zoomProps } from '../common/props';
+import { listPastMeetingInstancesOutputSchema } from '../output-schemas';
+
+export const zoomListPastMeetingInstances = createAction({
+ auth: zoomAuth,
+ name: 'zoom_list_past_meeting_instances',
+ displayName: 'List Past Meeting Instances',
+ description: 'List the ended instances (UUID and start time) of a meeting.',
+ classification: 'SEARCH',
+ audience: 'both',
+ aiMetadata: {
+ description: 'Lists the ended instances (UUID and start time) of a Zoom meeting ID. Use to find when a meeting, or each occurrence of a recurring meeting, actually took place and get each instance UUID. Read-only and idempotent.',
+ idempotent: true,
+ },
+ outputSchema: listPastMeetingInstancesOutputSchema,
+ props: {
+ meeting_id: zoomProps.meetingId({ description: 'The numeric Zoom meeting ID, for example 85746065432.' }),
+ },
+ async run(context) {
+ const meetingId = zoomClient.normalizeMeetingId(context.propsValue.meeting_id);
+ const body = await zoomClient.requestObject({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ path: `/past_meetings/${meetingId}/instances`,
+ scope: 'meeting:read:list_past_instances',
+ });
+ return { meeting_id: meetingId, meetings: Array.isArray(body['meetings']) ? body['meetings'] : [] };
+ },
+});
diff --git a/packages/pieces/community/zoom/src/lib/actions/list-recordings.ts b/packages/pieces/community/zoom/src/lib/actions/list-recordings.ts
new file mode 100644
index 00000000000..fbebb326ecd
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/actions/list-recordings.ts
@@ -0,0 +1,119 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { HttpMethod } from '@activepieces/pieces-common';
+import { zoomAuth } from '../..';
+import { zoomClient } from '../common/client';
+import { zoomProps } from '../common/props';
+import { listRecordingsOutputSchema } from '../output-schemas';
+
+export const zoomListRecordings = createAction({
+ auth: zoomAuth,
+ name: 'zoom_list_recordings',
+ displayName: 'List Cloud Recordings',
+ description: 'List the cloud recordings of the connected user between two dates (paid Zoom plan with cloud recording).',
+ classification: 'SEARCH',
+ audience: 'both',
+ aiMetadata: {
+ description: "Lists the connected user's Zoom cloud recordings for meetings between two dates at most one month apart, one page at a time with a next_page_token. When passing next_page_token, also pass the from and to values returned with it. Use to find recordings of recent meetings; needs a paid plan with cloud recording. Read-only and idempotent.",
+ idempotent: true,
+ },
+ outputSchema: listRecordingsOutputSchema,
+ props: {
+ from: Property.ShortText({
+ displayName: 'From Date',
+ description: 'Start date in YYYY-MM-DD format (UTC), for example 2026-10-01.',
+ required: true,
+ }),
+ to: Property.ShortText({
+ displayName: 'To Date',
+ description: 'End date in YYYY-MM-DD format (UTC), at most one month after From Date. Defaults to today, or to one month after From Date if that is earlier. Required with Next Page Token: use the To value from the previous page so every page covers the same dates.',
+ required: false,
+ }),
+ page_size: zoomProps.pageSize(),
+ next_page_token: zoomProps.nextPageToken(),
+ },
+ async run(context) {
+ const nextPageToken = zoomClient.optionalText(context.propsValue.next_page_token);
+ const range = recordingRange({ from: context.propsValue.from, to: context.propsValue.to, today: new Date(), nextPageToken });
+ const pageSize = zoomClient.pageSizeOf({ value: context.propsValue.page_size, fallback: 30 });
+ const body = await zoomClient.requestObject({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.GET,
+ path: '/users/me/recordings',
+ query: {
+ from: range.from,
+ to: range.to,
+ page_size: pageSize,
+ next_page_token: nextPageToken,
+ },
+ scope: 'cloud_recording:read:list_user_recordings',
+ });
+ return { ...zoomClient.listPage({ body, itemsKey: 'meetings' }), from: range.from, to: range.to };
+ },
+});
+
+function recordingRange({
+ from,
+ to,
+ today,
+ nextPageToken,
+}: {
+ from: unknown;
+ to: unknown;
+ today: Date;
+ nextPageToken?: string;
+}): { from: string; to: string } {
+ const fromDate = parseDay({ value: from, label: 'From Date' });
+ if (fromDate === undefined) {
+ throw new Error('From Date is required, in YYYY-MM-DD format.');
+ }
+ const limit = addOneMonth(fromDate);
+ const givenTo = parseDay({ value: to, label: 'To Date' });
+ if (givenTo === undefined && nextPageToken !== undefined) {
+ throw new Error('To Date is required when Next Page Token is set. Use the From and To values returned with that token, so the next page covers the same dates as the previous one.');
+ }
+ const toDate = givenTo ?? minDate({ a: startOfDay(today), b: limit });
+ if (toDate.getTime() < fromDate.getTime()) {
+ throw new Error('To Date must be on or after From Date.');
+ }
+ if (toDate.getTime() > limit.getTime()) {
+ throw new Error(`Zoom returns at most one month of recordings per request: To Date must be on or before ${formatDay(limit)}. Run the step once per month.`);
+ }
+ return { from: formatDay(fromDate), to: formatDay(toDate) };
+}
+
+function parseDay({ value, label }: { value: unknown; label: string }): Date | undefined {
+ const text = zoomClient.optionalText(value);
+ if (text === undefined) {
+ return undefined;
+ }
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(text);
+ if (!match) {
+ throw new Error(`${label} must be a date in YYYY-MM-DD format with no time part, for example 2026-10-01 (got "${text.slice(0, 40)}").`);
+ }
+ const date = new Date(Date.UTC(Number(match[1]), Number(match[2]) - 1, Number(match[3])));
+ if (formatDay(date) !== `${match[1]}-${match[2]}-${match[3]}`) {
+ throw new Error(`${label} "${text}" is not a real calendar date.`);
+ }
+ return date;
+}
+
+function addOneMonth(date: Date): Date {
+ const year = date.getUTCFullYear();
+ const month = date.getUTCMonth() + 1;
+ const lastDay = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
+ return new Date(Date.UTC(year, month, Math.min(date.getUTCDate(), lastDay)));
+}
+
+function startOfDay(date: Date): Date {
+ return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));
+}
+
+function minDate({ a, b }: { a: Date; b: Date }): Date {
+ return a.getTime() <= b.getTime() ? a : b;
+}
+
+function formatDay(date: Date): string {
+ return date.toISOString().slice(0, 10);
+}
+
+export const listRecordingsHelpers = { recordingRange };
diff --git a/packages/pieces/community/zoom/src/lib/actions/update-meeting-by-id.ts b/packages/pieces/community/zoom/src/lib/actions/update-meeting-by-id.ts
new file mode 100644
index 00000000000..e1b24e3ddaf
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/actions/update-meeting-by-id.ts
@@ -0,0 +1,146 @@
+import { createAction, Property } from '@activepieces/pieces-framework';
+import { HttpMethod } from '@activepieces/pieces-common';
+import { zoomAuth } from '../..';
+import { zoomClient } from '../common/client';
+import { zoomProps } from '../common/props';
+import { updateMeetingByIdOutputSchema } from '../output-schemas';
+
+export const zoomUpdateMeetingById = createAction({
+ auth: zoomAuth,
+ name: 'zoom_update_meeting_by_id',
+ displayName: 'Update Meeting (by ID)',
+ description: 'Change a meeting by its meeting ID. Only the fields you fill in are changed.',
+ classification: 'WRITE',
+ audience: 'ai',
+ aiMetadata: {
+ description: "Changes an existing meeting's topic, start time, duration, timezone, agenda, passcode or settings; omitted fields stay as they are and Clear Agenda blanks the agenda. Use to reschedule or reconfigure a meeting; target one occurrence of a recurring meeting with occurrence_id. Repeating the call with the same values gives the same meeting, so it is idempotent.",
+ idempotent: true,
+ },
+ outputSchema: updateMeetingByIdOutputSchema,
+ props: {
+ meeting_id: zoomProps.meetingId({ description: 'The numeric Zoom meeting ID to change, for example 85746065432.' }),
+ occurrence_id: zoomProps.occurrenceId(),
+ topic: Property.ShortText({ displayName: 'Topic', description: 'New meeting topic.', required: false }),
+ start_time: Property.ShortText({
+ displayName: 'Start Time',
+ description: 'New start date-time, for example 2026-11-01T15:00:00 (read in the meeting timezone) or 2026-11-01T15:00:00Z (UTC).',
+ required: false,
+ }),
+ duration: Property.Number({ displayName: 'Duration (minutes)', description: 'New duration in minutes.', required: false }),
+ timezone: Property.ShortText({ displayName: 'Timezone', description: 'IANA timezone, for example America/New_York.', required: false }),
+ agenda: Property.LongText({ displayName: 'Agenda', description: 'New agenda text.', required: false }),
+ clear_agenda: Property.Checkbox({
+ displayName: 'Clear Agenda',
+ description: 'Turn on to remove the current agenda. Ignored when Agenda is filled in.',
+ required: false,
+ defaultValue: false,
+ }),
+ password: Property.ShortText({
+ displayName: 'Passcode',
+ description: 'New passcode: up to 10 characters, letters, numbers and @ - _ * only.',
+ required: false,
+ }),
+ auto_recording: Property.StaticDropdown({
+ displayName: 'Auto Recording',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Local', value: 'local' },
+ { label: 'Cloud', value: 'cloud' },
+ { label: 'None', value: 'none' },
+ ],
+ },
+ }),
+ audio: Property.StaticDropdown({
+ displayName: 'Audio',
+ required: false,
+ options: {
+ disabled: false,
+ options: [
+ { label: 'Both telephony and VoIP', value: 'both' },
+ { label: 'Telephony only', value: 'telephony' },
+ { label: 'VoIP only', value: 'voip' },
+ { label: 'Third party audio conference', value: 'thirdParty' },
+ ],
+ },
+ }),
+ host_video: Property.Checkbox({ displayName: 'Host Video', description: 'Start video when the host joins.', required: false }),
+ participant_video: Property.Checkbox({ displayName: 'Participant Video', description: 'Start video when participants join.', required: false }),
+ join_before_host: Property.Checkbox({ displayName: 'Join Before Host', description: 'Let participants join before the host.', required: false }),
+ mute_upon_entry: Property.Checkbox({ displayName: 'Mute Upon Entry', description: 'Mute participants when they join.', required: false }),
+ waiting_room: Property.Checkbox({ displayName: 'Waiting Room', description: 'Turn the waiting room on or off.', required: false }),
+ },
+ async run(context) {
+ const meetingId = zoomClient.normalizeMeetingId(context.propsValue.meeting_id);
+ const body = buildUpdateBody({ propsValue: context.propsValue });
+ const updatedFields = [
+ ...Object.keys(body).filter((key) => key !== 'settings'),
+ ...Object.keys(zoomClient.isRecord(body['settings']) ? body['settings'] : {}).map((key) => `settings.${key}`),
+ ];
+ if (updatedFields.length === 0) {
+ throw new Error('Nothing to update: fill in at least one field to change (or turn on Clear Agenda).');
+ }
+ const occurrenceId = zoomClient.optionalText(context.propsValue.occurrence_id);
+ await zoomClient.request({
+ accessToken: context.auth.access_token,
+ method: HttpMethod.PATCH,
+ path: `/meetings/${meetingId}`,
+ query: { occurrence_id: occurrenceId },
+ body,
+ scope: 'meeting:update:meeting',
+ });
+ return {
+ success: true,
+ meeting_id: meetingId,
+ occurrence_id: occurrenceId ?? null,
+ updated_fields: updatedFields,
+ };
+ },
+});
+
+function buildUpdateBody({ propsValue }: { propsValue: UpdateProps }): Record<string, unknown> {
+ const topic = zoomClient.optionalText(propsValue.topic);
+ const startTime = zoomClient.optionalText(propsValue.start_time);
+ const timezone = zoomClient.optionalText(propsValue.timezone);
+ const password = zoomClient.optionalText(propsValue.password);
+ const agenda = typeof propsValue.agenda === 'string' && propsValue.agenda.length > 0 ? propsValue.agenda : undefined;
+ if (propsValue.duration !== undefined && propsValue.duration !== null && (!Number.isInteger(propsValue.duration) || propsValue.duration < 0)) {
+ throw new Error('Duration must be a whole number of minutes.');
+ }
+ const settingEntries = Object.entries({
+ auto_recording: propsValue.auto_recording,
+ audio: propsValue.audio,
+ host_video: propsValue.host_video,
+ participant_video: propsValue.participant_video,
+ join_before_host: propsValue.join_before_host,
+ mute_upon_entry: propsValue.mute_upon_entry,
+ waiting_room: propsValue.waiting_room,
+ }).filter(([, value]) => value !== undefined && value !== null && value !== '');
+ return {
+ ...(topic !== undefined ? { topic } : {}),
+ ...(startTime !== undefined ? { start_time: startTime } : {}),
+ ...(typeof propsValue.duration === 'number' ? { duration: propsValue.duration } : {}),
+ ...(timezone !== undefined ? { timezone } : {}),
+ ...(agenda !== undefined ? { agenda } : propsValue.clear_agenda === true ? { agenda: '' } : {}),
+ ...(password !== undefined ? { password } : {}),
+ ...(settingEntries.length > 0 ? { settings: Object.fromEntries(settingEntries) } : {}),
+ };
+}
+
+type UpdateProps = {
+ topic?: string;
+ start_time?: string;
+ duration?: number | null;
+ timezone?: string;
+ agenda?: string;
+ clear_agenda?: boolean;
+ password?: string;
+ auto_recording?: string;
+ audio?: string;
+ host_video?: boolean;
+ participant_video?: boolean;
+ join_before_host?: boolean;
+ mute_upon_entry?: boolean;
+ waiting_room?: boolean;
+};
diff --git a/packages/pieces/community/zoom/src/lib/actions/update-meeting.ts b/packages/pieces/community/zoom/src/lib/actions/update-meeting.ts
index 0795caeeca5..64d0c5d1a12 100644
--- a/packages/pieces/community/zoom/src/lib/actions/update-meeting.ts
+++ b/packages/pieces/community/zoom/src/lib/actions/update-meeting.ts
@@ -1,11 +1,9 @@
import { createAction, Property } from '@activepieces/pieces-framework';
-import {
- HttpMethod,
- AuthenticationType,
- httpClient,
-} from '@activepieces/pieces-common';
+import { HttpMethod } from '@activepieces/pieces-common';
import { MeetingMessageBody } from '../common/models';
import { zoomMeetingDropdown } from '../common/props';
+import { zoomClient } from '../common/client';
+import { updateMeetingOutputSchema } from '../output-schemas';
import { zoomAuth } from '../..';
export const zoomUpdateMeeting = createAction({
@@ -14,8 +12,9 @@ export const zoomUpdateMeeting = createAction({
classification: 'WRITE',
displayName: 'Update Zoom Meeting',
description: 'Update the details of an existing meeting.',
- audience: 'both',
+ audience: 'human',
aiMetadata: { description: 'Modifies an existing Zoom meeting identified by its meeting ID, applying only the fields you supply (topic, start time, duration, timezone, password, and audio/video/recording/waiting-room settings). Use to reschedule or reconfigure a meeting. Repeating the call with the same values produces the same end state, so it is idempotent.', idempotent: true },
+ outputSchema: updateMeetingOutputSchema,
props: {
meeting_id: zoomMeetingDropdown,
topic: Property.ShortText({
@@ -103,7 +102,7 @@ export const zoomUpdateMeeting = createAction({
}),
},
async run(context) {
- const cleanMeetingId = context.propsValue.meeting_id;
+ const cleanMeetingId = zoomClient.normalizeMeetingId(context.propsValue.meeting_id);
const body: Partial<MeetingMessageBody> = {};
@@ -118,7 +117,7 @@ export const zoomUpdateMeeting = createAction({
if (context.propsValue.password)
body.password = context.propsValue.password;
- const settings: Partial<MeetingMessageBody['settings']> = {};
+ const settings: MeetingMessageBody['settings'] = {};
let hasSettings = false;
if (context.propsValue.auto_recording) {
@@ -151,19 +150,17 @@ export const zoomUpdateMeeting = createAction({
}
if (hasSettings) {
- body.settings = settings as MeetingMessageBody['settings'];
+ body.settings = settings;
}
- await httpClient.sendRequest({
+ await zoomClient.request({
+ accessToken: context.auth.access_token,
method: HttpMethod.PATCH,
- url: `https://api.zoom.us/v2/meetings/${cleanMeetingId}`,
+ path: `/meetings/${cleanMeetingId}`,
body,
- authentication: {
- type: AuthenticationType.BEARER_TOKEN,
- token: context.auth.access_token,
- },
+ scope: 'meeting:update:meeting',
});
- return { success: true, message: 'Meeting updated successfully' };
+ return { success: true, message: 'Meeting updated successfully', meeting_id: cleanMeetingId };
},
});
diff --git a/packages/pieces/community/zoom/src/lib/common/client.ts b/packages/pieces/community/zoom/src/lib/common/client.ts
new file mode 100644
index 00000000000..c12203242c9
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/common/client.ts
@@ -0,0 +1,278 @@
+import { httpClient, HttpMethod } from '@activepieces/pieces-common';
+
+const ZOOM_API_BASE_URL = 'https://api.zoom.us/v2';
+const ZOOM_REQUEST_TIMEOUT_MS = 30000;
+const DETAIL_MAX_LENGTH = 500;
+
+export class ZoomApiError extends Error {
+ readonly status: number;
+ readonly code: number | undefined;
+ readonly responseBody: unknown;
+
+ constructor({
+ status,
+ code,
+ message,
+ responseBody,
+ }: {
+ status: number;
+ code: number | undefined;
+ message: string;
+ responseBody: unknown;
+ }) {
+ super(message);
+ this.name = 'ZoomApiError';
+ this.status = status;
+ this.code = code;
+ this.responseBody = responseBody;
+ }
+}
+
+function isRecord(value: unknown): value is Record<string, unknown> {
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
+}
+
+function zoomCode(body: unknown): number | undefined {
+ if (!isRecord(body)) {
+ return undefined;
+ }
+ const code = body['code'];
+ if (typeof code === 'number') {
+ return code;
+ }
+ if (typeof code === 'string' && /^\d+$/.test(code)) {
+ return Number(code);
+ }
+ return undefined;
+}
+
+function zoomDetail(body: unknown): string {
+ if (isRecord(body)) {
+ const message = body['message'];
+ if (typeof message === 'string' && message.trim().length > 0) {
+ return withoutTrailingPeriods(message.trim().slice(0, DETAIL_MAX_LENGTH));
+ }
+ return JSON.stringify(body).slice(0, DETAIL_MAX_LENGTH);
+ }
+ if (typeof body === 'string' && body.trim().length > 0) {
+ return withoutTrailingPeriods(body.trim().slice(0, DETAIL_MAX_LENGTH));
+ }
+ return 'no details returned';
+}
+
+function withoutTrailingPeriods(text: string): string {
+ let end = text.length;
+ while (end > 0 && text[end - 1] === '.') {
+ end--;
+ }
+ return text.slice(0, end);
+}
+
+function missingScopes({ detail, scope }: { detail: string; scope: string | undefined }): string {
+ const match = /scopes?\s*:\s*\[([^\]]*)\]/i.exec(detail);
+ if (match && match[1].trim().length > 0) {
+ return match[1].trim();
+ }
+ return scope ?? 'required by this action';
+}
+
+function zoomErrorMessage({
+ status,
+ responseBody,
+ scope,
+}: {
+ status: number;
+ responseBody: unknown;
+ scope?: string;
+}): string {
+ const code = zoomCode(responseBody);
+ const detail = zoomDetail(responseBody);
+ if (code === 4711 || /does not contain scopes/i.test(detail)) {
+ return `Your Zoom app is missing the scope ${missingScopes({ detail, scope })}. Add it under Scopes in your Zoom Marketplace app, then reconnect this Zoom connection. Zoom said: ${detail}.`;
+ }
+ if (code === 200 && /paid|ZMP/i.test(detail)) {
+ return `This Zoom feature needs a paid (Pro or higher) Zoom plan on the connected account. Zoom said: ${detail}.`;
+ }
+ switch (status) {
+ case 400:
+ return `Zoom rejected the request (400, code ${code ?? 'none'}): ${detail}. Check the values you entered; some features (registration, cloud recording) need a paid Zoom plan.`;
+ case 401:
+ return `Zoom did not accept the connection (401): ${detail}. Reconnect your Zoom account.`;
+ case 403:
+ return `Zoom refused access (403): ${detail}. The connected Zoom user lacks permission for this data, or the feature needs a paid Zoom plan.`;
+ case 404:
+ return `Zoom could not find it (404, code ${code ?? 'none'}): ${detail}. Check the meeting ID.`;
+ case 429:
+ return `Zoom rate limit reached (429): ${detail}. Wait a moment and try again; Zoom limits requests per second and per day by plan.`;
+ default:
+ return `Zoom request failed with HTTP ${status}: ${detail}.`;
+ }
+}
+
+function failureOf(error: unknown): { status: number; responseBody: unknown } | undefined {
+ const response = isRecord(error) && isRecord(error['response']) ? error['response'] : undefined;
+ const status = response?.['status'];
+ if (typeof status !== 'number') {
+ return undefined;
+ }
+ return { status, responseBody: response?.['body'] };
+}
+
+function isAbortError(error: unknown): boolean {
+ let current: unknown = error;
+ for (let depth = 0; depth < 5 && isRecord(current); depth++) {
+ if (current['name'] === 'AbortError' || current['name'] === 'TimeoutError' || current['code'] === 'ABORT_ERR') {
+ return true;
+ }
+ current = current['cause'];
+ }
+ return false;
+}
+
+function toQueryParams(query: ZoomQuery | undefined): Record<string, string> {
+ const params: Record<string, string> = {};
+ for (const [key, value] of Object.entries(query ?? {})) {
+ if (value !== undefined) {
+ params[key] = String(value);
+ }
+ }
+ return params;
+}
+
+function assertApiPath(path: string): void {
+ if (!path.startsWith('/') || path.startsWith('//') || path.includes('..') || path.includes('?') || path.includes('#') || path.includes('://')) {
+ throw new Error(`Refusing to call an unexpected Zoom path: "${path}".`);
+ }
+}
+
+async function zoomRequest<T>({
+ accessToken,
+ method,
+ path,
+ query,
+ body,
+ scope,
+}: {
+ accessToken: string;
+ method: HttpMethod;
+ path: string;
+ query?: ZoomQuery;
+ body?: Record<string, unknown>;
+ scope?: string;
+}): Promise<{ status: number; body: T | undefined }> {
+ assertApiPath(path);
+ try {
+ const response = await httpClient.sendRequest<T>({
+ method,
+ url: `${ZOOM_API_BASE_URL}${path}`,
+ headers: {
+ Authorization: `Bearer ${accessToken}`,
+ Accept: 'application/json',
+ ...(body === undefined ? {} : { 'Content-Type': 'application/json' }),
+ },
+ queryParams: toQueryParams(query),
+ body,
+ timeout: ZOOM_REQUEST_TIMEOUT_MS,
+ });
+ if (response.status < 200 || response.status >= 300) {
+ throw new ZoomApiError({
+ status: response.status,
+ code: zoomCode(response.body),
+ message: zoomErrorMessage({ status: response.status, responseBody: response.body, scope }),
+ responseBody: response.body,
+ });
+ }
+ return { status: response.status, body: response.body };
+ } catch (error) {
+ if (error instanceof ZoomApiError) {
+ throw error;
+ }
+ if (isAbortError(error)) {
+ throw new Error(`Zoom did not answer within ${ZOOM_REQUEST_TIMEOUT_MS / 1000} seconds (${method} ${path}), so the request timed out. Try again in a moment; if it keeps happening, Zoom may be having an outage.`);
+ }
+ const failure = failureOf(error);
+ if (failure === undefined) {
+ throw error;
+ }
+ throw new ZoomApiError({
+ status: failure.status,
+ code: zoomCode(failure.responseBody),
+ message: zoomErrorMessage({ ...failure, scope }),
+ responseBody: failure.responseBody,
+ });
+ }
+}
+
+async function zoomRequestObject({
+ accessToken,
+ method,
+ path,
+ query,
+ body,
+ scope,
+}: Parameters<typeof zoomRequest>[0]): Promise<Record<string, unknown>> {
+ const response = await zoomRequest<unknown>({ accessToken, method, path, query, body, scope });
+ if (!isRecord(response.body)) {
+ throw new Error(`Zoom returned an unexpected response for ${path}: ${JSON.stringify(response.body ?? null).slice(0, 200)}`);
+ }
+ return response.body;
+}
+
+function normalizeMeetingId(raw: unknown): string {
+ const text = String(raw ?? '').replace(/[\s-]/g, '');
+ if (!/^\d{1,19}$/.test(text)) {
+ throw new Error(`"${String(raw ?? '')}" is not a Zoom meeting ID. A meeting ID is a number such as 85746065432 (spaces and dashes are allowed).`);
+ }
+ return text;
+}
+
+function optionalText(value: unknown): string | undefined {
+ if (typeof value !== 'string') {
+ return undefined;
+ }
+ const trimmed = value.trim();
+ return trimmed.length > 0 ? trimmed : undefined;
+}
+
+function pageSizeOf({ value, fallback }: { value: unknown; fallback: number }): number {
+ if (value === undefined || value === null || value === '') {
+ return fallback;
+ }
+ const size = Number(value);
+ if (!Number.isInteger(size) || size < 1 || size > 300) {
+ throw new Error('Page Size must be a whole number from 1 to 300.');
+ }
+ return size;
+}
+
+function listPage({
+ body,
+ itemsKey,
+}: {
+ body: Record<string, unknown>;
+ itemsKey: string;
+}): Record<string, unknown> {
+ const items = body[itemsKey];
+ const token = body['next_page_token'];
+ return {
+ ...body,
+ [itemsKey]: Array.isArray(items) ? items : [],
+ next_page_token: typeof token === 'string' && token.length > 0 ? token : null,
+ has_more: typeof token === 'string' && token.length > 0,
+ };
+}
+
+export const zoomClient = {
+ baseUrl: ZOOM_API_BASE_URL,
+ timeoutMs: ZOOM_REQUEST_TIMEOUT_MS,
+ request: zoomRequest,
+ requestObject: zoomRequestObject,
+ errorMessage: zoomErrorMessage,
+ normalizeMeetingId,
+ optionalText,
+ pageSizeOf,
+ listPage,
+ isRecord,
+};
+
+type ZoomQuery = Record<string, string | number | boolean | undefined>;
diff --git a/packages/pieces/community/zoom/src/lib/common/meetings.ts b/packages/pieces/community/zoom/src/lib/common/meetings.ts
new file mode 100644
index 00000000000..196daf68d20
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/common/meetings.ts
@@ -0,0 +1,30 @@
+import { HttpMethod } from '@activepieces/pieces-common';
+import { zoomClient } from './client';
+
+async function getMeeting({
+ accessToken,
+ meetingId,
+ occurrenceId,
+ showPreviousOccurrences,
+}: {
+ accessToken: string;
+ meetingId: unknown;
+ occurrenceId: unknown;
+ showPreviousOccurrences: unknown;
+}): Promise<Record<string, unknown>> {
+ const id = zoomClient.normalizeMeetingId(meetingId);
+ return zoomClient.requestObject({
+ accessToken,
+ method: HttpMethod.GET,
+ path: `/meetings/${id}`,
+ query: {
+ occurrence_id: zoomClient.optionalText(occurrenceId),
+ show_previous_occurrences: showPreviousOccurrences === true ? 'true' : undefined,
+ },
+ scope: 'meeting:read:meeting',
+ });
+}
+
+export const zoomMeetings = {
+ getMeeting,
+};
diff --git a/packages/pieces/community/zoom/src/lib/common/props.ts b/packages/pieces/community/zoom/src/lib/common/props.ts
index c376fb1c2e4..9c57e9b3b6b 100644
--- a/packages/pieces/community/zoom/src/lib/common/props.ts
+++ b/packages/pieces/community/zoom/src/lib/common/props.ts
@@ -1,10 +1,7 @@
-import { OAuth2PropertyValue, Property } from '@activepieces/pieces-framework';
-import {
- AuthenticationType,
- HttpMethod,
- httpClient,
-} from '@activepieces/pieces-common';
+import { Property } from '@activepieces/pieces-framework';
+import { HttpMethod } from '@activepieces/pieces-common';
import { zoomAuth } from '../..';
+import { ZoomApiError, zoomClient } from './client';
export const zoomMeetingDropdown = Property.Dropdown({
displayName: 'Meeting',
@@ -20,53 +17,16 @@ export const zoomMeetingDropdown = Property.Dropdown({
options: [],
};
}
-
- const accessToken = (auth as OAuth2PropertyValue).access_token;
- const options: { label: string; value: string }[] = [];
- let nextPageToken = '';
-
try {
- do {
- const queryParams: Record<string, string> = {
- type: 'scheduled',
- page_size: '300',
- };
- if (nextPageToken) {
- queryParams['next_page_token'] = nextPageToken;
- }
-
- const res = await httpClient.sendRequest<{
- meetings: { id: number; topic: string }[];
- next_page_token: string;
- }>({
- method: HttpMethod.GET,
- url: 'https://api.zoom.us/v2/users/me/meetings',
- authentication: {
- type: AuthenticationType.BEARER_TOKEN,
- token: accessToken,
- },
- queryParams,
- });
-
- options.push(
- ...res.body.meetings.map((m) => ({
- label: m.topic || `Meeting ${m.id}`,
- value: String(m.id),
- })),
- );
-
- nextPageToken = res.body.next_page_token;
- } while (nextPageToken);
- } catch {
+ const options = await loadScheduledMeetings({ accessToken: auth.access_token });
+ return { disabled: false, options };
+ } catch (error) {
return {
disabled: true,
- placeholder:
- 'Could not load meetings. Ensure your Zoom app has the meeting:read:list_meetings scope.',
+ placeholder: dropdownErrorReason(error),
options: [],
};
}
-
- return { options };
},
});
@@ -128,7 +88,7 @@ export const getRegistarantProps = () => ({
}),
custom_questions: Property.Object({
displayName: 'Custom questions',
- description: '',
+ description: 'Answers to the meeting\'s custom registration questions: use the question title as the key and the answer as the value.',
required: false,
}),
industry: Property.ShortText({
@@ -194,3 +154,75 @@ export const getRegistarantProps = () => ({
},
}),
});
+
+export const zoomProps = {
+ meetingId: ({ description }: { description: string }) =>
+ Property.ShortText({
+ displayName: 'Meeting ID',
+ description,
+ required: true,
+ }),
+ occurrenceId: () =>
+ Property.ShortText({
+ displayName: 'Occurrence ID',
+ description: 'Only for recurring meetings: the occurrence ID of one specific occurrence. Leave empty to target the whole meeting.',
+ required: false,
+ }),
+ pageSize: () =>
+ Property.Number({
+ displayName: 'Page Size',
+ description: 'How many records to return in this page (1-300). Default 30.',
+ required: false,
+ defaultValue: 30,
+ }),
+ nextPageToken: () =>
+ Property.ShortText({
+ displayName: 'Next Page Token',
+ description: 'Leave empty for the first page. To get the next page, paste the Next Page Token from the previous run.',
+ required: false,
+ }),
+};
+
+async function loadScheduledMeetings({ accessToken }: { accessToken: string }): Promise<{ label: string; value: string }[]> {
+ const options: { label: string; value: string }[] = [];
+ const seenTokens = new Set<string>();
+ let nextPageToken: string | undefined = undefined;
+ do {
+ const body: Record<string, unknown> = await zoomClient.requestObject({
+ accessToken,
+ method: HttpMethod.GET,
+ path: '/users/me/meetings',
+ query: { type: 'scheduled', page_size: 300, next_page_token: nextPageToken },
+ scope: 'meeting:read:list_meetings',
+ });
+ const meetings = Array.isArray(body['meetings']) ? body['meetings'] : [];
+ for (const meeting of meetings) {
+ if (zoomClient.isRecord(meeting) && meeting['id'] !== undefined) {
+ const topic = typeof meeting['topic'] === 'string' && meeting['topic'].length > 0 ? meeting['topic'] : `Meeting ${String(meeting['id'])}`;
+ options.push({ label: topic, value: String(meeting['id']) });
+ }
+ }
+ const token = body['next_page_token'];
+ nextPageToken = typeof token === 'string' && token.length > 0 && !seenTokens.has(token) ? token : undefined;
+ if (nextPageToken !== undefined) {
+ seenTokens.add(nextPageToken);
+ }
+ } while (nextPageToken !== undefined);
+ return options;
+}
+
+function dropdownErrorReason(error: unknown): string {
+ if (error instanceof ZoomApiError) {
+ if (error.code === 4711 || /does not contain scopes/i.test(error.message)) {
+ return 'Your Zoom app is missing the meeting:read:list_meetings scope. Add it in the Zoom Marketplace app and reconnect.';
+ }
+ if (error.status === 401) {
+ return 'Zoom did not accept the connection. Reconnect your Zoom account.';
+ }
+ if (error.status === 429) {
+ return 'Zoom rate limit reached. Wait a moment and refresh.';
+ }
+ return `Could not load meetings: ${error.message.slice(0, 200)}`;
+ }
+ return 'Could not load meetings from Zoom. Try again or reconnect your Zoom account.';
+}
diff --git a/packages/pieces/community/zoom/src/lib/output-schemas.ts b/packages/pieces/community/zoom/src/lib/output-schemas.ts
new file mode 100644
index 00000000000..12733a4262c
--- /dev/null
+++ b/packages/pieces/community/zoom/src/lib/output-schemas.ts
@@ -0,0 +1,187 @@
+import { OutputSchema, OutputSchemaField } from '@activepieces/pieces-framework';
+
+const meetingSettingsFields: OutputSchemaField[] = [
+ { key: 'host_video', label: 'Host Video On', format: 'boolean' },
+ { key: 'participant_video', label: 'Participant Video On', format: 'boolean' },
+ { key: 'join_before_host', label: 'Join Before Host', format: 'boolean' },
+ { key: 'mute_upon_entry', label: 'Mute Upon Entry', format: 'boolean' },
+ { key: 'waiting_room', label: 'Waiting Room', format: 'boolean' },
+ { key: 'meeting_authentication', label: 'Sign-in Required', format: 'boolean' },
+ { key: 'auto_recording', label: 'Auto Recording', description: 'local, cloud or none.' },
+ { key: 'audio', label: 'Audio', description: 'both, telephony, voip or thirdParty.' },
+ { key: 'approval_type', label: 'Registration Approval Type', format: 'number', description: '0 automatic, 1 manual, 2 no registration required.' },
+ { key: 'alternative_hosts', label: 'Alternative Hosts' },
+];
+
+const occurrenceFields: OutputSchemaField[] = [
+ { key: 'occurrence_id', label: 'Occurrence ID' },
+ { key: 'start_time', label: 'Start Time', format: 'datetime' },
+ { key: 'duration', label: 'Duration (minutes)', format: 'number' },
+ { key: 'status', label: 'Status' },
+];
+
+const meetingFields: OutputSchemaField[] = [
+ { key: 'id', label: 'Meeting ID', format: 'number' },
+ { key: 'uuid', label: 'Meeting UUID' },
+ { key: 'topic', label: 'Topic' },
+ { key: 'type', label: 'Type', format: 'number', description: '1 instant, 2 scheduled, 3 recurring without fixed time, 8 recurring with fixed time.' },
+ { key: 'status', label: 'Status' },
+ { key: 'start_time', label: 'Start Time', format: 'datetime' },
+ { key: 'duration', label: 'Duration (minutes)', format: 'number' },
+ { key: 'timezone', label: 'Timezone' },
+ { key: 'agenda', label: 'Agenda' },
+ { key: 'join_url', label: 'Join URL', format: 'url' },
+ { key: 'registration_url', label: 'Registration URL', format: 'url', description: 'Only when registration is on (paid plan).' },
+ { key: 'password', label: 'Passcode' },
+ { key: 'host_id', label: 'Host ID' },
+ { key: 'host_email', label: 'Host Email', format: 'email' },
+ { key: 'created_at', label: 'Created At', format: 'datetime' },
+ { key: 'pre_schedule', label: 'Pre-scheduled', format: 'boolean' },
+ { key: 'occurrences', label: 'Occurrences', labelKey: 'start_time', description: 'Only for recurring meetings.', listItems: occurrenceFields },
+ { key: 'settings', label: 'Settings', children: meetingSettingsFields },
+];
+
+const meetingListItemFields: OutputSchemaField[] = [
+ { key: 'id', label: 'Meeting ID', format: 'number' },
+ { key: 'uuid', label: 'Meeting UUID' },
+ { key: 'topic', label: 'Topic' },
+ { key: 'type', label: 'Type', format: 'number' },
+ { key: 'start_time', label: 'Start Time', format: 'datetime' },
+ { key: 'duration', label: 'Duration (minutes)', format: 'number' },
+ { key: 'timezone', label: 'Timezone' },
+ { key: 'agenda', label: 'Agenda' },
+ { key: 'join_url', label: 'Join URL', format: 'url' },
+ { key: 'host_id', label: 'Host ID' },
+ { key: 'created_at', label: 'Created At', format: 'datetime' },
+];
+
+const pagingFields: OutputSchemaField[] = [
+ { key: 'next_page_token', label: 'Next Page Token', description: 'Pass this to the next run to get the next page. Empty when there are no more pages.' },
+ { key: 'has_more', label: 'Has More Pages', format: 'boolean' },
+ { key: 'page_size', label: 'Page Size', format: 'number' },
+ { key: 'total_records', label: 'Total Records (all pages)', format: 'number' },
+];
+
+const recordingFileFields: OutputSchemaField[] = [
+ { key: 'id', label: 'File ID' },
+ { key: 'recording_type', label: 'Recording Type', description: 'For example shared_screen_with_speaker_view, audio_only, chat_file or audio_transcript.' },
+ { key: 'file_type', label: 'File Type', description: 'MP4, M4A, CHAT, TRANSCRIPT, CC, CSV, TIMELINE or SUMMARY.' },
+ { key: 'file_extension', label: 'File Extension' },
+ { key: 'file_size', label: 'File Size', format: 'filesize' },
+ { key: 'recording_start', label: 'Recording Start', format: 'datetime' },
+ { key: 'recording_end', label: 'Recording End', format: 'datetime' },
+ { key: 'play_url', label: 'Play URL', format: 'url' },
+ { key: 'download_url', label: 'Download URL', format: 'url', description: 'Needs a Zoom access token or the recording passcode to download.' },
+ { key: 'status', label: 'Status' },
+];
+
+const recordingMeetingFields: OutputSchemaField[] = [
+ { key: 'id', label: 'Meeting ID', format: 'number' },
+ { key: 'uuid', label: 'Meeting UUID' },
+ { key: 'topic', label: 'Topic' },
+ { key: 'start_time', label: 'Start Time', format: 'datetime' },
+ { key: 'duration', label: 'Duration (minutes)', format: 'number' },
+ { key: 'timezone', label: 'Timezone' },
+ { key: 'total_size', label: 'Total Size', format: 'filesize' },
+ { key: 'recording_count', label: 'Recording Count', format: 'number' },
+ { key: 'share_url', label: 'Share URL', format: 'url' },
+ { key: 'host_id', label: 'Host ID' },
+ { key: 'recording_files', label: 'Recording Files', labelKey: 'recording_type', listItems: recordingFileFields },
+];
+
+export const createMeetingOutputSchema: OutputSchema = {
+ fields: meetingFields,
+};
+
+export const getMeetingOutputSchema: OutputSchema = {
+ fields: meetingFields,
+};
+
+export const updateMeetingOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'meeting_id', label: 'Meeting ID' },
+ { key: 'message', label: 'Message' },
+ ],
+};
+
+export const updateMeetingByIdOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'meeting_id', label: 'Meeting ID' },
+ { key: 'occurrence_id', label: 'Occurrence ID' },
+ { key: 'updated_fields', label: 'Updated Fields' },
+ ],
+};
+
+export const listMeetingsOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'meetings', label: 'Meetings', labelKey: 'topic', listItems: meetingListItemFields },
+ ...pagingFields,
+ ],
+};
+
+export const deleteMeetingOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'success', label: 'Success', format: 'boolean' },
+ { key: 'meeting_id', label: 'Meeting ID' },
+ { key: 'occurrence_id', label: 'Occurrence ID' },
+ ],
+};
+
+export const getCurrentUserOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'id', label: 'User ID' },
+ { key: 'email', label: 'Email', format: 'email' },
+ { key: 'first_name', label: 'First Name' },
+ { key: 'last_name', label: 'Last Name' },
+ { key: 'display_name', label: 'Display Name' },
+ { key: 'type', label: 'Plan Type', format: 'number', description: '1 Basic (free), 2 Licensed, 4 Unassigned without Meetings Basic, 99 None.' },
+ { key: 'timezone', label: 'Timezone' },
+ { key: 'pmi', label: 'Personal Meeting ID', format: 'number' },
+ { key: 'personal_meeting_url', label: 'Personal Meeting URL', format: 'url' },
+ { key: 'language', label: 'Language' },
+ { key: 'status', label: 'Status' },
+ { key: 'role_name', label: 'Role' },
+ { key: 'account_id', label: 'Account ID' },
+ { key: 'pic_url', label: 'Picture', format: 'image' },
+ { key: 'user_created_at', label: 'Created At', format: 'datetime' },
+ { key: 'last_login_time', label: 'Last Login', format: 'datetime' },
+ ],
+};
+
+export const createRegistrantOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'registrant_id', label: 'Registrant ID' },
+ { key: 'id', label: 'Meeting ID', format: 'number' },
+ { key: 'topic', label: 'Topic' },
+ { key: 'start_time', label: 'Start Time', format: 'datetime' },
+ { key: 'join_url', label: 'Personal Join URL', format: 'url' },
+ { key: 'participant_pin_code', label: 'Participant PIN Code', format: 'number' },
+ { key: 'occurrences', label: 'Occurrences', labelKey: 'start_time', listItems: occurrenceFields },
+ ],
+};
+
+export const listPastMeetingInstancesOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'meeting_id', label: 'Meeting ID' },
+ {
+ key: 'meetings',
+ label: 'Instances',
+ labelKey: 'start_time',
+ listItems: [
+ { key: 'uuid', label: 'Instance UUID' },
+ { key: 'start_time', label: 'Start Time', format: 'datetime' },
+ ],
+ },
+ ],
+};
+
+export const listRecordingsOutputSchema: OutputSchema = {
+ fields: [
+ { key: 'from', label: 'From', format: 'date' },
+ { key: 'to', label: 'To', format: 'date' },
+ { key: 'meetings', label: 'Recorded Meetings', labelKey: 'topic', listItems: recordingMeetingFields },
+ ...pagingFields,
+ ],
+};
diff --git a/packages/pieces/community/zoom/test/client.test.ts b/packages/pieces/community/zoom/test/client.test.ts
new file mode 100644
index 00000000000..dd50e9381d5
--- /dev/null
+++ b/packages/pieces/community/zoom/test/client.test.ts
@@ -0,0 +1,105 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import { HttpMethod } from '@activepieces/pieces-common';
+import { ZoomApiError, zoomClient } from '../src/lib/common/client';
+import { installFetch, jsonResponse, requestOf } from './helpers';
+
+afterEach(() => {
+ vi.unstubAllGlobals();
+});
+
+describe('zoomClient.request', () => {
+ it('sends a bearer token, JSON headers and a timeout signal to the Zoom API', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { id: 'u1' } }));
+ const result = await zoomClient.requestObject({ accessToken: 'abc', method: HttpMethod.GET, path: '/users/me', query: { a: 1, b: undefined } });
+ const request = requestOf({ fetchMock, call: 0 });
+ expect(result).toEqual({ id: 'u1' });
+ expect(request.url).toBe('https://api.zoom.us/v2/users/me?a=1');
+ expect(request.headers['authorization']).toBe('Bearer abc');
+ expect(request.hasSignal).toBe(true);
+ });
+
+ it('maps Zoom code 4711 to a missing-scope message naming the scope', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 400, body: { code: 4711, message: 'Invalid access token, does not contain scopes:[cloud_recording:read:list_user_recordings].' } }));
+ const error = await zoomClient.request({ accessToken: 'abc', method: HttpMethod.GET, path: '/users/me/recordings' }).catch((e: unknown) => e);
+ expect(error).toBeInstanceOf(ZoomApiError);
+ expect(String(error)).toContain('missing the scope cloud_recording:read:list_user_recordings');
+ expect(String(error)).toContain('reconnect');
+ });
+
+ it('falls back to the action scope hint when Zoom does not name the scope', () => {
+ const message = zoomClient.errorMessage({ status: 401, responseBody: { code: 4711, message: 'Invalid access token' }, scope: 'user:read:user' });
+ expect(message).toContain('missing the scope user:read:user');
+ });
+
+ it('throws on non-2xx with a truncated vendor message and no body field', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 404, body: { code: 3001, message: 'x'.repeat(2000) } }));
+ const error = await zoomClient.request({ accessToken: 'abc', method: HttpMethod.GET, path: '/meetings/1' }).catch((e: unknown) => e);
+ expect(error).toBeInstanceOf(ZoomApiError);
+ if (!(error instanceof ZoomApiError)) {
+ throw new Error('expected ZoomApiError');
+ }
+ expect(error.status).toBe(404);
+ expect(error.code).toBe(3001);
+ expect(error.message.length).toBeLessThan(700);
+ expect(Object.keys(error)).not.toContain('body');
+ });
+
+ it('names 401 and 429 failures', () => {
+ expect(zoomClient.errorMessage({ status: 401, responseBody: { code: 124, message: 'Invalid access token.' } })).toContain('Reconnect');
+ expect(zoomClient.errorMessage({ status: 429, responseBody: { message: 'Too many requests' } })).toContain('rate limit');
+ });
+
+ it('reports a timeout clearly instead of a raw abort error', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockRejectedValueOnce(new DOMException('This operation was aborted', 'AbortError'));
+ const error = await zoomClient.request({ accessToken: 'abc', method: HttpMethod.GET, path: '/users/me' }).catch((e: unknown) => e);
+ expect(String(error)).toContain('did not answer within 30 seconds');
+ expect(String(error)).toContain('GET /users/me');
+ });
+
+ it('reports a timeout clearly when the abort error is wrapped as a cause', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockRejectedValueOnce(new TypeError('fetch failed', { cause: new DOMException('The operation timed out', 'TimeoutError') }));
+ const error = await zoomClient.request({ accessToken: 'abc', method: HttpMethod.POST, path: '/users/me/meetings', body: { topic: 'x' } }).catch((e: unknown) => e);
+ expect(String(error)).toContain('Zoom did not answer within 30 seconds (POST /users/me/meetings)');
+ expect(error).not.toBeInstanceOf(ZoomApiError);
+ });
+
+ it('keeps HTTP failures as Zoom API errors, not timeouts', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 504, body: { message: 'Gateway timeout' } }));
+ const error = await zoomClient.request({ accessToken: 'abc', method: HttpMethod.GET, path: '/users/me' }).catch((e: unknown) => e);
+ expect(error).toBeInstanceOf(ZoomApiError);
+ expect(String(error)).toContain('HTTP 504');
+ expect(String(error)).not.toContain('did not answer');
+ });
+
+ it('rethrows other network errors unchanged', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockRejectedValueOnce(new TypeError('fetch failed'));
+ await expect(zoomClient.request({ accessToken: 'abc', method: HttpMethod.GET, path: '/users/me' })).rejects.toThrow('fetch failed');
+ });
+
+ it('refuses unexpected paths', async () => {
+ await expect(zoomClient.request({ accessToken: 'abc', method: HttpMethod.GET, path: '//evil.io/x' })).rejects.toThrow('unexpected Zoom path');
+ await expect(zoomClient.request({ accessToken: 'abc', method: HttpMethod.GET, path: '/meetings/../users' })).rejects.toThrow('unexpected Zoom path');
+ });
+});
+
+describe('meeting identifiers', () => {
+ it('normalizes meeting IDs with spaces and rejects text', () => {
+ expect(zoomClient.normalizeMeetingId('857 4606 5432')).toBe('85746065432');
+ expect(zoomClient.normalizeMeetingId(85746065432)).toBe('85746065432');
+ expect(() => zoomClient.normalizeMeetingId('abc')).toThrow('not a Zoom meeting ID');
+ });
+
+ it('validates page size', () => {
+ expect(zoomClient.pageSizeOf({ value: undefined, fallback: 30 })).toBe(30);
+ expect(zoomClient.pageSizeOf({ value: 300, fallback: 30 })).toBe(300);
+ expect(() => zoomClient.pageSizeOf({ value: 301, fallback: 30 })).toThrow('1 to 300');
+ expect(() => zoomClient.pageSizeOf({ value: 0, fallback: 30 })).toThrow('1 to 300');
+ });
+});
diff --git a/packages/pieces/community/zoom/test/create-meeting.test.ts b/packages/pieces/community/zoom/test/create-meeting.test.ts
new file mode 100644
index 00000000000..5262a2c0d86
--- /dev/null
+++ b/packages/pieces/community/zoom/test/create-meeting.test.ts
@@ -0,0 +1,79 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import '../src/index';
+import { zoomCreateMeeting } from '../src/lib/actions/create-meeting';
+import { zoomCreateMeetingRegistrant } from '../src/lib/actions/create-meeting-registrant';
+import { installFetch, jsonResponse, requestOf, runAction } from './helpers';
+
+afterEach(() => {
+ vi.unstubAllGlobals();
+});
+
+describe('Create Meeting', () => {
+ it('does not leak settings from one run into the next', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockImplementation(async () => jsonResponse({ status: 201, body: { id: 1, join_url: 'https://zoom.us/j/1' } }));
+ await runAction({ action: zoomCreateMeeting, propsValue: { topic: 'First', auto_recording: 'cloud', audio: 'voip' } });
+ await runAction({ action: zoomCreateMeeting, propsValue: { topic: 'Second' } });
+ const first = requestOf({ fetchMock, call: 0 }).body;
+ const second = requestOf({ fetchMock, call: 1 }).body;
+ expect(first.settings.auto_recording).toBe('cloud');
+ expect(first.settings.audio).toBe('voip');
+ expect(second.settings.auto_recording).toBeUndefined();
+ expect(second.settings.audio).toBe('telephony');
+ });
+
+ it('builds the body with today\'s defaults and no unknown top-level keys', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 201, body: { id: 1 } }));
+ await runAction({
+ action: zoomCreateMeeting,
+ propsValue: { topic: 'Demo', start_time: '2026-11-01T15:00:00', auto_recording: 'local', join_url: 'https://ignored', audio: 'both' },
+ });
+ const request = requestOf({ fetchMock, call: 0 });
+ expect(request.method).toBe('POST');
+ expect(request.url).toBe('https://api.zoom.us/v2/users/me/meetings');
+ expect(Object.keys(request.body).sort()).toEqual(['agenda', 'default_password', 'duration', 'pre_schedule', 'settings', 'start_time', 'timezone', 'topic', 'type']);
+ expect(request.body).toMatchObject({ topic: 'Demo', type: 2, duration: 30, timezone: 'UTC', agenda: 'My Meeting', start_time: '2026-11-01T15:00:00' });
+ expect(request.body.settings.meeting_authentication).toBe(true);
+ expect(request.body.settings.auto_recording).toBe('local');
+ });
+
+ it('applies the optional timezone and sign-in props', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 201, body: { id: 1 } }));
+ await runAction({ action: zoomCreateMeeting, propsValue: { topic: 'Demo', timezone: 'America/New_York', require_authentication: false, duration: 45 } });
+ const body = requestOf({ fetchMock, call: 0 }).body;
+ expect(body.timezone).toBe('America/New_York');
+ expect(body.duration).toBe(45);
+ expect(body.settings.meeting_authentication).toBe(false);
+ });
+
+ it('returns the created meeting on success and throws on a Zoom error', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 201, body: { id: 99, topic: 'Demo' } }));
+ await expect(runAction({ action: zoomCreateMeeting, propsValue: { topic: 'Demo' } })).resolves.toEqual({ id: 99, topic: 'Demo' });
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 400, body: { code: 300, message: 'Invalid start_time' } }));
+ await expect(runAction({ action: zoomCreateMeeting, propsValue: { topic: 'Demo' } })).rejects.toThrow('Invalid start_time');
+ });
+});
+
+describe('Create Meeting Registrant', () => {
+ it('posts the registrant and maps custom questions', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 201, body: { registrant_id: 'r1', id: 123 } }));
+ const result = await runAction({
+ action: zoomCreateMeetingRegistrant,
+ propsValue: { meeting_id: '123', first_name: 'Ada', email: '[email protected]', custom_questions: { Team: 'Ops' } },
+ });
+ const request = requestOf({ fetchMock, call: 0 });
+ expect(result).toEqual({ registrant_id: 'r1', id: 123 });
+ expect(request.url).toBe('https://api.zoom.us/v2/meetings/123/registrants');
+ expect(request.body).toEqual({ first_name: 'Ada', email: '[email protected]', custom_questions: [{ title: 'Team', value: 'Ops' }] });
+ });
+
+ it('throws instead of returning the raw HTTP response on failure', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 400, body: { code: 4711, message: 'Invalid access token, does not contain scopes:[meeting:write:registrant].' } }));
+ await expect(runAction({ action: zoomCreateMeetingRegistrant, propsValue: { meeting_id: '123', first_name: 'Ada', email: '[email protected]' } })).rejects.toThrow('missing the scope meeting:write:registrant');
+ });
+});
diff --git a/packages/pieces/community/zoom/test/dropdown.test.ts b/packages/pieces/community/zoom/test/dropdown.test.ts
new file mode 100644
index 00000000000..337a9d1d734
--- /dev/null
+++ b/packages/pieces/community/zoom/test/dropdown.test.ts
@@ -0,0 +1,34 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import '../src/index';
+import { zoomMeetingDropdown } from '../src/lib/common/props';
+import { installFetch, jsonResponse, oauthAuth, requestOf } from './helpers';
+
+afterEach(() => {
+ vi.unstubAllGlobals();
+});
+
+function loadOptions() {
+ return Reflect.apply(zoomMeetingDropdown.options, zoomMeetingDropdown, [{ auth: oauthAuth() }, {}]);
+}
+
+describe('meeting dropdown', () => {
+ it('follows every page and stops on a repeated token', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { meetings: [{ id: 1, topic: 'A' }], next_page_token: 't1' } }));
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { meetings: [{ id: 2, topic: '' }], next_page_token: 't1' } }));
+ const result = await loadOptions();
+ expect(result.options).toEqual([{ label: 'A', value: '1' }, { label: 'Meeting 2', value: '2' }]);
+ expect(fetchMock).toHaveBeenCalledTimes(2);
+ expect(requestOf({ fetchMock, call: 1 }).url).toContain('next_page_token=t1');
+ });
+
+ it('names the missing scope and other failures', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 400, body: { code: 4711, message: 'Invalid access token, does not contain scopes:[meeting:read:list_meetings].' } }));
+ expect((await loadOptions()).placeholder).toContain('meeting:read:list_meetings');
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 401, body: { code: 124, message: 'Invalid access token.' } }));
+ expect((await loadOptions()).placeholder).toContain('Reconnect');
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 429, body: { message: 'slow down' } }));
+ expect((await loadOptions()).placeholder).toContain('rate limit');
+ });
+});
diff --git a/packages/pieces/community/zoom/test/helpers.ts b/packages/pieces/community/zoom/test/helpers.ts
new file mode 100644
index 00000000000..9a67b6c26db
--- /dev/null
+++ b/packages/pieces/community/zoom/test/helpers.ts
@@ -0,0 +1,60 @@
+import { AppConnectionType } from '@activepieces/pieces-framework';
+import { vi } from 'vitest';
+import { createMockActionContext } from '../../../framework/src/lib/test';
+
+export function oauthAuth() {
+ return {
+ type: AppConnectionType.OAUTH2,
+ access_token: 'tok_test',
+ client_id: 'client',
+ client_secret: 'secret',
+ redirect_url: 'https://example.com/redirect',
+ token_type: 'Bearer',
+ claimed_at: 0,
+ refresh_token: 'refresh',
+ scope: '',
+ token_url: 'https://zoom.us/oauth/token',
+ data: {},
+ };
+}
+
+export function runAction({
+ action,
+ propsValue,
+}: {
+ action: { run: (context: never) => Promise<unknown> };
+ propsValue: Record<string, unknown>;
+}): Promise<unknown> {
+ const context = { ...createMockActionContext({ propsValue: {} }), propsValue, auth: oauthAuth() };
+ return Reflect.apply(action.run, action, [context]);
+}
+
+export function jsonResponse({ status = 200, body }: { status?: number; body: unknown }): Response {
+ return new Response(body === undefined ? null : JSON.stringify(body), {
+ status,
+ headers: { 'content-type': 'application/json' },
+ });
+}
+
+export function emptyResponse({ status = 204 }: { status?: number }): Response {
+ return new Response(null, { status });
+}
+
+export function installFetch() {
+ const fetchMock = vi.fn();
+ vi.stubGlobal('fetch', fetchMock);
+ return fetchMock;
+}
+
+export function requestOf({ fetchMock, call }: { fetchMock: ReturnType<typeof vi.fn>; call: number }) {
+ const [input, init] = fetchMock.mock.calls[call];
+ const headers = new Headers(init?.headers);
+ const rawBody = init?.body;
+ return {
+ url: String(input),
+ method: String(init?.method ?? 'GET'),
+ headers: Object.fromEntries(headers.entries()),
+ body: typeof rawBody === 'string' ? JSON.parse(rawBody) : undefined,
+ hasSignal: init?.signal !== undefined,
+ };
+}
diff --git a/packages/pieces/community/zoom/test/meetings.test.ts b/packages/pieces/community/zoom/test/meetings.test.ts
new file mode 100644
index 00000000000..29d384ad3e3
--- /dev/null
+++ b/packages/pieces/community/zoom/test/meetings.test.ts
@@ -0,0 +1,128 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import '../src/index';
+import { zoomGetMeeting } from '../src/lib/actions/get-meeting';
+import { zoomFindMeeting } from '../src/lib/actions/find-meeting';
+import { zoomUpdateMeeting } from '../src/lib/actions/update-meeting';
+import { zoomUpdateMeetingById } from '../src/lib/actions/update-meeting-by-id';
+import { zoomListMeetings } from '../src/lib/actions/list-meetings';
+import { zoomDeleteMeeting } from '../src/lib/actions/delete-meeting';
+import { zoomGetCurrentUser } from '../src/lib/actions/get-current-user';
+import { emptyResponse, installFetch, jsonResponse, requestOf, runAction } from './helpers';
+
+afterEach(() => {
+ vi.unstubAllGlobals();
+});
+
+describe('Get Meeting / Find Meeting', () => {
+ it('gets a meeting with occurrence options', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { id: 85746065432, topic: 'T' } }));
+ const result = await runAction({ action: zoomGetMeeting, propsValue: { meeting_id: '857 4606 5432', occurrence_id: '1648194360000', show_previous_occurrences: true } });
+ expect(result).toEqual({ id: 85746065432, topic: 'T' });
+ expect(requestOf({ fetchMock, call: 0 }).url).toBe('https://api.zoom.us/v2/meetings/85746065432?occurrence_id=1648194360000&show_previous_occurrences=true');
+ });
+
+ it('keeps Find Meeting on the same request', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { id: 1 } }));
+ await runAction({ action: zoomFindMeeting, propsValue: { meeting_id: '1', show_previous_occurrences: false } });
+ expect(requestOf({ fetchMock, call: 0 }).url).toBe('https://api.zoom.us/v2/meetings/1');
+ });
+});
+
+describe('Update Meeting (by ID)', () => {
+ it('sends only the fields given', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(emptyResponse({ status: 204 }));
+ const result = await runAction({ action: zoomUpdateMeetingById, propsValue: { meeting_id: '1', topic: 'New', duration: 0, waiting_room: false } });
+ const request = requestOf({ fetchMock, call: 0 });
+ expect(request.method).toBe('PATCH');
+ expect(request.body).toEqual({ topic: 'New', duration: 0, settings: { waiting_room: false } });
+ expect(result).toEqual({ success: true, meeting_id: '1', occurrence_id: null, updated_fields: ['topic', 'duration', 'settings.waiting_room'] });
+ });
+
+ it('clears the agenda with Clear Agenda and targets an occurrence', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(emptyResponse({ status: 204 }));
+ await runAction({ action: zoomUpdateMeetingById, propsValue: { meeting_id: '1', clear_agenda: true, occurrence_id: '42' } });
+ const request = requestOf({ fetchMock, call: 0 });
+ expect(request.url).toBe('https://api.zoom.us/v2/meetings/1?occurrence_id=42');
+ expect(request.body).toEqual({ agenda: '' });
+ });
+
+ it('refuses an empty update before calling Zoom', async () => {
+ const fetchMock = installFetch();
+ await expect(runAction({ action: zoomUpdateMeetingById, propsValue: { meeting_id: '1' } })).rejects.toThrow('Nothing to update');
+ expect(fetchMock).not.toHaveBeenCalled();
+ });
+});
+
+describe('Update Zoom Meeting (existing)', () => {
+ it('returns the meeting ID along with the old fields', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(emptyResponse({ status: 204 }));
+ const result = await runAction({ action: zoomUpdateMeeting, propsValue: { meeting_id: '5', topic: 'X' } });
+ expect(result).toEqual({ success: true, message: 'Meeting updated successfully', meeting_id: '5' });
+ expect(requestOf({ fetchMock, call: 0 }).body).toEqual({ topic: 'X' });
+ });
+});
+
+describe('List Meetings', () => {
+ it('returns one page with the next page token', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { page_size: 2, total_records: 3, next_page_token: 'tok2', meetings: [{ id: 1 }, { id: 2 }] } }));
+ const result = await runAction({ action: zoomListMeetings, propsValue: { type: 'upcoming', page_size: 2, next_page_token: 'tok1' } });
+ expect(requestOf({ fetchMock, call: 0 }).url).toBe('https://api.zoom.us/v2/users/me/meetings?type=upcoming&page_size=2&next_page_token=tok1');
+ expect(result).toMatchObject({ meetings: [{ id: 1 }, { id: 2 }], next_page_token: 'tok2', has_more: true, total_records: 3 });
+ });
+
+ it('reports the last page', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { page_size: 30, total_records: 0, next_page_token: '', meetings: [] } }));
+ const result = await runAction({ action: zoomListMeetings, propsValue: {} });
+ expect(requestOf({ fetchMock, call: 0 }).url).toBe('https://api.zoom.us/v2/users/me/meetings?type=scheduled&page_size=30');
+ expect(result).toMatchObject({ meetings: [], next_page_token: null, has_more: false });
+ });
+});
+
+describe('Delete Meeting', () => {
+ it('deletes and passes reminder flags', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(emptyResponse({ status: 204 }));
+ const result = await runAction({ action: zoomDeleteMeeting, propsValue: { meeting_id: '7', cancel_meeting_reminder: true } });
+ const request = requestOf({ fetchMock, call: 0 });
+ expect(request.method).toBe('DELETE');
+ expect(request.url).toBe('https://api.zoom.us/v2/meetings/7?schedule_for_reminder=false&cancel_meeting_reminder=true');
+ expect(result).toEqual({ success: true, meeting_id: '7', occurrence_id: null });
+ });
+
+ it('sends explicit false for both reminders when the boxes are off, since Zoom defaults schedule_for_reminder to true', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(emptyResponse({ status: 204 }));
+ await runAction({ action: zoomDeleteMeeting, propsValue: { meeting_id: '7' } });
+ const url = new URL(requestOf({ fetchMock, call: 0 }).url);
+ expect(url.searchParams.get('schedule_for_reminder')).toBe('false');
+ expect(url.searchParams.get('cancel_meeting_reminder')).toBe('false');
+ });
+
+ it('fails with a clear message when Zoom does not find the meeting', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 404, body: { code: 3001, message: 'Meeting does not exist: 7.' } }));
+ await expect(runAction({ action: zoomDeleteMeeting, propsValue: { meeting_id: '7' } })).rejects.toThrow('Zoom meeting 7 was not found');
+ });
+
+ it('still fails on other errors', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 404, body: { code: 1001, message: 'User does not exist.' } }));
+ await expect(runAction({ action: zoomDeleteMeeting, propsValue: { meeting_id: '7' } })).rejects.toThrow('User does not exist');
+ });
+});
+
+describe('Get Current User', () => {
+ it('reads /users/me', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { id: 'u1', email: '[email protected]', type: 1 } }));
+ await expect(runAction({ action: zoomGetCurrentUser, propsValue: {} })).resolves.toEqual({ id: 'u1', email: '[email protected]', type: 1 });
+ expect(requestOf({ fetchMock, call: 0 }).url).toBe('https://api.zoom.us/v2/users/me');
+ });
+});
diff --git a/packages/pieces/community/zoom/test/past-meetings-recordings.test.ts b/packages/pieces/community/zoom/test/past-meetings-recordings.test.ts
new file mode 100644
index 00000000000..09c38cf768b
--- /dev/null
+++ b/packages/pieces/community/zoom/test/past-meetings-recordings.test.ts
@@ -0,0 +1,73 @@
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import '../src/index';
+import { zoomListPastMeetingInstances } from '../src/lib/actions/list-past-meeting-instances';
+import { listRecordingsHelpers, zoomListRecordings } from '../src/lib/actions/list-recordings';
+import { installFetch, jsonResponse, requestOf, runAction } from './helpers';
+
+afterEach(() => {
+ vi.unstubAllGlobals();
+});
+
+describe('Past meetings', () => {
+ it('lists past instances', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { meetings: [{ uuid: 'abc==', start_time: '2026-10-01T10:00:00Z' }] } }));
+ const result = await runAction({ action: zoomListPastMeetingInstances, propsValue: { meeting_id: '9' } });
+ expect(requestOf({ fetchMock, call: 0 }).url).toBe('https://api.zoom.us/v2/past_meetings/9/instances');
+ expect(result).toEqual({ meeting_id: '9', meetings: [{ uuid: 'abc==', start_time: '2026-10-01T10:00:00Z' }] });
+ });
+});
+
+describe('Recordings', () => {
+ it('lists recordings for a valid range', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { from: '2026-09-01', to: '2026-09-30', meetings: [], next_page_token: '' } }));
+ await runAction({ action: zoomListRecordings, propsValue: { from: '2026-09-01', to: '2026-09-30' } });
+ expect(requestOf({ fetchMock, call: 0 }).url).toBe('https://api.zoom.us/v2/users/me/recordings?from=2026-09-01&to=2026-09-30&page_size=30');
+ });
+
+ it('validates the date range before calling Zoom', async () => {
+ const fetchMock = installFetch();
+ await expect(runAction({ action: zoomListRecordings, propsValue: { from: '2026-09-01', to: '2026-10-05' } })).rejects.toThrow('at most one month');
+ await expect(runAction({ action: zoomListRecordings, propsValue: { from: '2026-09-10', to: '2026-09-01' } })).rejects.toThrow('on or after');
+ await expect(runAction({ action: zoomListRecordings, propsValue: { from: '2026-02-30' } })).rejects.toThrow('not a real calendar date');
+ await expect(runAction({ action: zoomListRecordings, propsValue: { from: '2026-10-01T12:00:00Z' } })).rejects.toThrow('no time part');
+ await expect(runAction({ action: zoomListRecordings, propsValue: { from: '2026-09-01', to: '2026-09-30 extra' } })).rejects.toThrow('no time part');
+ expect(fetchMock).not.toHaveBeenCalled();
+ });
+
+ it('defaults To Date to today, capped at one month after From Date', () => {
+ const today = new Date(Date.UTC(2026, 9, 5));
+ expect(listRecordingsHelpers.recordingRange({ from: '2026-09-20', to: undefined, today })).toEqual({ from: '2026-09-20', to: '2026-10-05' });
+ expect(listRecordingsHelpers.recordingRange({ from: '2026-01-31', to: undefined, today })).toEqual({ from: '2026-01-31', to: '2026-02-28' });
+ });
+
+ it('returns the date range it used so the next page can reuse it', async () => {
+ vi.useFakeTimers();
+ vi.setSystemTime(new Date(Date.UTC(2026, 9, 5, 23, 59)));
+ try {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { meetings: [], next_page_token: 'tok2' } }));
+ const result = await runAction({ action: zoomListRecordings, propsValue: { from: '2026-09-20' } });
+ expect(result).toMatchObject({ from: '2026-09-20', to: '2026-10-05', next_page_token: 'tok2', has_more: true });
+ vi.setSystemTime(new Date(Date.UTC(2026, 9, 6, 0, 1)));
+ fetchMock.mockResolvedValueOnce(jsonResponse({ body: { meetings: [], next_page_token: '' } }));
+ await runAction({ action: zoomListRecordings, propsValue: { from: '2026-09-20', to: '2026-10-05', next_page_token: 'tok2' } });
+ expect(requestOf({ fetchMock, call: 1 }).url).toBe('https://api.zoom.us/v2/users/me/recordings?from=2026-09-20&to=2026-10-05&page_size=30&next_page_token=tok2');
+ } finally {
+ vi.useRealTimers();
+ }
+ });
+
+ it('requires To Date with a page token so the range cannot shift between pages', async () => {
+ const fetchMock = installFetch();
+ await expect(runAction({ action: zoomListRecordings, propsValue: { from: '2026-09-20', next_page_token: 'tok2' } })).rejects.toThrow('To Date is required when Next Page Token is set');
+ expect(fetchMock).not.toHaveBeenCalled();
+ });
+
+ it('maps Zoom paid-plan errors to a clear message', async () => {
+ const fetchMock = installFetch();
+ fetchMock.mockResolvedValueOnce(jsonResponse({ status: 400, body: { code: 200, message: 'Only available for Paid account.' } }));
+ await expect(runAction({ action: zoomListRecordings, propsValue: { from: '2026-09-01', to: '2026-09-30' } })).rejects.toThrow('needs a paid (Pro or higher) Zoom plan');
+ });
+});
diff --git a/packages/pieces/community/zoom/vitest.config.ts b/packages/pieces/community/zoom/vitest.config.ts
index f520fc14113..d3467bf458b 100644
--- a/packages/pieces/community/zoom/vitest.config.ts
+++ b/packages/pieces/community/zoom/vitest.config.ts
@@ -4,9 +4,11 @@ import { defineConfig } from 'vitest/config'
const repoRoot = path.resolve(__dirname, '../../../..')
export default defineConfig({
+ root: __dirname,
test: {
globals: true,
environment: 'node',
+ include: ['test/**/*.test.ts'],
},
resolve: {
alias: {