Outlook Email to GitHub Issue
When an email with subject tag [BUG] lands in a shared mailbox, parses the body and attachments, calls Create An Issue in the right repo, and replies to the sender with the issue link for tracking.
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
Watches a shared Outlook mailbox for tagged bug-report emails. When a new email arrives whose subject contains the configured bug prefix (default [BUG]), the flow creates a GitHub issue in the target repo using the email subject as the title and the email body as the issue description, then replies to the original sender with a link back to the issue for tracking.
Use Case
Convert unstructured bug reports from customers, stakeholders, or internal teams that land in a shared support inbox into structured, trackable issues in GitHub — without a human triaging every message. The sender gets an immediate confirmation reply so they know the report was captured.
Flow Architecture
When A New Tagged Email Arrives In Shared Mailbox
Office 365 Outlook trigger (SharedMailboxOnNewEmailV2)Polls every 3 minutes. Filters by `subjectFilter` from env var. `mailboxAddress` drives which shared mailbox to watch.
Init varBugPrefix
Variable (String)Pulls the `flowlibs_BugSubjectPrefix` env var into a runtime variable for reuse.
Init varGitHubRepoOwner
Variable (String)Pulls `flowlibs_GitHubRepoOwner` into a runtime variable.
Init varGitHubRepoName
Variable (String)Pulls `flowlibs_GitHubRepoName` into a runtime variable.
Init varSharedMailbox
Variable (String)Pulls `flowlibs_SharedMailboxAddress` into a runtime variable.
Check If Subject Starts With Bug Prefix
If condition`toLower(subject) contains toLower(varBugPrefix)` — guards against any stray emails that reach this polling output.
- Create GitHub Issue From Email — GitHub `CreateIssue` action. Title = email subject with prefix trimmed; body = concat of metadata header + original email HTML.
- Reply To Sender With Issue Link — Outlook `ReplyToV3` action. Replies to the original message with a confirmation including the new issue URL. `replyAll: false`.
Empty branch — no action.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SharedMailboxAddress | String | <configure> | The shared mailbox that is monitored for incoming bug reports (e.g. `support@yourcompany.com`). |
| flowlibs_GitHubRepoOwner | String | <configure> | GitHub user or org that owns the target repo (e.g. `contoso`). |
| flowlibs_GitHubRepoName | String | <configure> | Target repo name where issues will be filed (e.g. `support-intake`). |
| flowlibs_BugSubjectPrefix | String | [BUG] | The subject-line tag that marks an email as a bug report. Default `[BUG]`. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Office 365 Outlook | shared_office365 | SharedMailboxOnNewEmailV2 (trigger) ReplyToV3 |
| GitHub | shared_github | CreateIssue |
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.
- Clone solution into target environment
- Import the solution into the destination environment (Dev/Test/Prod) before configuring connections or values.
- Set the four environment variables per deployment
- Update flowlibs_SharedMailboxAddress, flowlibs_GitHubRepoOwner, flowlibs_GitHubRepoName, and flowlibs_BugSubjectPrefix to point at the right mailbox, repo, and subject prefix for that deployment.
- Re-authorize Outlook and GitHub connection references
- Bind the shared_office365 and shared_github connection references to accounts with the required permissions in the target tenant (Send As / Send On Behalf for the shared mailbox; write access to Issues in the target repo).
- Add multi-repo routing
- For additional routing (e.g. different prefixes going to different repos), duplicate the Condition and add sibling branches, each bound to its own set of env vars.
- Swap GitHub for Azure DevOps
- To file into Azure DevOps instead of GitHub, replace the Create GitHub Issue From Email action with the Azure DevOps Create a work item action and update the reply body URL template to point at the DevOps work item.
- Turn the flow on
- The solution ships with the flow in a Stopped state — enable it only after connections and env var values are confirmed for the target environment.
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 match
Condition guard — lower-cases both sides so the prefix match is case-insensitive.
EXPR.02Issue title (prefix trimmed)
Strips the bug prefix from the subject so the GitHub issue title is the clean report description.
EXPR.03Issue body (metadata + email HTML)
Prepends sender + received timestamp metadata to the original email HTML before posting as the GitHub issue body.
EXPR.04Reply body (with issue URL)
Reference to the newly-created GitHub issue URL — embedded in an HTML `<a>` tag in the Reply action body.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.