PR Merged to SharePoint Release Notes
When a GitHub PR is merged, extract the title and description and append it to a SharePoint release notes page.
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 flow monitors a GitHub repository for pull request activity. When a PR is merged, it automatically creates a release note entry in a SharePoint list and sends an email notification to the team with the PR details. Non-merged PR events (opened, updated, closed without merge) are ignored.
Use Case
Development teams need a centralized changelog of merged pull requests for release tracking, audit trails, and stakeholder communication. This flow eliminates manual release note creation by automatically capturing PR metadata the moment it merges, ensuring nothing is missed between sprints.
The flow is ideal for teams that:
- Development teams maintaining release notes or changelogs
- Project managers tracking sprint deliverables
- Teams needing audit trails of merged code changes
- Stakeholders requiring automatic notifications of completed work
Flow Architecture
When a Pull Request Is Created or Modified
GitHub WebhookFires on any PR event (create, update, close, merge) for the configured repository.
Initialize Variable - varSiteUrl
Initialize VariableLoads SharePoint site URL from flowlibs_SharePointSiteURL environment variable. Runs in parallel with steps 2 and 3.
Initialize Variable - varListID
Initialize VariableLoads Release Notes list GUID from flowlibs_ReleaseNotesListID environment variable. Runs in parallel with steps 1 and 3.
Initialize Variable - varNotificationEmail
Initialize VariableLoads notification recipient from flowlibs_NotificationEmail environment variable. Runs in parallel with steps 1 and 2.
Check If PR Was Merged
If conditionChecks action == "closed" AND pull_request.merged == true - only merged PRs proceed.
- Create Release Note Entry — SharePoint - Create item: creates a new list item with PR number, title, description, author, merge date, URL, and repository name.
- Compose Email Body — Compose: builds an HTML email body with a formatted table of PR details.
- Send Notification Email — Office 365 Outlook - Send email: sends the release note notification to the configured email recipient.
Empty branch - non-merged PR events are silently ignored.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com | Root SharePoint site where the Release Notes list lives. |
| flowlibs_GitHubRepoOwner | String | <configure> | Owner/org of the monitored GitHub repository (e.g., contoso). |
| flowlibs_GitHubRepoName | String | <configure> | Name of the monitored GitHub repository (e.g., my-app). |
| flowlibs_NotificationEmail | String | admin@your-tenant.onmicrosoft.com | Email address (or distribution list) to receive release note notifications. |
| flowlibs_ReleaseNotesListName | String | FlowLibs - Release Notes | Display name of the SharePoint list. |
| flowlibs_ReleaseNotesListID | String | <configure> | GUID of the SharePoint Release Notes list (tenant-specific). Find via /_api/web/lists/getbytitle('YourListName')?$select=Id and set after importing. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| GitHub | shared_github | When a Pull Request Is Created or Modified (trigger) |
| SharePoint Online | shared_sharepointonline | Create item |
| Office 365 Outlook | shared_office365 | Send an email (V2) |
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.
- Import and configure the solution
- Import the solution into your target environment, create the SharePoint list "FlowLibs - Release Notes" with the prerequisite columns (Title, PRNumber, PRDescription, MergedBy, MergedDate, PRUrl, Repository), and update each environment variable to point at your tenant: GitHub repo owner/name, SharePoint site URL, the list GUID, and the notification recipient.
- Update connection references
- After import, point each connection reference (GitHub, SharePoint Online, Office 365 Outlook) at your own connections, then turn on the flow - it will automatically register a webhook on the configured GitHub repo.
- Monitor multiple repositories
- Duplicate the flow and update flowlibs_GitHubRepoOwner and flowlibs_GitHubRepoName per copy so each instance watches its own repo.
- Richer notifications
- Swap the Send email action for a Teams "Post adaptive card in a channel" action to broadcast release notes to a team channel instead of a single inbox.
- Release grouping
- Add a "Release Version" column to the SharePoint list and a Compose action that tags each PR with the current sprint or version label, so release notes can be filtered by release.
- Filter or categorize by PR label
- Reference triggerOutputs()?['body']?['pull_request']?['labels'] in an extra condition or Switch to route PRs by GitHub label (e.g., only post 'breaking-change' PRs, or tag the SharePoint item by label).
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.01Webhook event action
GitHub webhook event action (opened, closed, synchronize, etc.).
EXPR.02Merged flag
Boolean - true only when the PR was merged (not just closed). Used in the If condition together with the action check.
EXPR.03PR number
PR number (integer) - stored in the PRNumber column.
EXPR.04PR title
PR title - stored in the Title column and used in the email subject.
EXPR.05PR author
GitHub username of the PR author - stored in MergedBy.
EXPR.06Merge timestamp
ISO 8601 merge timestamp - stored in MergedDate.
EXPR.07PR web URL
Web URL to the PR on GitHub - stored in PRUrl.
EXPR.08Full repository name
Full repo name in owner/repo form - stored in Repository.
EXPR.09Null-safe PR description
Null-safe PR description with a fallback string - stored in PRDescription.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.