Hi everyone,
I am facing a persistent and blocking error when trying to dynamically call a Child Flow using Environment Variables for the Flow ID.
The issue is very specific: when I select the child flow directly from the dropdown menu in the "Run a Child Flow" action, it works perfectly. However, as soon as I replace the hardcoded flow selection with an Environment Variable (storing the flow's GUID), the Parent Flow fails immediately with a syntax error in the cache request.
Error Message:
Request to XRM API failed with server error: 'Message: Flow server error returned with status code "InternalServerError" and details "{"error":{"code":"InternalServerError","message":"Http request failed with unhandled exception of type 'ProcessSimpleDataException' and message: 'Error en la solicitud de caché para el flujo de trabajo con id... se devolvió el código de estado \"BadRequest\" y el mensaje \"Message: Bad Request - Error in query syntax. Code: 0x80060888\"...
Exhaustive Troubleshooting Performed:
-
Trigger Change: Initially, the child flow used the standard "Manually trigger a flow". To troubleshoot the BadRequest error, we migrated the child flow to an "HTTP Request" trigger with an immediate response. Despite this change, the error in the Parent Flow (when using the Environment Variable) remains exactly the same.
-
GUID Validation: I have double-checked that the Environment Variable contains the correct and current GUID of the child flow.
-
Intermediate Variable: I tried initializing a local string variable with the Environment Variable's value before the call, but the error persists.
-
Comparison: Environment Variables are working perfectly within the same solution for SharePoint sites, Lists, and Excel connectors. The failure is exclusive to the "Run a Child Flow" action.
Conclusion:
This seems to be an internal bug in how the Power Automate engine validates the cache when resolving a GUID from a variable before execution (ProcessSimpleDataException). This prevents us from following ALM best practices, as it forces us to manually edit flows when moving solutions between environments (Dev/Test/Prod).
Has anyone found a workaround for this, or is Microsoft aware of this bug in the modern designer?