Skip to content

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.

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

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

  1. Every 10 minutes, ClickRuntime checks your Outlook inbox for flagged emails or emails with "action" in the subject.

  2. Emails that already have a task are skipped, and if there are no new ones it stops there.

  3. 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.

  4. 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

RunsEvery 10 minutes
Turn action emails in Outlook into Planner tasks with a Teams alerttoday, 9:00Succeeded
Teams · TasksNew task: Send Contoso the signed NDA, from legal@contoso.example (email)

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
  • 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

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.
action_emails_become_tracked_tasks_with_teams_alerts.pyexample
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?
Emails you flag in Outlook and emails with "action" in the subject. You can change the rule, for example to a specific folder or sender.
Does the task link back to the email?
Yes. The task includes the sender, subject and a link to open the original email, so whoever picks it up has the full context.
Which Planner plan do the tasks go into?
The plan and bucket you choose when setting it up, such as an Inbox bucket on your team's plan. Tasks can then be moved and assigned as usual.
What permissions does it need?
Mail.Read, Tasks.ReadWrite, ChannelMessage.Send. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in 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 “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.