Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Handling query arrays in custom connectors

(0) ShareShare
ReportReport
Posted on by 827

I'm working on my first custom connector, and have what I'm sure is a basic question, though I haven't had any luck finding the answer online.

 

I have a GET call with several query parameters that can accept multiple values, but I can't seem to figure out how to pass multiple values to the paramater in a way that works with the API and also makes sense to the users using the connector.

 

I've set the parameter to Array, but when I add it to a Flow, it's still a single field.  I've tried passing it arrays in several different ways, but none of them have returned data correctely.  I've tested the call using the HTTP connector, so I know the data I should be getting back.

 

What is standard procedure for dealing with arrays in query parameters?

 

Alternately, is there a way for me to add a Key -> Value table to the connector action so that people can add their own query parameters, similar to the way it works in the HTTP connector?

 

Thanks.

  • Hubix2000 Profile Picture
    Hubix2000 4 on at
    Re: Handling query arrays in custom connectors

    Hi,

     

    we have the same issue with a custom connector. We need to add a list of ean codes to a get call.

     

    The swagger definition looks like that:

     

     "parameters": [
     {
     "name": "partner",
     "in": "query",
     "required": true,
     "type": "string"
     },
     {
     "name": "eanliste",
     "in": "query",
     "required": true,
     "type": "array",
     "collectionFormat": "csv",
     "description": "EAN List"
     }
     ]

    The collectionFormat is set to "csv" which is the right setting for swagger 2.0.
    Maybe we miss something. Please help.

  • Jronash Profile Picture
    Jronash 827 on at
    Re: Handling query arrays in custom connectors

    I'm setting the paramater to array in the Custom Connection definition:

    array.PNG

     

    When I add the action to a flow, I get a single field.  If I put an array variable in that field, it doesn't return data correctly.  If I try to manually enter an array in the typical format used by GET requests, it also does not return data correctly.  It seems that the connector isn't formatting the array properly for a GET request.  I'm not sure what else to try.

    Array2.PNG

  • v-yamao-msft Profile Picture
    v-yamao-msft on at
    Re: Handling query arrays in custom connectors

    Hi @Jronash ,

     

    Could you share more details on your flow?

     

    How do you set the parameter to Array then add it to a Flow?

     

    The following doc on Microsoft Flow Arrays could be helpful:

    https://veenstra.me.uk/2018/07/10/microsoft-flow-shed-some-light-on-arrays/

     

    Further, hope the following doc on Custom connectors in Microsoft Flow be a reference as well:

    https://docs.microsoft.com/en-us/flow/developer/register-custom-api

     

    Best regards,

    Mabel        

      

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,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard

Featured topics