Archive last night's Zoom cloud recordings to Google Drive

By General Input

Every night we move yesterday's Zoom recordings into dated Drive folders, log every file in a spreadsheet, and recap the whole sweep in Slack.

Integrations

  • Zoom
  • Google Drive
  • Google Sheets
  • Slack Bot

Type

Deterministic Code

Categories

  • Operations

Every night at 1:15am, sweep the previous day's Zoom cloud recordings into Google Drive so we stop hitting our Zoom storage cap. This runs on a cron trigger and should be fully deterministic: no summarizing and no judgement calls, just a reliable archive with an audit trail.

Start by using Zoom's List Users operation to walk every host on the account, filtering to active licensed users. For each host, call List Meetings with the previous meetings filter and keep only the sessions that ended in the last 24 hours. For each of those meetings, call List Meeting Recordings to pull the individual recording files. Zoom's List User Recordings operation accepts a date range and is an acceptable shortcut if it produces the same set of files more efficiently, but the per host walk is the baseline behavior.

Skip any recording shorter than two minutes, measured from the recording start and end timestamps. Those are almost always accidental, where someone started a meeting and immediately ended it. Make the threshold a configurable input that defaults to two minutes.

For each recording that passes the filter, build a Google Drive folder path of year, then month, then host name. Before creating anything, use Google Drive's List Files operation with Drive query syntax to check whether the folder already exists at that level, matching on folder mime type, exact name, and parent folder. Only call Create Folder when the lookup finds nothing, and reuse the returned folder id as the parent for the next level down. Folders must never be duplicated across nightly runs.

Upload both the video file and the transcript for each meeting using Google Drive's Upload File (Resumable) operation. Use the resumable upload, not a multipart upload: multipart caps out at 5MB and Zoom recordings routinely run to hundreds of megabytes. Initiate the upload to get the upload URL, then send the content in chunks that are multiples of 256KB. Fetching the file from Zoom requires appending the Zoom access token to the recording download URL. Treat an upload as successful only when Drive returns a completed file with an id.

For every file uploaded, append a row to a Google Sheets archive index using the Append Values operation. Each row should carry the meeting topic, the host name, the meeting date, the duration, the file size, the file type (video or transcript), and the Drive link to the uploaded file. One row per file, not per meeting, so a meeting with a video and a transcript produces two rows.

When the sweep finishes, post a single Slack message with the Slack Bot Send a Message operation to a configurable channel. Summarize how many recordings were archived, the total gigabytes moved, and an explicit list of any files that failed to upload, named so someone can act on them. One message per run, not one per recording.

Deleting the originals from Zoom with the Delete Meeting Recordings operation must be an option that is switched off by default. This step is destructive, so it may only ever run for a file whose Drive upload was confirmed successful in this same run. If an upload failed, was skipped, or is in any uncertain state, leave the Zoom original completely untouched. Never delete based on the assumption that a previous night's run archived the file.

Handle failures per file rather than aborting the whole sweep: if one recording fails to download or upload, record it as a failure, leave its Zoom original in place, and carry on with the rest. Account wide host enumeration needs an admin level Zoom credential. If only a personal Zoom credential is connected, fall back to archiving just that single host's recordings rather than failing outright. Honor Zoom's rate limits and pagination when walking users, meetings, and recordings.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageLet support send one-off Loops emails without an engineerA brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensStop cold emails to anyone with a live deal in PipedriveLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasoniMessage campaign console with pre-flight checks and delivery board