Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
import app from "../../zoom.app.mjs";
import utils from "../../common/utils.mjs";

export default {
key: "zoom-add-meeting-registrant",
name: "Add Meeting Registrant",
description: "Registers a participant for a meeting. [See the docs here](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetingRegistrantCreate)",
version: "0.3.3",
description: "Registers a participant for a meeting. Requires a paid Zoom account. [See the documentation](https://developers.zoom.us/docs/api/meetings/#tag/meetings/POST/meetings/{meetingId}/registrants)",
version: "0.3.4",
type: "action",
props: {
app,
meetingId: {
paidAccountAlert: {
propDefinition: [
app,
"meetingId",
"paidAccountAlert",
],
},
occurrenceIds: {
meetingId: {
propDefinition: [
app,
"occurrenceIds",
"meetingId",
],
description: "The Meeting ID to add the registrant to",
},
email: {
propDefinition: [
Expand All @@ -38,6 +40,15 @@ export default {
"lastName",
],
},
occurrenceIds: {
propDefinition: [
app,
"occurrenceIds",
(c) => ({
meetingId: c.meetingId,
}),
],
},
address: {
propDefinition: [
app,
Expand Down Expand Up @@ -160,7 +171,7 @@ export default {
step,
meetingId,
params: {
occurrence_ids: occurrenceIds,
occurrence_ids: occurrenceIds && occurrenceIds.join(","),
},
data: {
email,
Expand All @@ -179,9 +190,7 @@ export default {
role_in_purchase_process: roleInPurchaseProcess,
no_of_employees: noOfEmployees,
comments,
custom_questions: typeof(customQuestions) === "undefined"
? customQuestions
: JSON.parse(customQuestions),
custom_questions: utils.parseObj(customQuestions),
},
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
import app from "../../zoom.app.mjs";
import utils from "../../common/utils.mjs";

export default {
key: "zoom-add-webinar-registrant",
name: "Add Webinar Registrant",
description: "Registers a participant for a webinar. [See the docs here](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarregistrantcreate).",
version: "0.3.3",
description: "Registers a participant for a webinar. Requires a paid Zoom account. [See the documentation](https://developers.zoom.us/docs/api/meetings/#tag/webinars/POST/webinars/{webinarId}/registrants)",
version: "0.3.4",
type: "action",
props: {
app,
webinarId: {
paidAccountAlert: {
propDefinition: [
app,
"webinarId",
"paidAccountAlert",
],
},
occurrenceIds: {
webinarId: {
propDefinition: [
app,
"occurrenceIds",
"webinarId",
],
description: "The Webinar ID to add the registrant to",
},
email: {
propDefinition: [
Expand All @@ -38,6 +40,15 @@ export default {
"lastName",
],
},
occurrenceIds: {
propDefinition: [
app,
"occurrenceIds",
(c) => ({
webinarId: c.webinarId,
}),
],
},
address: {
propDefinition: [
app,
Expand All @@ -50,10 +61,10 @@ export default {
"city",
],
},
country: {
state: {
propDefinition: [
app,
"country",
"state",
],
},
zip: {
Expand All @@ -62,10 +73,10 @@ export default {
"zip",
],
},
state: {
country: {
propDefinition: [
app,
"state",
"country",
],
},
phone: {
Expand Down Expand Up @@ -160,7 +171,7 @@ export default {
step,
webinarId,
params: {
occurrence_ids: occurrenceIds,
occurrence_ids: occurrenceIds && occurrenceIds.join(","),
},
data: {
email,
Expand All @@ -179,9 +190,7 @@ export default {
role_in_purchase_process: roleInPurchaseProcess,
no_of_employees: noOfEmployees,
comments,
custom_questions: typeof(customQuestions) === "undefined"
? customQuestions
: JSON.parse(customQuestions),
custom_questions: utils.parseObj(customQuestions),
},
});

Expand Down
131 changes: 72 additions & 59 deletions components/zoom/actions/create-meeting/create-meeting.mjs
Original file line number Diff line number Diff line change
@@ -1,96 +1,109 @@
// legacy_hash_id: a_l0i2Mn
import { axios } from "@pipedream/platform";
import zoom from "../../zoom.app.mjs";
import utils from "../../common/utils.mjs";

export default {
key: "zoom-create-meeting",
name: "Create Meeting",
description: "Creates a meeting for a user. A maximum of 100 meetings can be created for a user in a day.",
version: "0.1.4",
description: "Creates a meeting for a user. [See the documentation](https://developers.zoom.us/docs/api/meetings/#tag/meetings/POST/users/{userId}/meetings)",
version: "0.1.5",
type: "action",
props: {
zoom: {
type: "app",
app: "zoom",
zoom,
userId: {
propDefinition: [
zoom,
"userId",
],
},
topic: {
type: "string",
description: "Meeting topic",
optional: true,
propDefinition: [
zoom,
"topic",
],
},
type: {
type: "integer",
description: "Meeting type:\n1 - Instant meeting.\n2 - Scheduled meeting.\n3 - Recurring meeting with no fixed time.\n8 - Recurring meeting with fixed time.",
optional: true,
propDefinition: [
zoom,
"type",
],
},
start_time: {
type: "string",
description: "Meeting start time. We support two formats for start_time - local time and GMT.\nTo set time as GMT the format should be yyyy-MM-ddTHH:mm:ssZ.\nTo set time using a specific timezone, use yyyy-MM-ddTHH:mm:ss format and specify the timezone ID in the timezone field OR leave it blank and the timezone set on your Zoom account will be used. You can also set the time as UTC as the timezone field.\nThe start_time should only be used for scheduled and / or recurring webinars with fixed time.",
optional: true,
startTime: {
propDefinition: [
zoom,
"startTime",
],
},
duration: {
type: "integer",
description: "Meeting duration (minutes). Used for scheduled meetings only.",
optional: true,
propDefinition: [
zoom,
"duration",
],
},
timezone: {
type: "string",
description: "Time zone to format start_time. For example, “America/Los_Angeles”. For scheduled meetings only. Please reference our time [zone list](https://marketplace.zoom.us/docs/api-reference/other-references/abbreviation-lists#timezones) for supported time zones and their formats.",
optional: true,
propDefinition: [
zoom,
"timezone",
],
},
password: {
type: "string",
description: "Password to join the meeting. Password may only contain the following characters: [a-z A-Z 0-9 @ - _ *]. Max of 10 characters.",
optional: true,
propDefinition: [
zoom,
"password",
],
},
agenda: {
type: "string",
description: "Meeting description.",
optional: true,
propDefinition: [
zoom,
"agenda",
],
},
tracking_fields: {
type: "any",
description: "Tracking fields.",
optional: true,
trackingFields: {
propDefinition: [
zoom,
"trackingFields",
],
},
recurrence: {
type: "object",
description: "Recurrence object",
optional: true,
propDefinition: [
zoom,
"recurrence",
],
},
settings: {
type: "string",
description: "Meeting settings.",
optional: true,
propDefinition: [
zoom,
"settings",
],
},
},
methods: {
createMeeting({
userId, ...args
}) {
return this.zoom.create({
path: `/users/${userId}/meetings`,
...args,
});
},
},
async run({ $ }) {
//See the API docs here: https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate
const config = {
method: "post",
url: "https://api.zoom.us/v2/users/me/meetings",
const response = await this.createMeeting({
$,
userId: this.userId,
data: {
topic: this.topic,
type: this.type,
start_time: this.start_time,
start_time: this.startTime,
duration: this.duration,
timezone: this.timezone,
password: this.password,
agenda: this.agenda,
tracking_fields: typeof this.tracking_fields == "undefined"
? this.tracking_fields
: JSON.parse(this.tracking_fields),
recurrence: typeof this.recurrence == "undefined"
? this.recurrence
: JSON.parse(this.recurrence),
settings: typeof this.settings == "undefined"
? this.settings
: JSON.parse(this.settings),
},
headers: {
"Authorization": `Bearer ${this.zoom.$auth.oauth_access_token}`,
"Content-Type": "application/json",
tracking_fields: utils.parseObj(this.trackingFields),
recurrence: utils.parseObj(this.recurrence),
settings: utils.parseObj(this.settings),
},
};
return await axios($, config);
});
$.export("$summary", `Successfully created meeting with ID \`${response.id}\``);
return response;
},
};
Loading
Loading