Every 10 minutes
Turn action emails in Outlook into Planner tasks with a Teams alert
Flagged or action emails in Outlook become Planner tasks, and the team is told about each one in Teams.
- Runs
- Every 10 minutes
- Apps
- Microsoft Teams, Outlook
- AI
- Optional
- Access
- Mail.Read, Tasks.ReadWrite, ChannelMessage.Send
Send this to your assistant
Create a ClickRuntime automation: every 10 minutes, find Outlook emails I've flagged or with 'action' in the subject, create a Planner task for each and post it to our Tasks channel in Teams.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
In an operations team, requests arrive by email: a customer needs a document, a supplier needs a confirmation, finance needs a sign-off. The person who receives the email flags it, but the rest of the team cannot see the flag, and if that person is off sick the request waits.
Turning those emails into Planner tasks puts them on the team's shared board, and a Teams message lets everyone know a new one has arrived. Work moves from one person's inbox to a place the team can share and track.
What you get out of it
Requests stop living in one inbox
A flagged email is only visible to the person who flagged it. A Planner task is visible to the whole team, so someone else can pick it up.
The team hears about new work
A short Teams message for each new task means nobody has to check the board constantly. Urgent requests get noticed quickly.
Nothing is created twice
Each email becomes exactly one task, even if it stays flagged for days. The board stays clean and trustworthy.
Clear task titles
Email subjects are often vague, like "Re: quick one". Task titles can be rewritten into a clear action, so the board reads like a to-do list.
How it works
What happens, step by step
Every 10 minutes, ClickRuntime checks your Outlook inbox for flagged emails or emails with "action" in the subject.
Emails that already have a task are skipped, and if there are no new ones it stops there.
For each new email, a task is created in your Planner plan with the sender, subject and a link to the email. If AI is turned on, it rewrites the subject into a clear task title.
A short message about the new task is posted in your Microsoft Teams channel.
Before it runs live
- Connect Microsoft Teams
- Connect Outlook
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
- 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 Outlook steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched
PLAN_ID, BUCKET_ID, TEAM_ID, CHANNEL_ID = "your-plan-id", "your-bucket-id", "your-team-id", "your-channel-id"
GRAPH = "https://graph.microsoft.com/v1.0"
@on_trigger
def run(event):
h = {"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}
q = "flag/flagStatus eq 'flagged' or contains(subject,'action')"
msgs = http.get(f"{GRAPH}/me/messages", headers=h, params={"$filter": q, "$top": 50, "$select": "id,subject,from,webLink"}).json()["value"]
done = set(state.get("done") or [])
new = [m for m in msgs if m["id"] not in done]
report_fetched(len(new))
if not new:
return {"summary": "Nothing new"}
for m in new:
title = m["subject"]
try:
title = ai.generate(f"Rewrite as a short task title: {m['subject']}", max_output_tokens=30).text.strip()
except ai.AIError:
pass
task = http.post(f"{GRAPH}/planner/tasks", headers=h, json={"planId": PLAN_ID, "bucketId": BUCKET_ID, "title": title}).json()
sender = m["from"]["emailAddress"]["address"]
http.post(f"{GRAPH}/teams/{TEAM_ID}/channels/{CHANNEL_ID}/messages", headers=h,
json={"body": {"contentType": "html", "content": f"New task: <b>{title}</b> from {sender} (<a href='{m['webLink']}'>email</a>)"}})
done.add(m["id"])
state.set("done", list(done)[-500:])
return {"tasks": len(new)}FAQ
Common questions
Which emails become tasks?
Does the task link back to the email?
Which Planner plan do the tasks go into?
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 Outlook attachments to OneDrive and tell Teams
Attachments from new Outlook emails are saved to your OneDrive Attachments folder, and a Teams message lists what arrived.
See how it worksPost today's Outlook meetings to Teams each morning
Every weekday at 8, today's Outlook meetings with times and attendees are posted to your Teams channel.
See how it worksGet a Teams briefing before important meetings
Before each meeting with external attendees, you get a Teams message summarising your recent Outlook emails with them.
See how it worksKeep exploring
Set up “Turn action emails in Outlook into Planner tasks with a Teams alert” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.