Hello,
I'm trying to create an action for an api for my custom connector and when I import from sample for the request or response, it was unable to process all the properties as some was missing.
The ones that are missing have a structure of 'array of objects of array of objects'
I have pasted the problematic json below
"ConsentFields": [
{
"Fields": [
{
"Key": "TEXT",
"Value": "Your consent text goes here."
},
{
"Key": "DATETIMECONSENTED",
"Value": "2020-01-01T09:40:18.527Z"
},
{
"Key": "URL",
"Value": "http://www.example.com/signup"
},
{
"Key": "IPADDRESS",
"Value": "127.0.0.1"
},
{
"Key": "USERAGENT",
"Value": "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
}
]
},
{
"Fields": [
{
"Key": "TEXT",
"Value": "Your consent text goes here."
},
{
"Key": "DATETIMECONSENTED",
"Value": "2020-01-01T09:40:18.527Z"
},
{
"Key": "URL",
"Value": "http://www.example.com/signup"
},
{
"Key": "IPADDRESS",
"Value": "127.0.0.1"
},
{
"Key": "USERAGENT",
"Value": "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
}
]
}
]
How can I import this json correctly to the request and response section?
Thanks.
hi did u solve this one ?
Hello @manuelstgomes
I believe that the action is expecting a json, not definition.
after importing the definition rather than the json, I get this which isn't what I expect from the json.
Thanks
Hi @WilsonWan
Yeah, you mentioned that, sorry about that.
Have you tried copying the definition that I posted above (below the JSON) to your custom connector? With that, are you able to proceed?
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
​
Cheers
Manuel
Hello @manuelstgomes ,
Sorry, the area I had issue with is inside the Custom connectors.
Data from sidebar > Custom connectors > Definition in breadcrumb > Actions
When creating a new action, I use the json provided under the Request section > import from sample.
Normally, the body of the request will be populated with the properties from the Json I have given.
However, for some reason, it was empty.
Thanks
HI @WilsonWan
Here are the steps I followed:
Copy the JSON to "Generate From Sample":
And then I got the schema:
Did you do anything differently? If would work.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
​
Cheers
Manuel
Hello @manuelstgomes ,
I have enclosed my json when I was trying to create the action with the json. I have also try the one you provided (which is identical to what I have used).
When the request parameters are created, I get an empty body. There are no properties in the body at all.
Thanks.
Hi @WilsonWan
Your JSON is almost correct. You need to enclose everything with { } to make it valid.
Try the following:
{
"ConsentFields": [{
"Fields": [{
"Key": "TEXT",
"Value": "Your consent text goes here."
},
{
"Key": "DATETIMECONSENTED",
"Value": "2020-01-01T09:40:18.527Z"
},
{
"Key": "URL",
"Value": "http://www.example.com/signup"
},
{
"Key": "IPADDRESS",
"Value": "127.0.0.1"
},
{
"Key": "USERAGENT",
"Value": "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
}
]
},
{
"Fields": [{
"Key": "TEXT",
"Value": "Your consent text goes here."
},
{
"Key": "DATETIMECONSENTED",
"Value": "2020-01-01T09:40:18.527Z"
},
{
"Key": "URL",
"Value": "http://www.example.com/signup"
},
{
"Key": "IPADDRESS",
"Value": "127.0.0.1"
},
{
"Key": "USERAGENT",
"Value": "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36"
}
]
}
]
}
and you'll get
{
"type": "object",
"properties": {
"ConsentFields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Key": {
"type": "string"
},
"Value": {
"type": "string"
}
},
"required": [
"Key",
"Value"
]
}
}
},
"required": [
"Fields"
]
}
}
}
}
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
​
Cheers
Manuel
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1