The flow gives only this vague error:
The input parameter(s) of operation 'Compose' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Compose'.
One of the values used is:
body('Parse_JSON')?['productOfferingQualificationItem'][0]?['product']?['place'][0]?['id']
This comes while trying to access some of the dynamic content values from a previous Parse JSON action in a compose action.
Observations:
1. The flow runs fine when accessing the value in a separate compose action using above expression. There it shows the value in output.
2. The same expression when added into the Required compose action where the entire json payload is present, then it gives the error mentioned above with no other changes done.
3. Some dynamic content items are accessed successfully in the flow run but others give this error.
4. The dynamic value interactive box for the added value/expression change from 'output...' how it is visible while adding it in the code to the value it holds in the interactive box.
Although this itself hasn't caused any issue in the flow.
5. In old designer view the same issue gives following error:
Request to XRM API failed with error: 'Message: Flow client error returned with status code "BadRequest" and details "{"error":{"code":"TemplateValidationError","message":"The power flow's logic app flow template was invalid. Unable to parse template language expression 'type': expected token 'LeftParenthesis' and actual 'EndOfData'."}}". Code: 0x80060467 InnerError: '.
Also, while using the same expression(above) in the json payload which is also used in a separate compose, sometimes it just gives this:
Something went wrong. Please refresh the page or try again after some time.
Screenshots attached.