web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Getting invalid expres...
Power Automate
Suggested Answer

Getting invalid expression(s) in compose action while trying to access similar properties

(1) ShareShare
ReportReport
Posted on by 6
 
Using following expression to dynamically access the content from Parse JSON action into compose action:
body('Parse_JSON')?['productOfferingQualificationItem'][0]?['relatedContactInformation'][0]?['number']
This works fine but for the below expression the flow throws error
body('Parse_JSON')?['productOfferingQualificationItem'][0]?['relatedContactInformation'][0]?['role']
 
Both the properties are in the same attribute
"relatedContactInformation": [
{
"emailAddress": "abc@buyer.com",
"name": "Don doe",
"number": "4556720166",
"role": "buyerContactInformation"
}
 
The flow works for one while fails when add another. What would be the underlying issue here?
Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,672 Super User 2026 Season 1 on at
    Show the error message ;)
     
  • MK-03110623-0 Profile Picture
    6 on at
    In new designer it just gives this error:
    The input parameter(s) of operation 'Compose' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Compose'.

    In the classic designer it shows this kind of error below, I've checked it multiple times for syntax, as pasted in the post above, it seems correct.
    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: '.
  • Suggested answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at
    Hi
     
    This expression looks good to me
     
    body('Parse_JSON')?['productOfferingQualificationItem'][0]?['relatedContactInformation'][0]?['role']
     
    Is the role information always exists otherwise it fails. 
     
    Try the below expression if that role is optional.
    body('Parse_JSON')?['productOfferingQualificationItem'][0]?['relatedContactInformation']?[0]?['role']
     
    If you have the role value always then remove the existing expression and start adding a new one.
     
    Thanks
     
  • Chriddle Profile Picture
    8,672 Super User 2026 Season 1 on at
    Can you show the Compose code? ("Peek code")

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard