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.
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
Every 10 minutes, ClickRuntime checks the OneDrive folder you are watching for changes since the last check.
It picks out files that are new. On the very first run it just takes note of what is already there.
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
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 OneDrive steps into one automation
Under the hood
The code that runs this automation
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?
How does it handle many files uploaded at once?
Does it need access to my entire OneDrive?
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
Sort a OneDrive folder by file type
New files in your catch-all folder move into PDFs, Images or Other subfolders.
See how it worksGet new PDFs in a folder summarised
Each PDF added to a folder reaches you as a short summary instead of a file to open.
See how it worksPull totals from invoices saved to OneDrive
Each invoice PDF dropped in a folder becomes a one-line email with supplier, date and total.
See how it worksKeep exploring
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.