Repo Metadata Enrichment
When a new row with only a repo Id is added to a Repos Dataverse table, calls Get A Repository By Id to fetch full metadata (name, description, visibility, default branch) and populates the remaining columns.
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 - Repo Metadata Enrichment is an event-driven Dataverse automation that enriches GitHub repository records with live metadata the moment they are created. A user (or upstream integration) only needs to supply the GitHub repository Id. The flow fetches the repository object from GitHub, populates the remaining columns on the Dataverse row, and emails a confirmation to the configured notification recipient.
Use Case
Teams that maintain a catalog of GitHub repositories inside Dataverse (for governance, reporting, or Power Apps portals) often have sparse source data — users only know the repo Id. Manually copying the repo name, description, default branch, visibility, and URL into Dataverse is tedious and error-prone.
This flow automates the enrichment: drop a new row with just a GitHub Repo Id, and the flow rounds out the rest of the record within seconds. A success email confirms the enrichment, and a high-importance alert fires when the trigger row arrives without a valid Repo Id.
Flow Architecture
When a Repo Row Is Added
Dataverse SubscribeWebhookTriggerFires when a new row is created in the flowlibs_repo table (Message: Create, Scope: Organization, Filtering attribute: flowlibs_githubrepoid). The trigger registers a CallbackRegistration row in Dataverse that POSTs to Flow the moment a new row is inserted.
Initialize varNotificationRecipient
Initialize variableReads the flowlibs_NotificationRecipient environment variable into a string variable.
Initialize varReposTableName
Initialize variableReads the flowlibs_ReposTableName environment variable into a string variable.
Initialize varRepoId
Initialize variableInteger cast of triggerOutputs()?['body/flowlibs_githubrepoid'] — the GitHub repo Id supplied by the user on the new Dataverse row.
Initialize varRecordGuid
Initialize variableParses the new record's Dataverse GUID out of the trigger's @odata.id string so it can be used to key the subsequent UpdateRecord action.
Check If Repo Id Is Populated
If conditionBranches on @greater(variables('varRepoId'), 0) — ensures the trigger row carries a real GitHub Repo Id before calling out to GitHub.
- Get Repository From GitHub — shared_github.GetRepositoryById using varRepoId — returns the full repository object (name, description, visibility, default branch, URL, etc.).
- Update Repo With Metadata — Dataverse UpdateRecord on the flowlibs_repos entity set, keyed by varRecordGuid. Writes flowlibs_name, flowlibs_fullname, flowlibs_description (coalesced to empty string), flowlibs_visibility ("private"/"public"), flowlibs_defaultbranch, and flowlibs_htmlurl.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_NotificationRecipient | String | alerts@yourcompany.com | Address that receives success confirmations and missing-Id alerts. |
| flowlibs_ReposTableName | String | flowlibs_repos | Logical/plural entity set name used for the UpdateRecord call (defaults to flowlibs_repos). |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Dataverse | shared_commondataserviceforapps | SubscribeWebhookTrigger (trigger) UpdateRecord |
| GitHub | shared_github | GetRepositoryById |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
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.
- Swap the notification channel
- Replace Send_Enrichment_Success_Email and Send_Missing_RepoId_Alert with Teams PostMessageToChannelV3 or Slack PostMessage to route alerts into a collaboration channel instead of email.
- Enrich additional columns
- Extend Update_Repo_With_Metadata with any field from the GitHub repository object (stars count, language, license SPDX id, topics, updated_at). Map via body('Get_Repository_From_GitHub')?['{field}'].
- Upgrade to a monitored retry
- Wrap the Get_Repository_From_GitHub action in a Scope with a Configure run after of has failed. On failure, log to a flowlibs_flowerror table and requeue after a Delay.
- Adjust the trigger filter
- The flow currently fires on Create of flowlibs_repo. To re-enrich on demand, change the trigger message to 2 (Update) and filter on a boolean flowlibs_reenrich column toggled by users.
- Broaden or narrow scope
- The current scope is Organization (4). To limit to records created by the current Business Unit, switch to scope 2 (Business Unit) or 1 (User).
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 the Dataverse record GUID out of @odata.id
The trigger body's @odata.id returns a URL like https://<org>.crm.dynamics.com/api/data/v9.2/flowlibs_repos(GUID). This expression splits on the opening paren, takes the trailing chunk, splits on the closing paren, and grabs the GUID — avoiding a regex dependency.
EXPR.02Coalesce a nullable GitHub description to an empty string
Used when writing flowlibs_description to Dataverse so that a null GitHub description doesn't fail the Update.
EXPR.03Map a boolean private flag to a friendly visibility label
Converts GitHub's boolean private flag to the string written to flowlibs_visibility.
EXPR.04Compose the enrichment email subject dynamically
Builds the success-email subject from the GitHub repository's full_name (e.g., torvalds/linux).
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.