Issue Status Lookup in Teams
Teams-triggered flow where pasting a GitHub issue URL returns a richly formatted adaptive card with current state, assignee, labels, and latest comment so teams can triage without leaving chat.
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
A manual-trigger flow that takes a pasted GitHub issue URL and posts a rich status card to a designated Microsoft Teams channel. The card shows the issue title, OPEN/CLOSED badge (color-coded), opener, current assignee, labels, comment count, and a deep link back to GitHub — so a triage huddle or PM standup can see live issue state without leaving Teams.
Category: Teams · Integration · Developer Productivity
Audience: Developers, Project Managers
Use Case
Engineering and Project Management teams frequently reference GitHub issues during Teams chats — pasting a raw URL leaves the team guessing at current state. This flow converts any https://github.com/{owner}/{repo}/issues/{n} URL into a formatted HTML status card so the team sees real-time state (open/closed), assignee, labels, and comment count with a single click.
The flow is ideal for teams that:
- PM running a triage call pastes an issue URL into the flow's Run panel so the card appears in the triage channel.
- Developer posting a blocker escalation grabs a current snapshot before asking the team for help.
- Release manager validates that a bug reportedly fixed is actually closed.
Flow Architecture
Manual trigger
Manually trigger a flow (Request/Button)Accepts a single string input named `text` — the GitHub issue URL to look up.
Init_varGitHubOwner
Initialize variableReads the `flowlibs_GitHubOwner` environment variable into a string variable holding the GitHub organization or user that owns the repository.
Init_varGitHubRepository
Initialize variableReads the `flowlibs_GitHubRepository` environment variable into a string variable holding the repository name to query.
Init_varTeamsGroupId
Initialize variableReads the `flowlibs_TeamsGroupId` environment variable into a string variable holding the Teams group (team) ID that receives the status cards.
Init_varTeamsChannelId
Initialize variableReads the `flowlibs_TeamsChannelId` environment variable into a string variable holding the Teams channel ID that receives the status cards.
Parse_Issue_Number_From_URL
ComposeExtracts the integer issue number from the pasted URL using a tolerant expression that strips `#comment-id` anchors and `?tab=...` query strings before casting to int.
Get_Issue_Details
GitHub — Get an issue (GetIssueNum)Calls `GET /repos/{owner}/{repo}/issues/{n}` against the GitHub connector using the parsed owner, repo, and integer issue number to fetch full issue metadata (state, labels, assignee, html_url, comments count).
Select_Label_Names
SelectProjects the `body.labels[].name` array from the GitHub response into a flat string array for safe joining downstream.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_GitHubOwner | String | your-org | GitHub organization or user that owns the repository whose issues will be looked up. |
| flowlibs_GitHubRepository | String | flowlibs-demo | GitHub repository name to query for issue details. |
| flowlibs_TeamsGroupId | String | <configure> | Teams team (group) ID where status cards are posted. Set to the GUID of the destination team. |
| flowlibs_TeamsChannelId | String | <configure> | Teams channel ID where status cards are posted. Set to the channel ID within the team selected above. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| GitHub | shared_github | GetIssueNum (Get a single issue by number (operationId is GetIssueNum, not GetIssue)) |
| Microsoft Teams | shared_teams | PostMessageToConversation (Posts the HTML status card to the configured channel) |
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.
- Change the repository or Teams destination
- Edit the four env vars (flowlibs_GitHubOwner, flowlibs_GitHubRepository, flowlibs_TeamsGroupId, flowlibs_TeamsChannelId) in the target environment — no flow edit required.
- Add body/description to the card
- Get_Issue_Details already returns body.body (markdown). Insert an additional HTML block in Build_Issue_Card_Html that slices the first ~400 chars of body('Get_Issue_Details')?['body']?['body'] and HTML-escapes it. Note that GitHub issue bodies are markdown; rendering as HTML without conversion yields raw markdown in the Teams card.
- Support multiple repos at runtime
- Replace the single Init_varGitHubRepository with a parse step that reads the repo name from the pasted URL: split(last(split(first(split(triggerBody()?['text'], '/issues/')), '/repos/')), '/') and a similar expression for the owner. Drop both Init_var* assignments.
- Upgrade to a Teams message-extension trigger
- Replace the manual Request trigger with Teams OnMessageActionExecuted for a right-click-on-message UX. Parse the issue URL from the selected message body.
- Handle private repos with different auth
- GitHub connection references can be swapped per environment via solution unpack — no flow edit needed.
- Error handling for bad URLs
- Wrap Parse_Issue_Number_From_URL in a Scope with a Run-after-failed fallback Compose that posts an Invalid GitHub issue URL card. Currently the flow fails with a runtime error if the URL does not contain
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.01Parse issue number from URL
Tolerant to `#comment-id` anchors and `?tab=...` query strings; casts to int so the GitHub connector accepts it.
EXPR.02Color-switching border and badge
Green for open issues, purple for closed — matches GitHub's UI convention.
EXPR.03Safe label join
Renders the labels as a comma-separated list, or `(none)` when the issue has no labels.
EXPR.04Safe assignee fallback
Falls back to `(unassigned)` when the issue has no assignee.
EXPR.05Deep link that always resolves
Uses GitHub's canonical `html_url` when present; otherwise falls back to the originally pasted URL.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.