Release Change Digest to Teams
Manual trigger accepts two commit SHAs, runs Compare Two Commits, and posts a formatted Teams adaptive card summarizing file diffs, commit counts, and authors — perfect release-notes pre-reading.
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
FlowLibs - Release Change Digest to Teams is a manual-trigger cloud flow that accepts a base and head ref (branch names or commit SHAs), calls the GitHub Compare Two Commits API, and posts a formatted HTML digest to a Microsoft Teams channel. The digest shows status, commit counts, ahead/behind counts, files-changed count, unique author names, and a direct link to the comparison on GitHub — ideal as release-notes pre-reading or a deploy sanity check.
Use Case
Before cutting a release, an engineering lead wants a one-click summary of everything that changed between two refs — typically main vs. a release branch, or the last deployed SHA vs. HEAD. Rather than clicking through the GitHub compare view, they run this flow with the two refs and receive a ready-to-share digest in the team's Teams channel.
The flow is ideal for teams that:
- Pre-release or pre-deploy sanity check from inside Teams.
- Generate share-ready release notes pre-reading without manual editing.
- Capture the unique author list across a range for callouts.
- Provide a one-click GitHub compare link directly inside the team channel.
Flow Architecture
Manually trigger a flow
Power Apps buttonPrompts for Base Commit SHA or Branch and Head Commit SHA or Branch.
Init 5 variables
InitializeVariablevarRepositoryOwner, varRepositoryName, varTeamsGroupId, varTeamsChannelId from env vars; varDigestTitle as the heading text.
Compare Commits In GitHub
GitHub CompareRepositoryCommitsCalls CompareRepositoryCommits with owner, name, base, head.
Select Author Names
SelectProjects each commit into { name: commit.author.name }.
Compose Unique Author List
ComposeTriple-replace string unwrap → flat comma-separated author list.
Compose Digest Message HTML
ComposeBuilds the HTML digest body with stats and GitHub compare link.
Post Digest To Teams Channel
Teams PostMessageToConversationPosts HTML to the configured group/channel as Flow bot.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_GitHubOwner | String | — | GitHub organization or user that owns the repo. |
| flowlibs_GitHubRepository | String | — | Repository name to compare commits in. |
| flowlibs_TeamsGroupId | String | — | Teams group/team ID to post the digest to. |
| flowlibs_TeamsChannelId | String | — | Teams channel ID to post the digest to. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| GitHub | shared_github | CompareRepositoryCommits |
| Teams | shared_teams | PostMessageToConversation (Flow bot → 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 target repository
- Update flowlibs_GitHubOwner and flowlibs_GitHubRepository env vars.
- Change the target Teams channel
- Update flowlibs_TeamsGroupId and flowlibs_TeamsChannelId for the target environment.
- Change the digest title
- Edit the Init varDigestTitle action's value (e.g. 'Weekly Change Digest', 'Hotfix Diff').
- Include file list
- Extend Compose_Digest_Message_HTML with a Select over body('Compare_Commits_In_GitHub')?['files'] and render filename, status, additions/deletions.
- Adaptive card instead of HTML
- Swap PostMessageToConversation for Teams' Post Adaptive Card action and map the same fields.
- Schedule it
- Replace the manual trigger with a Recurrence trigger to post a daily/weekly digest against two fixed refs.
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.01Author projection
Used as the Select action's `from`.
EXPR.02Unique author list unwrap
Triple-replace flatten on the Select output.
EXPR.03Files-changed count
Inserted inline inside the digest HTML.
EXPR.04GitHub comparison link
Renders the deep-link as an anchor.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.