Skip to content

Every 10 minutes

Flag urgent support emails in Slack

New support emails are sorted by topic and urgency, and the urgent ones are posted to your support channel.

Runs
Every 10 minutes
Apps
Outlook, Slack
AI
Yes, uses the built-in AI allowance
Access
Mail.ReadWrite; chat:write

Send this to your assistant

Create a ClickRuntime automation: every 10 minutes, classify new emails in my Outlook support inbox by category and urgency, tag them with an Outlook category, and post the urgent ones to #support in Slack.

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 software company runs support from a shared Outlook mailbox. Password resets and feature questions sit alongside the occasional 'our whole team is locked out', and the urgent one can wait behind twenty routine requests.

Sorting each email as it arrives and pushing only the urgent ones to Slack means the serious problems get picked up in minutes, while the rest stay neatly labelled in Outlook for whoever works the queue.

What you get out of it

  • Urgent problems jump the queue

    An outage or a blocked customer is in Slack within ten minutes. Someone can respond before it turns into a cancellation.

  • A labelled inbox

    Every email gets an Outlook category such as Billing or Bug. Whoever works the queue can filter by topic.

  • Less channel noise

    Only urgent emails are posted. The team isn't trained to ignore a channel full of routine requests.

  • Consistent sorting

    Every email is judged the same way, whoever is on shift. New staff don't need to learn the unwritten rules for what counts as urgent.

How it works

What happens, step by step

  1. Every 10 minutes it looks for new emails in your support mailbox.

  2. AI reads each one and picks a category and whether it is urgent.

  3. The category is added to the email in Outlook so the queue can be filtered.

  4. Urgent emails are posted to your support channel in Slack with the subject and sender.

  5. Emails already sorted are skipped next time.

Before it runs live

  • Connect Outlook
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsEvery 10 minutes
Flag urgent support emails in Slacktoday, 9:00Succeeded
Slack · #support:fire: Account: "Whole team locked out since 9am" (it@northwind.example)

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 Google Sheets
  • Combine it with other Outlook and Slack 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.
support_emails_flagged_in_slack.pyexample
GRAPH = "https://graph.microsoft.com/v1.0"
from clickruntime import on_trigger, credentials, http, state, notify, ai, report_fetched

SCHEMA = {"type": "object", "properties": {"category": {"type": "string", "enum": ["Billing", "Bug", "Account", "Question"]},
          "urgent": {"type": "boolean"}}, "required": ["category", "urgent"]}

@on_trigger
def run(event):
    h = {"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}
    since = state.get("since") or event.get("scheduled_time") or "2026-01-01T00:00:00Z"
    msgs = http.get(f"{GRAPH}/me/messages", headers=h, params={"$filter": f"receivedDateTime gt {since}",
                    "$orderby": "receivedDateTime", "$select": "id,subject,from,bodyPreview,receivedDateTime"}).json()["value"]
    report_fetched(len(msgs))
    if not msgs:
        return {"summary": "Nothing new"}
    for m in msgs:
        r = ai.generate(f"{m['subject']}\n{m['bodyPreview'][:1500]}", system="Classify this support email. Urgent = outage, locked out, data loss or cancellation threat.",
                        json_schema=SCHEMA, max_output_tokens=40).json
        http.patch(f"{GRAPH}/me/messages/{m['id']}", headers=h, json={"categories": [r["category"]]})
        if r["urgent"]:
            notify.slack(f":fire: {r['category']}: {m['subject']} ({m['from']['emailAddress']['address']})", channel="#support")
    state.set("since", msgs[-1]["receivedDateTime"])
    return {"sorted": len(msgs)}

FAQ

Common questions

What counts as urgent?
You describe it in plain words, for example: service down, can't log in, data loss, or a customer threatening to cancel. The AI follows that description.
Which categories does it use?
The ones you list, such as Billing, Bug, Account and Question. They are added as Outlook categories, which you can colour-code.
Does it reply to customers?
No. It only labels the email and alerts the team. Replies are still written by people.
What permissions does it need?
Mail.ReadWrite; chat:write. 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 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 “Flag urgent support emails in Slack” from your assistant

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