Skip to content

Monthly

Find the largest files in Google Drive

A monthly email lists the 30 largest files you own in Google Drive, with size, last change date and folder link, so you know what to delete.

Runs
Monthly
Apps
Google Drive
AI
Not needed
Access
drive.metadata.readonly

Send this to your assistant

Create a ClickRuntime automation: on the 1st of each month, email me the 30 largest files I own in Google Drive with their size in MB, last modified date and a link, plus total storage used.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

When Google storage fills up, Gmail stops receiving mail and Drive stops syncing, and Drive's own storage page is slow to sort through. Most of the space usually sits in a handful of old videos and archives.

Once a month this automation asks Drive for the files you own sorted by the storage they use, and emails you the 30 largest with their size, the date they were last changed and a link. It adds your total usage and how much is sitting in the trash.

Small business owners on a single Google account and anyone sharing a family storage plan use it to keep space in check before the "storage full" warning arrives.

What you get out of it

  • The big files first

    Sorting by quota used puts the files that actually free space at the top.

  • Last changed date

    Old, untouched files are the easy deletes, and the date makes them obvious.

  • Trash included

    Files in trash still count against the quota. The email shows how much you get back by emptying it.

  • Report only

    Nothing is moved or deleted without you deciding.

  • Monthly, before it is urgent

    A regular look means you never hit a full mailbox because Drive ran out of space.

How it works

What happens, step by step

  1. On the first of each month the automation asks Drive for files you own, sorted by size.

  2. It keeps the 30 largest and notes their size, type and when they were last changed.

  3. It also reads your total storage use and how much of it sits in Drive versus trash.

  4. You get one email you can work through to free up space.

Before it runs live

  • Connect Google Drive

What you get

RunsMonthly
Find the largest files in Google Drivetoday, 9:00Succeeded
Email · Drive: 13.4 of 15 GB used, top 30 files2,140 MB team-offsite-raw.mp4 (last changed 2025-03-14) 1,310 MB website-backup-2024.zip (2024-12-02) 880 MB Product demo final FINAL.mov (2025-08-21) … Trash: 640 MB (empty it in Drive to reclaim)

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Drive steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
find_the_largest_files_in_google_drive.pyexample
import datetime
from clickruntime import on_trigger, credentials, http, notify

TOP = 30

def drive(path, **params):
    resp = http.get(f"https://www.googleapis.com/drive/v3{path}", params=params,
                    headers={"Authorization": f"Bearer {credentials.connection('google', 'work')}"})
    resp.raise_for_status()
    return resp.json()

@on_trigger
def run(event):
    files = drive("/files", q="'me' in owners and trashed = false and mimeType != 'application/vnd.google-apps.folder'",
                  orderBy="quotaBytesUsed desc", pageSize=TOP,
                  fields="files(name,quotaBytesUsed,modifiedTime,webViewLink)")["files"]
    q = drive("/about", fields="storageQuota")["storageQuota"]
    gb = lambda b: int(b or 0) / 1024 ** 3
    lines = [f"{int(f['quotaBytesUsed']) / 1024 ** 2:8,.0f} MB  {f['name']}  (last changed {f['modifiedTime'][:10]})\n            {f['webViewLink']}"
             for f in files if int(f.get("quotaBytesUsed") or 0) > 0]
    trash = int(q.get("usageInDriveTrash") or 0) / 1024 ** 2
    limit = f"{gb(q['limit']):.0f} GB" if q.get("limit") else "unlimited"
    notify.email_me(f"Drive: {gb(q['usage']):.1f} of {limit} used, top {len(lines)} files",
                    "\n".join(lines) + f"\n\nTrash: {trash:,.0f} MB (empty it in Drive to reclaim)")
    return {"files": len(lines), "usage_gb": round(gb(q["usage"]), 2)}

FAQ

Common questions

Does it delete anything?
No. It only reports. You decide what to remove. If you want, ask your assistant to also move files older than a year into a "To review" folder.
Why do Google Docs not show up?
Native Google Docs, Sheets and Slides usually use no storage quota, so they sort to the bottom. The list is mostly videos, archives, images and PDFs, which is where the space goes.
Is the storage figure shared with Gmail and Photos?
Yes. Google's quota covers Drive, Gmail and Photos together, and the total shown is that shared number. The file list only covers Drive.
What permissions does it need?
drive.metadata.readonly. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (monthly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Find the largest files in Google Drive” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.