Skip to content

On a schedule

Flag Notion docs that are older than your latest release

When a new release ships on GitHub, Slack lists the Notion docs pages for that product that have not been updated since before the release.

Runs
On a schedule
Apps
GitHub, Notion
AI
Not needed
Access
GitHub read; Notion read

Send this to your assistant

Create a ClickRuntime automation: every day, check the latest release of each SDK repo on GitHub; when there's a new one, list the pages in my Notion Docs database for that SDK last edited before the release, and post them to #docs.

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 developer platform keeps its SDK guides in Notion and ships new SDK versions every few weeks. Docs lag behind, and developers follow instructions for a version that no longer exists, then open support tickets.

Flagging the pages that have not been touched since a release gives the docs team a precise to-do list the day it ships. Guides stay in step with the code, and support hears fewer 'the docs are wrong' complaints.

What you get out of it

  • A precise list of pages to check

    Only pages for the released product and older than the release are listed. Writers know exactly where to look.

  • Docs keep up with releases

    Hearing on release day means updates happen in days, not months. Developers read instructions that match the code.

  • Fewer support tickets

    Accurate docs prevent the confused questions that follow every outdated guide.

  • Once per release

    Each release is reported once. The channel is not repeatedly reminded of the same release.

How it works

What happens, step by step

  1. Every day, ClickRuntime checks the latest release of each of your SDK repositories on GitHub.

  2. It skips releases it has already reported.

  3. For a new release, it finds the pages in your Notion docs database for that SDK that were last edited before the release date.

  4. The list is posted to your #docs Slack channel with links to each page.

Before it runs live

  • Connect GitHub
  • Connect Notion and share the database you want it to use

What you get

RunsOn a schedule
Flag Notion docs that are older than your latest releasetoday, 9:00Succeeded
Slack · #docsPython SDK v3.2.0 released. These docs pages are older than the release: • Authentication • Uploading files

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 GitHub and Notion 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.
flag_notion_docs_that_lag_behind_github_releases.pyexample
from clickruntime import on_trigger, credentials, http, notify, state

def gh(method, path, **kw):
    resp = http.request(method, f"https://api.github.com{path}", headers={
        "Authorization": f"Bearer {credentials.connection('github', 'work')}", "Accept": "application/vnd.github+json"}, **kw)
    return resp.raise_for_status() or (resp.json() if resp.content else None)
def notion(method, path, **kw):
    resp = http.request(method, f"https://api.notion.com/v1{path}", headers={
        "Authorization": f"Bearer {credentials.secret('NOTION_TOKEN')}", "Notion-Version": "2022-06-28"}, **kw)
    return resp.raise_for_status() or resp.json()

DOCS = "your-notion-database-id"
SDKS = {"acme/sdk-python": "Python", "acme/sdk-node": "Node"}

@on_trigger
def run(event):
    seen = state.get("releases") or {}
    posted = 0
    for repo, sdk in SDKS.items():
        rel = gh("GET", f"/repos/{repo}/releases/latest")
        if seen.get(repo) == rel["tag_name"]:
            continue
        pages = notion("POST", f"/databases/{DOCS}/query", json={"filter": {"and": [
            {"property": "SDK", "select": {"equals": sdk}},
            {"timestamp": "last_edited_time", "last_edited_time": {"before": rel["published_at"]}}]}})["results"]
        if pages:
            lines = [f"• <{p['url']}|{''.join(t['plain_text'] for t in p['properties']['Name']['title'])}>" for p in pages]
            notify.slack(f"{sdk} SDK {rel['tag_name']} released. These docs pages are older than the release:\n" + "\n".join(lines), channel="#docs")
            posted += 1
        seen[repo] = rel["tag_name"]
    state.set("releases", seen)
    return {"posted": posted}

FAQ

Common questions

How does it know which pages belong to which SDK?
From a property on your Notion docs database, such as a select called SDK whose options match your repositories.
Does a small edit count as updated?
Yes. Any edit after the release date counts. If a page only needed a typo fix, it will still drop off the list.
Can it also check release notes?
Yes. It can include the release notes in the message so writers can see what changed without opening GitHub.
What permissions does it need?
GitHub read; Notion 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 runs (on a schedule). 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 “Flag Notion docs that are older than your latest release” from your assistant

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