Auto-Reply Demo
Demo flow showing how to set up a configurable Outlook auto-reply that triggers on inbound mail matching defined criteria (sender domain, subject keywords, time-of-day window) and sends a templated response.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This demo flow triggers on every new Outlook 365 email that arrives in the connection owner's inbox, checks whether the subject contains a configured keyword, and sends a templated auto-reply back to the sender when it matches. It's a minimal pattern for keyword-gated auto-responders and is a good starting point for richer "out-of-office on demand" or "ticket created" reply automations.
Use Case
Mailboxes occasionally need a contextual auto-reply that fires only on specific subject keywords (e.g. urgent escalations to a now-vacant alias, or a "ticket received" acknowledgement for emails matching a project tag). Outlook's native rules and Out-of-Office can do simple cases but don't compose well with downstream automation. This flow shows the simplest cloud-flow shape for that pattern.
The flow is ideal for teams that:
- Keyword-based filtering keeps replies targeted, not noisy.
- Reply body lives in a Set Variable action — edit copy without touching flow logic.
- Branches cleanly to 'do nothing' on non-matching mail — no unintended replies.
- Single-connector deployment is trivial — no env vars or extra licensing.
- Designed as a teaching pattern: trigger → configure → branch → act.
Flow Architecture
When a new email arrives (V3)
Outlook OnNewEmailV3Fires on every inbound email in the connection owner's mailbox.
Set Subject Keyword Filter
InitializeVariable (String)Holds the keyword the subject must contain to qualify for an auto-reply.
Set Auto-Reply Message Body
InitializeVariable (String)Holds the HTML/plain-text reply body sent back to the sender.
Check Subject Contains Keyword
If conditionEvaluates whether the subject contains the configured keyword.
- Send Auto-Reply to Sender — Outlook ReplyToEmailV3 against the trigger message ID with the configured body.
Empty branch — no reply is sent.
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Office 365 Outlook | shared_office365 | OnNewEmailV3 (trigger) ReplyToEmailV3 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Promote keyword + body to env vars
- Add flowlibs_AutoReplyKeyword and flowlibs_AutoReplyBody env vars and replace the variable initializers with parameters() reads — lets you redeploy copy without editing the flow.
- Restrict to a sender domain
- Change the If condition from contains(subject, keyword) to an and() that also checks endsWith(triggerOutputs()?['body/from'], '@partner.com').
- Add a time-of-day window
- Wrap the condition in another If that checks hour(utcNow()) against business-hour bounds.
- Log every reply for audit
- Add a Create item action against a SharePoint list inside the True branch to record subject, sender, and timestamp.
- Match multiple keywords
- Replace the single string variable with a JSON array and use a Filter Array on split(subject, ' ') against it instead of contains().
- Switch to shared mailbox
- Replace the trigger with When a new email arrives in a shared mailbox (V2) and use Reply to email (V3) in shared mailbox.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Subject keyword check
Used in the If condition; lower-cased on both sides for case insensitivity.
EXPR.02Reply target — original message ID
Used by ReplyToEmailV3 to thread the reply correctly.
EXPR.03Reply body content
Sourced from the configurable variable.
EXPR.04Sender address
Useful for any future logging branch.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.