google-drive-apigoogle-api-nodejs-clientgoogle-meet

How to get the file id of a google meet recording using google api?


This is what I am expecting

Create a calendar event with a google meet link - this is working

When the host records the meeting, it gets saved in the host's drive. We got the drive read permission using scope: https://www.googleapis.com/auth/drive.metadata.readonly

All I need is given the meeting id or calendar id, how to search for the respective recording files in the host's drive?

For example, something like:

const drive = google.drive({ version: "v3", auth: oauth2Client });
const res = await drive.files.list({
    q: "name contains '<meetingid or calender id>'",
    pageSize: 10,
    fields: "nextPageToken, files(id, name)",
});

I just want to get the recording file for given meeting. Thanks in Advance


Solution

  • Suggestion: Modify the Query Under drive.files.list Method

    By default, all meeting recordings as well as meeting transcripts are saved and sent to the meeting organizer's Google drive under the Meet Recordings folder (given that the organizer has not changed the default settings). Also, by default, the file name of the recordings follow the format [Title] ([Date and time of the meeting]). However, there are two cases for the [Title]:

    1. When the event or Google Meet has a title, the Google Meet recordings would have a [Title] following the title of the event or Google Meet (as shown below).

    enter image description here

    1. When the event or Google Meet has no title, the Google Meet recordings would have a [Title] following the Google Meet ID (as shown below).

    enter image description here

    With this, you may want to modify your query (q) under drive.files.list method to:

    "name contains '[Title]'"

    and you may further add the following to make the query more specific:

    "and name contains '[Date and time of the meeting]'"

    References: