Skip to main content

Notifications

Power Automate - Using Connectors
Answered

Nested Arrays in a Custom Connector -- can't access children below level 3

(1) ShareShare
ReportReport
Posted on by 9

I've built a custom connector that returns an object with three layers of nested arrays (see the example below). 

 

When defining the connector's response using 'import from sample', it doesn't show any of the fields in the third nested array ('issues') in the UI. However, it does show up in Swagger editor, which confirms that it has been captured. 

 

When looping through the arrays in Flow, I'm able to get to the point of looping through the 'issues' array, but I can't access any of the fields in the child objects. 

 

Any thoughts as to why? Is there a limit to how deep custom connectors will look into nested arrays? Is there another way to access the children of a custom connector, besides using 'Apply to each' on each nested array?

 

Response Sample: 

 

 

 

{
 "id": "1a797e87-9bfc-4ff0-8a50-7a81a81bda19",
 "project_id": "0e02977b-4c7d-47f3-85ac-581a6810cfca",
 "created_at": "2019-10-30 11:36:30 -0400",
 "sections": [
 {
 "section_name": "",
 "items": [
 {
 "id": "beb90fbd-e431-45fb-a9ab-21f77708d29c",
 "created_at": "2019-10-30 11:37:47 -0400",
 "issues": [
 {
 "id": "f8c5d8d6-8192-45a4-acf4-e847d8d8da98",
 "description": "The building is finished ",
 "identifier": "000006"
 }
 ]
 }
 ]
 }
 ]
}

 

 

 

 

What this produces in Swagger Editor: 

 

 

 

 responses:
 '200':
 description: success
 schema:
 type: object
 properties:
 id: {type: string, description: id}
 project_id: {type: string, description: project_id}
 created_at: {type: string, description: created_at}
 sections:
 type: array
 items:
 type: object
 properties:
 section_name: {type: string, description: section_name}
 items:
 type: array
 items:
 type: object
 properties:
 id: {type: string, description: id}
 created_at: {type: string, description: created_at}
 issues:
 type: array
 items:
 type: object
 properties:
 id: {type: string, description: id}
 description: {type: string, description: description}
 identifier: {type: string, description: identifier}
 description: issues
 description: items
 description: sections

 

 

 

 

What this produces in the UI:

image 1.png

  • PaddyWann Profile Picture
    PaddyWann 101 on at
    Re: Nested Arrays in a Custom Connector -- can't access children below level 3

    same problem. I suppose I could make a work around by calling the items through an OnChange, parse the body, and make collections with the response in my powerapp. 

  • Verified answer
    v-litu-msft Profile Picture
    v-litu-msft on at
    Re: Nested Arrays in a Custom Connector -- can't access children below level 3

    Hi @adsk_dc,

     

    The template language expression cannot be evaluated because property 'sections' cannot be selected. Array elements can only be selected using an integer index. So the only way to extract the level 3 child element of the nested array, you need to use Apply to each.

     

    Or you can remove these "[]" in the array, and then parse JSON for it. 

    [
    {
     "id": "1a797e87-9bfc-4ff0-8a50-7a81a81bda19",
     "project_id": "0e02977b-4c7d-47f3-85ac-581a6810cfca",
     "created_at": "2019-10-30 11:36:30 -0400",
     "sections":
     {
     "section_name": "",
     "items":
     {
     "id": "beb90fbd-e431-45fb-a9ab-21f77708d29c",
     "created_at": "2019-10-30 11:37:47 -0400",
     "issues":
     {
     "id": "f8c5d8d6-8192-45a4-acf4-e847d8d8da98",
     "description": "The building is finished ",
     "identifier": "000006"
     }
     }
     }
    }
    ]

     Annotation 2019-11-04 104548.png

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard

Featured topics