Skip to content

Every 10 minutes

Hear when a file lands in a OneDrive folder

You get an email each time a new file appears in the folder you're watching.

Runs
Every 10 minutes
Apps
OneDrive
AI
Not needed
Access
read (Files.Read)

Send this to your assistant

Create a ClickRuntime automation: every 10 minutes, check my OneDrive Scans folder and email me the name and link of any new file.

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

A procurement manager shares a OneDrive folder with suppliers who upload quotes, certificates and signed purchase orders. Files arrive at random times, sometimes with a deadline attached, and nobody tells her. She finds out when she happens to open the folder, which can be a day after the supplier sent a quote that expires at five. OneDrive does send some alerts, but they are easy to miss and not routed to where the team works.

Every 10 minutes, OneDrive's change feed for the folder is read using a stored delta token, so only items that are new since the last check come back. Each new file is announced in a notification with its name, size, who uploaded it and a link, and the token is saved for the next check.

It is also used for scan inboxes, client upload folders and shared project drop zones.

What you get out of it

  • Time-limited uploads are acted on in time

    A supplier quote that expires at close of business is seen within minutes, so you can review and answer before the offer lapses. That quick reaction keeps your negotiating position strong and makes you a dependable partner for your suppliers.

  • Suppliers do not have to email you

    Anyone with access to the folder can just drop a file in and the right person hears about it, which reduces phone calls asking whether it arrived. Anyone with access to the shared folder can simply drop a file in, and you hear about it.

  • Alerts reach the tool you already read

    A notification sent to your team's channel or inbox is more likely to be noticed than a OneDrive banner among dozens of other alerts. Chat or email alerts are visible on your phone, where a OneDrive notification is easy to overlook for days.

  • Nothing is announced twice

    The delta token marks how far the last check read, so each file triggers one alert and the same upload never produces repeated messages. Each file prompts one message, so the alerts stay trustworthy and no one starts ignoring them.

  • A timeline of arrivals

    The stream of notifications shows exactly when each document landed, which is useful when you need to prove something was received by a deadline. Having a timestamped alert for each upload settles any argument about who sent what, and when.

How it works

What happens, step by step

  1. Every 10 minutes, ClickRuntime checks the OneDrive folder you are watching for changes since the last check.

  2. It picks out files that are new. On the very first run it just takes note of what is already there.

  3. You get an email listing each new file's name with a link to open it.

Before it runs live

  • Connect OneDrive

What you get

RunsEvery 10 minutes
Hear when a file lands in a OneDrive foldertoday, 9:00Succeeded
Email · 2 new files in Shared/ContractsNorthwind MSA 2027.docx https://onedrive.live.com/…

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 OneDrive 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.
new_file_in_folder_alert.pyexample
from clickruntime import on_trigger, credentials, http, state, notify, report_fetched

FOLDER = "Shared/Contracts"

@on_trigger
def run(event):
    h = {"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}
    url = state.get("delta_link") or f"https://graph.microsoft.com/v1.0/me/drive/root:/{FOLDER}:/delta"
    first_run = state.get("delta_link") is None
    new = []
    while url:
        res = http.get(url, headers=h).json()
        new += [i for i in res["value"] if "file" in i and "deleted" not in i and i.get("createdDateTime") == i.get("lastModifiedDateTime")]
        url = res.get("@odata.nextLink")
        delta_link = res.get("@odata.deltaLink")
    report_fetched(0 if first_run else len(new))
    state.set("delta_link", delta_link)
    if first_run or not new:
        return {"summary": "Nothing new"}
    notify.email_me(f"{len(new)} new files in {FOLDER}", "\n".join(f"{i['name']}\n{i['webUrl']}" for i in new))
    return {"new": len(new)}

FAQ

Common questions

Does it report edits to existing files too?
The change feed covers modifications as well, but this alert is set to announce new items only. If you want to hear about edited files too, that is a simple filter to widen. Widening it is a small change, though it produces more alerts on busy folders, so many people prefer new items only.
How does it handle many files uploaded at once?
A batch of uploads in the same check window is grouped into one notification listing every new file, which avoids flooding your inbox when someone drops fifty files in a single go. A group message keeps your notification stream readable on days when uploads arrive in bursts.
Does it need access to my entire OneDrive?
You authorize access to OneDrive, but the run only reads the folder you point it at. Deleted items and unrelated folders are not part of the check, and the token is stored as a secret.
What permissions does it need?
read (Files.Read). 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 “Hear when a file lands in a OneDrive folder” from your assistant

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