Skip to content

Every 15 minutes

Get told when a file is added to a SharePoint library

Your team hears about each new document in the library within about 15 minutes, with its name and a link.

Runs
Every 15 minutes
Apps
SharePoint
AI
Not needed
Access
read (Sites.Read.All or Sites.Selected)

Send this to your assistant

Create a ClickRuntime automation: every 15 minutes, check the Contracts library on our Legal SharePoint site and post any new files to #legal in Slack with the file name and a 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

A shared SharePoint library such as contracts, policies or project deliverables gets new files from many people, and the teams relying on them find out by accident. A new signed contract is uploaded and finance does not know for a week. An updated policy is published and the people who must follow it never see it. Checking the library by hand is tedious and unreliable, and SharePoint's own alerts are limited and depend on each person setting them up.

Every fifteen minutes the automation checks the library's drive for changes since its last check using the delta feature, picks out the newly added documents, and notifies your team with the file name, who added it and a link. It saves its place so nothing is announced twice. Operations, legal and project teams use it to be told about new files without watching a folder.

What you get out of it

  • Teams act on new files promptly

    Finance can start invoicing when a signed contract appears, and a project manager can review a deliverable the day it arrives. Work that depends on a document no longer waits for someone to stumble on it.

  • Policy updates reach the people who need them

    A new version of a procedure is announced to the team rather than silently placed in a folder. Compliance improves when people are actively told that something changed. A revised leave policy is announced to the staff who must follow it, not silently dropped in a folder.

  • Uses SharePoint's own change tracking

    The delta query returns only what is new since last time, so it stays fast on large libraries. It does not scan every file on each run, which keeps the load on your site low.

  • One notification for the whole team

    Instead of each person creating their own alert, a single message goes to a shared channel or list. Everyone sees the same thing, including colleagues who join the team later.

  • Spots misplaced or unexpected uploads

    If someone adds a file to the wrong library, or something unexpected appears in a restricted one, the notice shows it fast. That can matter for confidentiality and for keeping libraries tidy.

How it works

What happens, step by step

  1. Every 15 minutes, ClickRuntime checks your SharePoint document library for changes since the last check.

  2. It picks out documents that are new, ignoring ones it has already announced.

  3. Each new document is posted to #legal with its name and a link to open it.

Before it runs live

  • Connect SharePoint

What you get

RunsEvery 15 minutes
Get told when a file is added to a SharePoint librarytoday, 9:00Succeeded
Slack · #legalNew contract: *Northwind MSA 2026.pdf* https://contoso.sharepoint.com/sites/Legal/Contracts/…

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

SITE_ID = "contoso.sharepoint.com,3333-cccc,4444-dddd"  # Legal site
DRIVE_ID = "b!ContractsLibraryDriveId"

@on_trigger
def run(event):
    headers = {"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}
    url = state.get("delta_link") or f"https://graph.microsoft.com/v1.0/sites/{SITE_ID}/drives/{DRIVE_ID}/root/delta"
    first_run = state.get("delta_link") is None
    items = []
    while url:
        page = http.get(url, headers=headers).json()
        items += page.get("value", [])
        url = page.get("@odata.nextLink")
        delta_link = page.get("@odata.deltaLink")
    new = [] if first_run else [i for i in items if "file" in i and "deleted" not in i
                                and i.get("createdDateTime") == i.get("lastModifiedDateTime")]
    report_fetched(len(new))
    if not new:
        state.set("delta_link", delta_link)
        return {"new": 0}
    for f in new:
        notify.slack(f"New contract: *{f['name']}*\n{f['webUrl']}", channel="#legal")
    state.set("delta_link", delta_link)
    return {"new": len(new)}

FAQ

Common questions

Does it announce files that are edited or only new ones?
It is set up to announce newly added files. The delta feed also reports modifications, so the automation can be set to ignore edits or to report them separately, depending on what your team cares about.
Does it work on subfolders inside the library?
Yes. The delta feed covers the whole drive including subfolders, and you can narrow alerts to one path, such as a Signed Contracts folder. Subfolders that are added later are covered automatically, since the delta feed follows the library rather than a fixed list of folders.
What access does it need on SharePoint?
Read access to the site's document library through Microsoft Graph, granted when you connect your Microsoft account. It does not need permission to edit or delete files. Because it only reads, you can connect an account with view rights alone, which keeps the security team comfortable.
What permissions does it need?
read (Sites.Read.All or Sites.Selected). 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 told when a file is added to a SharePoint library” from your assistant

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