Skip to content

Weekly

Find files shared outside your company

Each week you get a list of your files shared with anyone with the link or with outside domains.

Runs
Weekly
Apps
Google Drive
AI
Not needed
Access
read (drive.metadata.readonly)

Send this to your assistant

Create a ClickRuntime automation: every Monday, email me all my Drive files shared with anyone with the link or with people outside mycompany.com.

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

Over a few years, a consultant has shared hundreds of Drive files. A proposal was sent to a prospect with Anyone with the link can view, a freelancer who finished a project last spring still has edit access to a financial model, and a folder was shared with a former colleague's personal Gmail address. Nobody reviews this, because Drive has no single screen that shows everything you own that is exposed.

Each week, ClickRuntime lists the files you own along with their permissions, flags any file shared with anyone or with a domain outside your own, and emails you a table. Each row shows the file name, who has access, what they can do and a link, so you can fix a risky file in a couple of clicks.

Small firms without a security team, and anyone handling client or HR documents, get the most from a routine that checks sharing on a schedule.

What you get out of it

  • Public links are found before they leak

    A forgotten Anyone with the link setting can sit on a sensitive file for years. A weekly list brings those files to your attention while the exposure is still hypothetical and not a headline.

  • Old access gets removed

    Freelancers, interns and former partners often keep access long after the work ends. Seeing outside addresses in a table makes it obvious whose access no longer has a reason to exist.

  • Straight answers for client security reviews

    Customers increasingly ask how you control access to their documents. A recurring review, with a record of what was found and cleaned up, is far better than saying you check occasionally.

  • Lower breach and compliance exposure

    Personal data in a publicly shared spreadsheet can trigger notification duties under privacy rules. Catching it early costs a few minutes of cleanup rather than a regulatory conversation. Each week's table is a dated trail of what you checked.

  • Cleanup stays small

    Because the report arrives every week, each one lists only what changed recently. Reviewing five new exposures takes minutes, while a once-a-year audit of thousands of files rarely gets done.

How it works

What happens, step by step

  1. Once a week ClickRuntime goes through every file you own in Google Drive.

  2. It checks who each file is shared with.

  3. It flags files open to anyone with the link or shared with people outside your company.

  4. You get an email listing each flagged file, how it is shared and a link to fix it.

Before it runs live

  • Connect Google Drive

What you get

RunsWeekly
Find files shared outside your companytoday, 9:00Succeeded
Email · 3 files shared outside mycompany.comPricing 2027.xlsx: anyone with the link https://docs.google.com/spreadsheets/d/1AbC/edit

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.
sharing_permissions_audit.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, notify

DOMAIN = "mycompany.com"

@on_trigger
def run(event):
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    lines, token = [], None
    while True:
        page = drive.files().list(q="'me' in owners and trashed = false", pageSize=200, pageToken=token,
                                  fields="nextPageToken, files(name,webViewLink,permissions(type,emailAddress,role))").execute()
        for f in page["files"]:
            risky = [("anyone with the link" if p["type"] == "anyone" else p["emailAddress"])
                     for p in f.get("permissions", [])
                     if p["type"] == "anyone" or (p.get("emailAddress") and not p["emailAddress"].endswith("@" + DOMAIN))]
            if risky:
                lines.append(f"{f['name']}: {', '.join(risky)}\n{f['webViewLink']}")
        token = page.get("nextPageToken")
        if not token:
            break
    notify.email_me(f"{len(lines)} files shared outside {DOMAIN}", "\n\n".join(lines) or "Nothing shared outside.")
    return {"files": len(lines)}

FAQ

Common questions

Does it see files other people own?
No. It reviews files owned by the connected account, because Drive only reports full permission details to owners. If several people share work, each owner can connect their own account, or a Workspace admin can use the admin audit reports for the whole domain.
What counts as an outside domain?
Any email address whose domain differs from yours, such as a client's company address or a personal Gmail account. You can list trusted partner domains that should not be flagged, so a standing client does not appear in every report.
Does it change the permissions itself?
No. It only reports, so nothing is unshared by accident. You decide which links to tighten after reading the table. Removing public access on a file takes a moment in Drive's share dialog once you know which file needs it.
What permissions does it need?
read (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 (weekly). 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 files shared outside your company” from your assistant

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