Skip to content

On a schedule

Save a monthly KPI report to OneDrive and email the link

On the 1st of each month a report with last month's numbers and a short commentary is saved to OneDrive and the link is emailed to your team.

Runs
On a schedule
Apps
OneDrive, Outlook
AI
Yes, uses the built-in AI allowance
Access
Files.ReadWrite, Mail.Send

Send this to your assistant

Create a ClickRuntime automation: on the 1st of every month, pull last month's KPIs, write a short commentary, save the report to OneDrive under Reports, and email the share link to the management team from Outlook.

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

Monthly reporting tends to fall to one person who spends a day gathering numbers, writing a few paragraphs and emailing a file around. It often goes out late, and older reports are scattered across inboxes.

Producing the report automatically on the 1st, with commentary drafted for you, gets it out on time every month and keeps every edition in one OneDrive folder, so comparing this month with last year takes seconds.

What you get out of it

  • On time every month

    The report is ready on the 1st without anyone blocking out a day. Managers can plan around it.

  • Commentary drafted for you

    AI writes a short summary of what changed and why it matters. You can edit it before discussing it.

  • Every report in one place

    Each month's file is saved in the same OneDrive folder. Looking back at older months is easy.

  • A link, not an attachment

    People get a link to the file, so everyone opens the same version and nothing bloats inboxes.

How it works

What happens, step by step

  1. On the 1st of each month it fetches last month's figures.

  2. AI writes a short commentary on the main changes.

  3. The figures and commentary are saved as a report in your OneDrive Reports folder.

  4. A share link limited to your organisation is created.

  5. The link is emailed to your management team from Outlook.

Before it runs live

  • Connect OneDrive
  • Connect Outlook

What you get

RunsOn a schedule
Save a monthly KPI report to OneDrive and email the linktoday, 9:00Succeeded
Email · KPI report 2026-09Revenue rose 6% on strong renewals from Acme and Northwind; churn was flat. Full report: link

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
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other OneDrive and Outlook 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.
monthly_report_saved_to_onedrive_and_emailed.pyexample
GRAPH = "https://graph.microsoft.com/v1.0"
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, ai

DATA_URL = "https://reports.example.com/kpis/last-month"
TEAM = ["ops@example.com", "finance@example.com"]

@on_trigger
def run(event):
    kpis = http.get(DATA_URL, headers={"Authorization": f"Bearer {credentials.secret('METRICS_TOKEN')}"}).json()
    month = (date.today().replace(day=1) - timedelta(days=1)).strftime("%Y-%m")
    figures = "\n".join(f"{k}: {v}" for k, v in kpis.items())
    note = ai.generate(figures, system="Write a 3-sentence plain commentary on these monthly business figures.", max_output_tokens=200).text
    h = {"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}
    item = http.put(f"{GRAPH}/me/drive/root:/Reports/KPI-{month}.txt:/content", headers=h,
                    data=f"KPI report {month}\n\n{figures}\n\n{note}".encode()).json()
    link = http.post(f"{GRAPH}/me/drive/items/{item['id']}/createLink", headers=h,
                     json={"type": "view", "scope": "organization"}).json()["link"]["webUrl"]
    mail = {"message": {"subject": f"KPI report {month}", "body": {"contentType": "Text", "content": f"{note}\n\nFull report: {link}"},
                        "toRecipients": [{"emailAddress": {"address": a}} for a in TEAM]}}
    http.post(f"{GRAPH}/me/sendMail", headers=h, json=mail).raise_for_status()
    return {"month": month}

FAQ

Common questions

Where do the numbers come from?
Any source with a web address that returns your figures, such as your reporting endpoint or a database view.
Who can open the link?
People in your organisation by default. You can restrict it to specific people instead.
Can I check the commentary before it's sent?
Yes. It can email only you first, and you forward the link once you're happy.
What permissions does it need?
Files.ReadWrite, Mail.Send. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly 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 “Save a monthly KPI report to OneDrive and email the link” from your assistant

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