Projects

Power Automate · Workflow Automation

ClinicFlow

What if incoming emails could find the right place on their own?

A Power Automate inbox workflow that routes clinic emails, logs every classification, flags cancellations for staff, and was tested against 21 realistic scenarios.

Independent prototype informed by my experience working in a busy multidisciplinary clinic. Built and tested using fictional emails in my own Microsoft 365 environment.

  • Power Automate
  • Outlook
  • Excel Online
  • Microsoft Teams
  • Workflow Design

Project

Independent prototype

Built with

Power Automate · Outlook · Excel · Teams

Testing

21 fictional emails

Build

One weekend

01 — The challenge

I understood how much attention a shared inbox can require.

I work as an administrative assistant in a multidisciplinary clinic. Between bookings, coverage questions, patient follow-ups, documentation, and other day-to-day inquiries, I see how quickly a shared inbox can become another workflow that demands constant attention.

That made me curious about a simple problem:

Could routine messages find the right place automatically without forcing staff to give up control over the decisions that still need judgment?

I had never used Power Automate before.

But now I had a real problem to learn it around.

How could an incoming email find its way to the right place automatically?

02 — The architecture

One flow, end to end.

A single flow handles everything: the trigger, the text normalization, six category checks, the routing Switch and the logging step. It is deliberately linear so the order of evaluation is visible.

Complete Power Automate flow — incoming mail moves through classification logic before routing, logging and cancellation alerts.

03 — Understanding the workflow

Before building the flow, I needed to understand the inbox.

I designed the categories around common inquiry types found in a busy multidisciplinary clinic, informed by my own experience working in one.

The goal was not to model every possible message. It was to create a simple structure that could handle recurring administrative requests while leaving unmatched messages available for staff review.

That led to seven categories:

  • Cancellations
  • Bookings
  • Referrals & Waitlist
  • Prescriptions & Medication
  • Third-Party Claims
  • Private Pay & Fees
  • General

04 — The decision that shaped the workflow

Sorting a cancellation is useful. Making it visible is more useful.

The cancellation workflow stood out to me.

A cancellation request can create an opportunity to offer an appointment to another patient who may be waiting for care.

So I did not want ClinicFlow to simply file cancellations correctly.

I wanted them to become actionable.

Sort every message.
Actively flag cancellations.

05 — How it works

From inbox to three outputs.

Email arrives

Normalize text

Subject and body preview to lowercase

Check category rules

Assign category

Then three things happen

Outlook

Move the email into one of seven folders

Excel

Record timestamp, sender, subject, category and source

Teams

If cancellation → send a staff alert

One Switch holds every destination, so routing logic stays in a single place that can be inspected and maintained.

06 — Outlook routing

Put the message where it belongs.

ClinicFlow moves each incoming email into one of seven folders based on its category.

Messages without a keyword match are routed to General rather than silently disappearing or forcing a guess.

The folder counts are the quickest way to see that classification actually happened — and the Cancellations folder is the one the next section is about.

Messages land in operational folders; anything without a keyword match falls back to General rather than being guessed at.

07 — Making cancellations visible

Make the important message visible.

Sorting a cancellation files it. Alerting on it makes the opening something a person can act on.

When ClinicFlow identifies a cancellation request, it sends a Teams notification containing the sender and subject. The alert says:

“New cancellation. A slot may be open.”

That wording is intentional.

The automation identifies the request. A staff member still confirms the appointment change and decides whether the opening can be offered to another patient.

08 — Excel tracking

Make the automation inspectable.

Every classification is recorded in a central Excel log with the timestamp, sender, subject, category and source. The log made it possible to compare expected and actual routes — which is how the routing errors further down this page were found at all.

Each test email was logged with its assigned category so expected and actual routing could be compared.

09 — A small rule with a big effect

Why cancellations are checked last.

An email can belong to more than one keyword category.

“I need to cancel my appointment.”

contains language associated with both Bookings and Cancellations.

ClinicFlow evaluates categories sequentially, and a later match can replace an earlier one.

I intentionally placed Cancellations last.

That means cancellation intent receives priority, the email lands in the correct folder, and the Teams alert is triggered.

Booking match

Cancellation match

Cancellation wins

Route + alert

Cancellations is the only branch that does something after filing — this is where the alert is added.

A single Switch handles the final folder routing, keeping the destination logic in one place and making the flow easier to inspect and maintain.

10 — Testing

A green check mark was not enough.

I built a second Power Automate flow that generated 21 fictional emails using realistic clinic terminology. The test set included terms such as:

  • IMS
  • kinesiology
  • ICBC
  • PRP
  • referral
  • prescription
  • cancellation
  • private services

21

emails processed

21

Excel records

3

cancellation alerts

It also exposed routing mistakes.

CaseMessageObserved routeWhat it revealed
Case 01Prescription coverage questionPrescriptions & MedicationMedication terminology can obscure the real billing intent.
Case 02Group booking asking whether a referral is requiredReferrals & WaitlistA later keyword can override the email’s primary request.
Case 03Follow-up after a vacationThird-Party ClaimsThe string “vac” matched inside the word “vacation.”

11 — What failure taught me

The useful part of testing was finding where it failed.

01

A successful run does not mean a correct result.

An invisible tab character once caused a routing problem even though Power Automate reported the flow as successful. Inspecting the underlying value exposed the issue.

02

Consistency is part of reliability.

Small differences in category names affected downstream routing. That made consistent naming and checking the actual destination as important as getting the logic to execute.

03

Workflow context matters more than automation for its own sake.

The cancellation alert came from asking what reception staff would need to act on, not simply where an email should be filed.

12 — What I would improve

The next version would get more selective, not simply more automated.

Refine the rules

Use more precise matching and prevent partial-word errors.

Review ambiguity

Identify messages matching competing categories and send uncertain classifications for review.

Evaluate AI selectively

Test intent-based classification for ambiguous emails rather than replacing simple deterministic rules everywhere.

Measure actual value

Compare expected and actual routes, record staff corrections and measure time saved during an approved pilot.

Before any real clinical deployment, I would also review permissions, data handling, auditability, failure handling and privacy requirements.

13 — Closing

Over one weekend, I went from opening Power Automate for the first time to building, testing and debugging a functioning workflow.

The project reinforced the way I like to work:

  • understand the real process,
  • build something concrete,
  • test it against realistic scenarios,
  • and pay close attention to where it falls short.

The next step would not be adding more automation for its own sake.

It would be working with the people who manage the inbox every day and improving the workflow around what they actually need.