Hello, Guys welcome back to learn How to use the Zoom API to automatically create and schedule Zoom meetings with Google Apps Script. This guide will show you how to use Google Apps Script and the official Zoom API to create user meetings in your Zoom account programmatically.
Go to the Zoom Developer Dashboard and create a new app as a first step. Select JWT as the app type and write down the Zoom API key and secret. We can also develop Zoom apps using the OAuth2 library, but as this app will only be used internally and will not be published to the Zoom marketplace, the JWT technique is preferable.

The app would consist of two steps. We’ll use the /api.zoom.us/v2/users/ API to obtain the Zoom ID of the currently authorised user. To create the actual Zoom meeting, we make a POST request to the /v2/users/ZoomUserId>>/meetings endpoint.
Code: Learn how Businesses can Check Health Status of Employees with Aarogya Setu
Generate the Zoom Access Token
const ZOOM_API_KEY = '<Your Zoom key here>>';
const ZOOM_API_SECRET = '<Your Zoom secret here>';
const ZOOM_EMAIL = '<Your Zoom account email here>';
const getZoomAccessToken = () => {
const encode = (text) => Utilities.base64Encode(text).replace(/=+$/, '');
const header = { alg: 'HS256', typ: 'JWT' };
const encodedHeader = encode(JSON.stringify(header));
const payload = {
iss: ZOOM_API_KEY,
exp: Date.now() + 3600,
};
const encodedPayload = encode(JSON.stringify(payload));
const toSign = `${encodedHeader}.${encodedPayload}`;
const signature = encode(
Utilities.computeHmacSha256Signature(toSign, ZOOM_API_SECRET)
);
return `${toSign}.${signature}`;
};
Code: Best Google Apps Script for Developers
Get the Internal User Id of the current user
const getZoomUserId = () => {
const request = UrlFetchApp.fetch('https://api.zoom.us/v2/users/', {
method: 'GET',
contentType: 'application/json',
headers: { Authorization: `Bearer ${getZoomAccessToken()}` },
});
const { users } = JSON.parse(request.getContentText());
const [{ id } = {}] = users.filter(({ email }) => email === ZOOM_EMAIL);
return id;
};
Schedule a Zoom Meeting
You can hold an instant meeting or arrange a meeting for a specific time. The meeting start time is specified in the format yyyy-MM-ddThh:mm:ss with the timezone specified.
The whole list of meeting possibilities is accessible here, as are the timezones.
const createZoomMeeting = () => {
const meetingOptions = {
topic: 'Zoom Meeting created with Google Script',
type: 1,
start_time: '2020-07-30T10:45:00',
duration: 30,
timezone: 'America/New_York',
password: 'labnol',
agenda: 'Discuss the product launch',
settings: {
auto_recording: 'none',
mute_upon_entry: true,
},
};
const request = UrlFetchApp.fetch(
`https://api.zoom.us/v2/users/${getZoomUserId()}/meetings`,
{
method: 'POST',
contentType: 'application/json',
headers: { Authorization: `Bearer ${getZoomAccessToken()}` },
payload: JSON.stringify(meetingOptions),
}
);
const { join_url, id } = JSON.parse(request.getContentText());
Logger.log(`Zoom meeting ${id} created`, join_url);
};
The app could be improved to automatically add new meeting participants after they register their email addresses on, say, Google Forms. In that case, a POST request is made to /meetings/meetingId/registrants with the participant’s email address and first name in the request body.