CloudCloud FlowsScheduled

PR Detail Sync to Planner

When a Planner task description contains a GitHub PR URL, fetches PR details (state, reviewers, check status) on a schedule and appends them to the task description so PMs track PR progress inside Planner.

Members OnlySign in or create a free account to download this solution.

Overview

Bridges GitHub and Microsoft Planner so PMs can see live PR status inside their Planner board without leaving the tool. Once a day at 9:00 AM Eastern, scans every task in a configured plan, looks for a GitHub PR URL in the description, fetches the PR's current state, and appends a status block (marked with an HTML comment sentinel) to the Planner task description. Subsequent runs update in place rather than stacking duplicates.

**Flow ID:** 7252b8c1-453a-f111-88b3-6045bd0052fe • **State:** Stopped

Use Case

PMs live in Planner but engineers live in GitHub. When a PM asks "is this PR merged yet?" they shouldn't have to chase down a developer. This flow gives PMs a read-only view of PR health directly in the Planner task description: title, state (open/closed/merged), author, mergeable status, last-update timestamp.

**Key Benefits:** zero workflow change for engineers; PR info appears where PMs already work; configurable sentinel for safe in-place updates.

Flow Architecture

Trigger: **Recurrence_Daily_9AM** (daily, 9:00 AM America/New_York).

1. Init 5 vars (Planner group/plan, sync marker, match tokens)
2. **List_Plan_Tasks** (Planner ListTasks_V3)
3. **Apply_To_Each_Task**:
   - Get_Task_Details (Planner GetTaskDetails_V2)
   - Compose_TaskDescription (coalesce null to '')
   - Check_If_Contains_PR_URL (and contains github.com/ + /pull/)
     - YES: Extract PR URL → Normalize → Split → Get_PR_Details (GitHub) → Compose_PR_Status_Block → Update_Task_With_PR_Status

Environment Variables

VariableSchema NameTypeDefaultPurpose
Planner Group IDflowlibs_PlannerGroupIDString(none)M365 Group ID hosting the Planner plan
Planner Plan IDflowlibs_PlannerPlanIDString(none)Planner Plan ID to scan
PR Sync Markerflowlibs_PRSyncMarkerString<!-- FlowLibs PR Sync -->HTML comment sentinel placed before every auto-generated block

Connectors & Connections

ConnectorAPI NameConnection FormatUsage
Microsoft Plannershared_plannershared-planner-2f15e20c-...ListTasks_V3 + GetTaskDetails_V2 + UpdateTaskDetails_V2
GitHubshared_githubb2585b1b8da6406cbb41ba7c48f66af5GetPullRequest

Customization Guide

1. Import; set Planner group/plan IDs; bind connection refs; turn on.

**Common Modifications:** match different Git hosts (gitlab.com, dev.azure.com); include check/review status via GetChecksForRef; filter to label tracked; run faster (Hour/Minute frequency, watch GitHub rate limits); handle private repos via PAT in Secret env var.

Key Expressions

- @and(contains(outputs('Compose_TaskDescription'), variables('varMatchTokenRepo')), contains(outputs('Compose_TaskDescription'), variables('varMatchTokenPull'))) — detect PR URL
- @substring(outputs('Compose_TaskDescription'), add(indexOf(outputs('Compose_TaskDescription'), variables('varMatchTokenRepo')), length(variables('varMatchTokenRepo')))) — extract path after github.com/
- @first(split(first(split(outputs('Extract_PR_URL_Path'), ' ')), decodeUriComponent('%0A'))) — isolate URL from prose