Create Google Meets Open Room with Calendar API

46 Views Asked by At

I'm currently trying to create Google Meets rooms programmatically. I understand there is no direct Google API to do this and the only work around is to create a calendar event using the Calendar API and add a 'conferencing solution' to that. I have been able to do this, haven't worked out how/if it's possible to create a Google Meets room that's set to 'Open' using this method.

Once an event is created, it's easy to open the calendar, find the event and change it to an open room, but I don't want to have to do any of this manually

function createEventWithMeetsLink() {
  var event = {
    'summary': 'Test',
    'description': 'Test description',
    'start': {
      'dateTime': '2024-01-10T12:00:00-07:00',
      'timeZone': 'America/Los_Angeles',
    },
    'end': {
      'dateTime': '2024-01-10T13:00:00-07:00',
      'timeZone': 'America/Los_Angeles',
    },
    conferenceData: {
      createRequest: {
        requestId: "testRequestID",
        conferenceSolutionKey: {
          type: "hangoutsMeet"
        }
      }
    }
  };

  Calendar.Events.insert(event, "primary", {
    conferenceDataVersion: 1,
  });
}

//This code runs successfully on Google Apps Scripts and creates an event with a private Meets room linked to it
0

There are 0 best solutions below