ADO New Repository Created Notification
Triggered when a new Git repository is created in any Azure DevOps project. Posts a Teams adaptive card to the DevOps admin channel with the repo name, project, creator, and default branch. Helps admins track repo sprawl and ensure naming conventions are followed.
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
ADO New Repository Created Notification is a scheduled polling flow that monitors Azure DevOps for newly created Git repositories and posts an alert to a Microsoft Teams channel. It uses a SharePoint tracking list to maintain state between runs, ensuring each new repo triggers exactly one notification. Designed for DevOps admins who need to track repository sprawl and enforce naming conventions across their ADO organization.
Use Case
Organizations with multiple development teams often see uncontrolled repository creation — repos with inconsistent naming, repos in the wrong project, or repos created without the team's awareness. This flow gives DevOps admins a passive monitoring system: every 4 hours it checks for repos that weren't there before and posts a structured Teams notification with repo name, project, default branch, and a direct link to the repo in ADO.
Flow Architecture
Recurrence Every 4 Hours
RecurrenceSchedule trigger fires every 4 hours.
Initialize Variables (5 in parallel)
Initialize variableInitializes five variables from environment variables: varAdoOrganization (from flowlibs_AdoOrganization), varSharePointSiteUrl (from flowlibs_SharePointSiteURL), varTeamsGroupId (from flowlibs_TeamsGroupId), varTeamsChannelId (from flowlibs_TeamsChannelId), and varRepoTrackerListId (from flowlibs_AdoRepoTrackerListId).
Get All ADO Repositories
HttpRequest (Azure DevOps)Calls GET `_apis/git/repositories?api-version=7.0` via the Azure DevOps connector to retrieve all Git repositories across the organization.
Get Known Repos from SharePoint
Get items (SharePoint)Reads the SharePoint repo tracker list to load the set of repos already seen by the flow. Runs in parallel with the ADO repo fetch.
Parse ADO Repository Response
Parse JSONExtracts each repo's id, name, defaultBranch, webUrl, and project.name from the ADO API response.
Select Known Repo IDs
SelectFlattens the SharePoint tracker items into a simple array of known repo GUIDs for fast lookup.
Filter New Repositories
Filter arrayCompares ADO repos against the known-IDs array and keeps only repos that are NOT already in the tracker.
If new repos found
If conditionChecks whether the filtered array contains any new repositories (`length(filtered) > 0`).
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_AdoOrganization | String | <configure> | Azure DevOps organization name (the segment in `https://dev.azure.com/{org}`). Set this to your tenant's ADO org slug. |
| flowlibs_SharePointSiteURL | String | <configure> | Root SharePoint site URL hosting the repo tracker list (e.g., `https://your-tenant.sharepoint.com/sites/devops`). |
| flowlibs_TeamsGroupId | String | <configure> | GUID of the Microsoft Teams team that will receive new-repo notifications. |
| flowlibs_TeamsChannelId | String | <configure> | GUID of the Teams channel within the Teams group where alerts are posted. |
| flowlibs_AdoRepoTrackerListId | String | <configure> | GUID of the SharePoint list (`FlowLibs - ADO Repository Tracker`) that records repos already seen by the flow. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Azure DevOps | shared_visualstudioteamservices | HttpRequest (GET all Git repos org-wide) |
| SharePoint Online | shared_sharepointonline | GetItems (Read the repo tracker list) CreateItem (Add newly seen repos to the tracker) |
| Microsoft Teams | shared_teams | PostMessageToChannel (Post new-repo alert) |
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 polling frequency
- Edit the Recurrence trigger interval (default: every 4 hours). More frequent runs detect new repos faster but increase API calls against ADO and SharePoint.
- Filter by project
- Add a $filter (or project segment) to the ADO HttpRequest URI to limit results to specific projects: _apis/git/repositories?api-version=7.0&project={projectName}.
- Add email notification
- Insert a SendEmailV2 (Office 365 Outlook) action after the Teams post inside the Apply to Each loop to also email DevOps admins for each new repo.
- Customize the Teams message
- Edit the HTML in Post New Repo Alert to Teams to include naming-convention rules, compliance links, or @mentions of the DevOps owners.
- Add naming convention validation
- Insert a Condition after extracting repo details that checks item()?['name'] against a regex pattern, and only alert on non-compliant names.
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.01Filter for new repos
Used inside the Filter array action to keep only ADO repos whose id is NOT in the SharePoint tracker.
EXPR.02Condition check
True branch of the condition fires only when at least one new repo was found.
EXPR.03Default branch fallback
Falls back to 'Not set' when a newly created repo doesn't yet have a default branch.
EXPR.04ADO repo URL reference
Used in the Teams message body to build the direct link back to the repo in Azure DevOps.
EXPR.05Current timestamp for tracking
Stamps the DetectedDate column when a new repo is written to the SharePoint tracker list.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.