Skip to content

Every 15 minutes

Get an email when a file is shared with you in Google Drive

Files and folders newly shared with your Google account are emailed every 15 minutes with the owner's name and a link.

Runs
Every 15 minutes
Apps
Google Drive
AI
Not needed
Access
drive.metadata.readonly

Send this to your assistant

Create a ClickRuntime automation: every 15 minutes, check Google Drive for files and folders newly shared with me and email me the name, who shared it, the file type and the link.

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

People share Drive files and folders without ticking the notify box all the time, and you find out days later when someone asks whether you looked at the doc. The Shared with me view in Drive has no alert of its own.

This automation checks that view every 15 minutes, compares it with what it has already seen, and emails you any new items with the file name, type, the person who shared it and a direct link.

Freelancers and agencies use it to see client files as soon as they arrive, and people who work across several organisations use it so nothing shared with them sits unopened.

What you get out of it

  • Silent shares caught

    It reads the Shared with me list directly, so shares made without a notification email still reach you.

  • One email per batch

    Several files shared together arrive in a single message, not one email each.

  • Who shared it

    Each entry names the person, which tells you right away whether it needs attention.

  • No history dump

    The first run only records existing shares; you only hear about new ones.

  • Works with folders

    Shared folders are listed too, which is how most clients send a batch of files.

How it works

What happens, step by step

  1. Every 15 minutes the automation asks Google Drive for items in "Shared with me", newest first.

  2. It compares them with the ones it has already seen.

  3. New items are grouped into one email with the file name, type, who shared it and the link.

  4. The first run only records what is already shared, so you are not sent your whole history.

Before it runs live

  • Connect Google Drive

What you get

RunsEvery 15 minutes
Get an email when a file is shared with you in Google Drivetoday, 9:00Succeeded
Email · 2 new files shared with you in DriveQ4 budget v3 (Google Sheets) from Priya Shah https://docs.google.com/spreadsheets/d/… Brand assets (folder) from Leo Martin https://drive.google.com/drive/folders/…

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

  • Act only on the items that match your own rules, and skip the rest
  • 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.
get_an_email_when_a_file_is_shared_with_you_in_google_drive.pyexample
from clickruntime import on_trigger, credentials, http, state, notify

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()

KIND = {"application/vnd.google-apps.document": "Google Docs", "application/vnd.google-apps.spreadsheet": "Google Sheets",
        "application/vnd.google-apps.presentation": "Google Slides", "application/vnd.google-apps.folder": "folder",
        "application/pdf": "PDF"}

@on_trigger
def run(event):
    files = drive("/files", q="sharedWithMe and trashed = false", orderBy="sharedWithMeTime desc", pageSize=50,
                  fields="files(id,name,mimeType,webViewLink,sharedWithMeTime,sharingUser(displayName,emailAddress))")["files"]
    seen = state.get("seen")
    state.set("seen", [f["id"] for f in files])
    if seen is None:
        return {"baseline": len(files)}
    new = [f for f in files if f["id"] not in set(seen)]
    if not new:
        return {"new": 0}
    parts = []
    for f in reversed(new):
        who = (f.get("sharingUser") or {}).get("displayName", "someone")
        parts.append(f"{f['name']} ({KIND.get(f['mimeType'], f['mimeType'].split('/')[-1])}) from {who}\n{f['webViewLink']}")
    notify.email_me(f"{len(new)} new file{'s' if len(new) > 1 else ''} shared with you in Drive", "\n\n".join(parts))
    return {"new": len(new)}

FAQ

Common questions

Google already emails me when something is shared. Why use this?
Google's share email only arrives when the sharer leaves "Notify people" ticked, and it is easy to untick. This checks the Shared with me list itself, so silent shares are caught too.
Does it include files shared with a group I am in?
Shares through a Google group appear in Shared with me for most accounts, so they are included. Files placed in a shared drive you belong to are not; those need a shared drive check instead.
Can I only hear about shares from outside my company?
Yes. Ask for a filter on the sharer's email domain, so only files shared by people outside your domain are emailed.
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 checks. Checks that find nothing new 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 “Get an email when a file is shared with you in Google Drive” from your assistant

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