Monthly
Save a monthly report to OneDrive and share it in Teams
At the start of each month a report with last month's figures and a short summary is saved to OneDrive and posted to your Teams channel.
- Runs
- Monthly
- Apps
- Microsoft Teams, OneDrive
- AI
- Yes, uses the built-in AI allowance
- Access
- Files.ReadWrite, ChannelMessage.Send
Send this to your assistant
Create a ClickRuntime automation: on the 1st of every month, build a report from last month's figures with a short summary, save it to OneDrive under Reports, and post the link in our Teams channel.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Teams that run on Microsoft 365 often discuss results in a Teams channel but produce the monthly report by hand, attaching a file to an email that half the team never opens.
Posting the report link directly in the channel where the team already talks, with a short summary on top, gets the numbers seen and discussed, and keeps every month's report in the same OneDrive folder.
What you get out of it
Seen where the team talks
The report appears in the Teams channel. Questions and discussion happen right under it.
Summary first
AI writes a few lines on what changed. People who won't open the file still get the key points.
Every month in one folder
Reports are saved side by side in OneDrive. Comparing months is easy.
Out on the 1st
Nobody has to remember to build or post it.
How it works
What happens, step by step
On the 1st of each month it fetches last month's figures.
AI writes a short summary of the main changes.
The report is saved to your OneDrive Reports folder and a share link is created.
The summary and link are posted to your Teams channel.
Before it runs live
- Connect Microsoft Teams
- 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
- 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 Microsoft Teams and OneDrive steps into one automation
Under the hood
The code that runs this automation
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_ID, CHANNEL_ID = "your-team-id", "your-channel-id"
@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("%B %Y")
figures = "\n".join(f"{k}: {v}" for k, v in kpis.items())
summary = ai.generate(figures, system="Summarise these monthly figures in three short plain sentences.", max_output_tokens=160).text
h = {"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}
item = http.put(f"{GRAPH}/me/drive/root:/Reports/{month}.txt:/content", headers=h,
data=f"{month}\n\n{summary}\n\n{figures}".encode()).json()
link = http.post(f"{GRAPH}/me/drive/items/{item['id']}/createLink", headers=h,
json={"type": "view", "scope": "organization"}).json()["link"]["webUrl"]
html = f"<b>{month} report</b><br>{summary}<br><a href='{link}'>Open the report</a>"
http.post(f"{GRAPH}/teams/{TEAM_ID}/channels/{CHANNEL_ID}/messages", headers=h, json={"body": {"contentType": "html", "content": html}}).raise_for_status()
return {"month": month}FAQ
Common questions
Where do the figures come from?
Who can open the link?
Can it mention the team in the post?
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
Save notes and business cards from a Teams chat to OneDrive
Post a note or contact details in a Teams chat and a tidy version is saved to OneDrive, with a reply confirming it.
See how it worksSave email attachments to OneDrive and share them in Teams
Attachments from your inbox are saved to OneDrive and your Teams channel gets a message with a link to each one.
See how it worksGet a daily news digest in Slack
Each morning your team gets a short summary of what's new on the sites and blogs you follow.
See how it worksKeep exploring
Set up “Save a monthly report to OneDrive and share it in Teams” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.