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

Community site session details

Session Id : vcXsfh+IudhVt+Mj6u2bHD
Power Automate - Connector Development
Answered

Change Shape Of The Custom Connector Response

Like (0) ShareShare
ReportReport
Posted on 3 Aug 2021 12:52:45 by 29,987 Moderator
I built a custom connector whose default response is a nested JSON object (left-side) but I want to make it look like the JSON object on the right-side:
 
  • Remove nesting
  • Rename keys to my own preferred names
  • Change text to numbers for some pairs
Is there a way to shape a custom connector response?  I am willing to write code in other languages to do it.

 
mdevaney_1-1627995105924.png

 

I have the same question (0)
  • murshed Profile Picture
    Microsoft Employee on 16 Aug 2021 at 07:00:07
    Re: Change Shape Of The Custom Connector Response

    Thanks for blog @mdevaney ! This is awesome!

  • Verified answer
    mdevaney Profile Picture
    29,987 Moderator on 16 Aug 2021 at 02:55:30
    Re: Change Shape Of The Custom Connector Response

    @murshed 
    I figured out how to transform the response using some C# code and detailed the steps on my blog:
    https://matthewdevaney.com/transform-a-custom-connector-response-with-c-code/

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

  • mdevaney Profile Picture
    29,987 Moderator on 06 Aug 2021 at 20:10:13
    Re: Change Shape Of The Custom Connector Response

    @murshed 

    Thank you very much for linking me to this announcement.  I will attempt to implement it and mark your answer as the solution once I’ve verified it works. This is awesome!

  • murshed Profile Picture
    Microsoft Employee on 06 Aug 2021 at 17:34:47
    Re: Change Shape Of The Custom Connector Response

    While we expect your API to do any type of transform and use connector as a pass through, we released a new feature yesterday that will allow you to write custom code: https://docs.microsoft.com/en-us/connectors/custom-connectors/write-code

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION ☑️. If you find this reply helpful, please consider giving it a LIKE 👍.

  • mdevaney Profile Picture
    29,987 Moderator on 03 Aug 2021 at 13:46:53
    Re: Change Shape Of The Custom Connector Response

    @Syndicate_Admin 
    I would prefer to code the connector so it gives the desired JSON object instead.  Is this possible?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 786 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 724 Super User 2025 Season 2

#3
stampcoin Profile Picture

stampcoin 290 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Loading complete