How to setup a zoom meeting from Google Apps script?

Description
I am writing a Google Apps script to schedule meetings for Google Calendar, but I also want to set up a zoom meeting for them(our Google Calendar service is integrated with zoom, so just one click will setup the zoom meeting). How should I do it? It seems I can use the URL Fetch service (https://developers.google.com/apps-script/reference/url-fetch), but I cannot create a zoom app since the Google Calendar is managed by the company.

Hey @alex3,

I am not familiar with Google Apps script. Can you just add the Zoom meeting url to the calendar invite, or utilize the Zoom Google Calendar integration?

Not sure what you mean by this.

Thanks,
Tommy

Hi @tommy, thanks for your quick response. We have Zoom Google Calendar integration, which means I just need to click a button when I schedule a meeting from Google Calendar to set up zoom meeting. I want to implement this through Zoom API.

Can you just add the Zoom meeting url to the calendar invite?

What I need is that when I go to the meeting room I added to the Google Calendar event, it should show on the zoom IPAD in the meeting room so people can start the meeting from the IPAD. It cannot be some pre-created zoom meeting url.

but I cannot create a zoom app since the Google Calendar is managed by the company.

Is creating a zoom app the only way to use Zoom API? I suppose I need to install the app, but I am not the zoom admin of the company.

Hey @alex3,

You are using Zoom Rooms right?

Are you trying to create a meeting via the Zoom API, and then add it to the calendar event via Google App Scripts?

If you create a User Level OAuth App, you do not need to be a Zoom admin to use the APIs. If you do not have access to the Zoom App Marketplace, ask your Zoom admin to give you the developer, marketplace, and integrations permissions.

Thanks,
Tommy

I am new to Zoom API, which is really complicated to me. I don’t know what is Zoom Rooms. I need a way to access Zoom API within Google App Scripts. So In Google App Scripts, I want to create a calendar event, and add zoom support.

Hey @alex3,

The easiest way to start is to use a JWT Token, here is how to generate one:

Then to create a meeting, call the Create Meeting API, use the following Google App Scripts code:

var response = UrlFetchApp.fetch("https://api.zoom.us/v2/users/me/meetings", {
  'method' : 'post',
  'contentType': 'application/json',
  'payload' : JSON.stringify({
    'topic': 'Title of Meeting',
    'type': 2,
    'start_time': '2020-01-03T12:00:00Z',
    'duration': 30
  }),
  'headers': {
   'Authorization': 'Bearer JWT_TOKEN_HERE'
  }
});
Logger.log(response.getContentText());

Logger.log(response.getContentText()); will return a JSON body with the Zoom meeting link, which you can insert into the Google Calendar Event.

Let me know if that helps!

Thanks,
Tommy