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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Custom Connector odd behavior

(1) ShareShare
ReportReport
Posted on by 7
I've built a Custom Connector to parse a complex and large JSON payload. This custom connector accepts a JSON body and returns a JSON response.
I then built the Power Automate flow to get the JSON output from a Dataverse Query. The output that I am interested in is sent to the Custom Connector as outputs('DataFromDataverse')?['body']. So far so good.
 
 
PowerAutomate Code View snippet
PowerAutomate Code View snippet{  type: OpenApiConnection,  inputs: {    parameters: {      content-type: application/json,      body: @outputs('DataFromDataverse')?['body']    },
 
I then executed the flow once, sourced the JSON and proceeded to use the JSON to continue the C# code within the Custom Connector. The JSON generated by the above steps looks like so...
{  @odata.context: ,  value: [    {      @odata.type: #Microsoft.Dynamics.CRM.contact,    ......    }}
 
 
The value section has the Array that contains data from the expanded table. The issue is not with this Query or the format, this is a standard response.
 
When I use this JSON schema to complete the C# development and use the JSON as an Example to test out the Connector, the Custom Connector JSON Body has it's own syntax, which looks like below. I renamed the default /body/ to /raw/, since a body with another body was confusing.
 
{  raw: {body:{$:{  @odata.type: #Microsoft.Dynamics.CRM.contact: .....}
 
the actual JSON payload from Power Automate would in this case be treated as a String. I am able to consume the value of the /raw/ (or body) key and parse into JSON. 
 
The issue is not with parsing the JSON. The issue stems from the fact that the Custom Connector Test pane seems to enclose the actual JSON with a /body/ node and then also adds the /$/ node. This schema does not match with the schema that Power Automate uses. There seems to be an underlying behavior difference between developing this and consuming it. 
 
Kindly let me know if I am doing something wrong. How I keep the JSON input between Power Automate <> Custom Connector and the Custom Connector Test tab consistent
 
 
Thanks
 
Ben
I have the same question (0)
  • Verified answer
    Community member Profile Picture
    7 on at
    I was able to work around the issue by matching the JSON expected by the Custom Connector by adding the additional elements in Power Automate
     
    {
      "body": {
        "$": @{outputs('GetRows')?['body']}
      }
    }
     

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 80

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans