Round-Robin Issue Auto-Assign
On new issue, calls Lists The Available Assignees For Issues, reads a 'last assigned index' from a SharePoint list, patches the issue to the next assignee in rotation, and increments the index for balanced load.
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 GitHub for newly opened issues and auto-assigns them to team members in a round-robin rotation. When a new issue arrives, the flow reads a rotation pointer from a SharePoint list, selects the next developer in the assignee list, assigns the issue, and increments the pointer for balanced load distribution.
Use Case
Development teams need fair issue distribution without manual assignment. This flow automates round-robin assignment so every team member gets equal work, eliminates dropped issues, and maintains an auditable assignment history in SharePoint.
The flow is ideal for teams that:
- Automatic round-robin assignment — every developer gets equal issues
- Balanced load distribution via modulo arithmetic
- Rotation state persisted in SharePoint — survives flow restarts
- No duplicates — upsert logic ensures one record per issue
- Fully env-var-driven — no flow edits required for new assignee lists
Flow Architecture
When a new GitHub issue is opened
GitHub - When an issue is openedFires when a new issue is created in the configured GitHub repository, providing the issue number and metadata to the flow.
Initialize Variables (5x)
Initialize VariableHydrate env vars: GitHubOwner, GitHubRepository, SharePointSiteUrl, RotationListName, RotationItemTitle.
List Available Assignees In GitHub
GitHub - GetAssigneesReturns the array of GitHub login names eligible to be assigned to issues in the target repository.
Get Rotation Item From SharePoint
SharePoint - GetItemsReads the rotation row from the SharePoint list (filtered by Title = configured rotation key) to retrieve the current LastAssignedIndex value.
Compose Last Assigned Index
ComposeExtracts LastAssignedIndex from the SharePoint item and coalesces to 0 if null, giving a safe integer pointer to use for rotation math.
Compose Next Rotation Index
ComposeCalculates the next index using modulo arithmetic against the assignees count so the pointer wraps around safely at the end of the list.
Compose Selected Assignee Login
ComposeIndexes the assignees array by the next rotation index and extracts the login field, yielding the GitHub username to assign.
Assign Issue To Selected Developer
GitHub - Update issue (HTTP / assignee patch)Patches the new GitHub issue with the selected assignee login so the developer is notified and ownership is recorded.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_GitHubOwner | String | <configure> | GitHub org or user login that owns the repository being monitored (e.g. 'octocat' or 'your-org'). |
| flowlibs_GitHubRepository | String | <configure> | Name of the GitHub repository whose new issues should be auto-assigned. |
| flowlibs_SharePointSiteURL | String | https://your-tenant.sharepoint.com/sites/<your-site> | URL of the SharePoint site that hosts the rotation tracking list. |
| flowlibs_RotationListName | String | FlowLibs - GitHub Assignment Rotation | Display title of the SharePoint list that stores the rotation pointer row(s). |
| flowlibs_RotationItemTitle | String | default | Rotation key used as the Title value of the SharePoint row whose LastAssignedIndex column tracks the next assignee. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| GitHub | shared_github | When an issue is opened (trigger) GetAssignees Update issue (assignee patch) |
| SharePoint Online | shared_sharepointonline | GetItems PatchItem |
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.
- Deploying to Another Environment
- Import the solution and create the SharePoint rotation list (columns: Title, LastAssignedIndex; seed row: Title=default, LastAssignedIndex=0). Update the five env vars with your target GitHub org, repo, SharePoint site, and list name. Open the flow in the designer and re-bind the SharePoint actions to clear Flow Checker dynamic-schema notices. Confirm connection references are bound to valid GitHub and SharePoint connections, then turn the flow on.
- Multiple rotation tracks
- Create additional SharePoint rows (e.g., Title=frontend, Title=backend) and branch the condition on repo name to use different rotation keys, allowing parallel rotations per team or component.
- Weighted assignment
- Replace the modulo math with a lookup that weights some developers higher (e.g., assign 2 issues to senior devs for every 1 to juniors), useful when capacity varies across the team.
- Exclude specific developers
- Filter the assignees array after GetAssignees to remove names from a blocklist (e.g., on-leave or focus-mode developers) before computing the rotation index.
- Reassign stale issues
- Add a scheduled flow that runs daily, queries issues assigned more than 7 days ago without activity, and reassigns them via this same round-robin logic to prevent stalls.
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.01Next rotation index (safe modulo)
Computes the next rotation index with a fallback when there are zero assignees so the flow never divides by zero.
EXPR.02GitHub update payload
Builds the JSON body sent to GitHub's update-issue endpoint, injecting the selected assignee login into the assignee field.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.