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.
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
Every 15 minutes the automation asks Google Drive for items in "Shared with me", newest first.
It compares them with the ones it has already seen.
New items are grouped into one email with the file name, type, who shared it and the link.
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
Build your own
Need it to work differently?
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
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?
Does it include files shared with a group I am in?
Can I only hear about shares from outside my company?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Resize and watermark new photos
Photos dropped into a folder are resized, compressed and watermarked into a web-ready folder.
See how it worksGet told when files change in key folders
You hear about new or edited files in the folders you care about, with who changed them.
See how it worksConvert Word files uploaded to Google Drive into Google Docs
Word, Excel and PowerPoint files dropped in a Drive folder are converted to Google Docs, Sheets or Slides every 5 minutes, and the originals move to an archive folder.
See how it worksKeep exploring
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.