Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

The Admin | Sync Template v3 (Flow Action Details) flow fails in environments with ~90K flows, exceeding Power Automate's 225MB aggregated result size limit. The flow attempted to retrieve all flows in a single Dataverse ListRecords call with minimumItemCount: 100000.

Changes

  • Added environment variable admin_FlowActionDetailsBatchSize (default: 5000, range: 1000-10000)
  • Modified query actions to use $top parameter for batch processing:
    • Flows_to_iterate in Get_flows_to_update scope
    • Flows_to_iterate_with_specialty_flags in Clear_Specialty_Flags scope
  • Updated pagination policies to respect batch size parameter

Implementation

{
  "parameters": {
    "$top": "@parameters('FlowActionDetailsBatchSize (admin_FlowActionDetailsBatchSize)')",
    "$filter": "admin_flowdeleted ne true and admin_inventorymyflowactiondetails eq true..."
  },
  "runtimeConfiguration": {
    "paginationPolicy": {
      "minimumItemCount": "@parameters('FlowActionDetailsBatchSize (admin_FlowActionDetailsBatchSize)')"
    }
  }
}

The flow now processes flows in batches, clearing the admin_inventorymyflowactiondetails flag after each batch. Multiple runs handle the full dataset without exceeding size limits.

Impact

  • Environments with <10K flows: Single run, no behavior change (default 5000)
  • Environments with 90K flows: ~18 runs at default batch size, each <50MB
  • For large environments: Set batch size to 2000-3000 for optimal performance

Files Changed

  • AdminSyncTemplatev3FlowActionDetails-7EBB10A6-5041-EB11-A813-000D3A8F4AD6.json (+14/-4 lines)
  • admin_FlowActionDetailsBatchSize/environmentvariabledefinition.xml (new)
  • docs/SOLUTION-FlowActionDetails-BatchSize.md (new, configuration guide)
Original prompt

This section details on the original issue you should resolve

<issue_title>Reopen #10256</issue_title>
<issue_description>Since I'm unable to reopen, I'd like to find a permanent and supported fix for #10256 where Flows_to_iterate fails due to the # of flows in the environment, which is approaching 90,000.</issue_description>

<agent_instructions>Analyze and provide a permanent, supported fix for the failure in Admin | Sync Template v3 (Flow Action Details) where the Flows_to_iterate action exceeds the max aggregated results size (error >225MB) in an environment with ~90,000 flows. Identify the root cause and recommend a scalable approach (pagination, batching, filtering, or redesign) so the flow can handle very large environments without hitting the result‑size limit.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Custom agent used: CoE Custom Agent
Specialized agent for triaging and fixing issues in the CoE Starter Kit. Always consult the official CoE docs and the team’s SharePoint notes first, then mine prior GitHub issues and the CoE Common Responses playbook.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Added FlowActionDetailsBatchSize environment variable (default: 5000)
- Updated Flows_to_iterate action to use $top parameter for batching
- Updated Flows_to_iterate_with_specialty_flags with same batching logic
- Created comprehensive documentation for the fix
- Addresses issue #10256 for environments with 90,000+ flows

Co-authored-by: AmarSaiRam <220305901+AmarSaiRam@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Flows_to_iterate failure due to result size limit Fix 225MB result size limit in Flow Action Details sync with batch processing Jan 22, 2026
Copilot AI requested a review from AmarSaiRam January 22, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reopen #10256

2 participants