Hello Team,
I am new to automation and facing an issue. When i do the API Post and set Parameter name and value it tries to send it as an array but has to be an object. So basically it is not sending anything.
I’ve tried everything I could find on help and the web but still nothing. Can someone help me?
Looking on the API guide it stated that customField has to be an object, but my knowledge in API is so vague that the issues about value being send in the wrong format might be wrong.
If no node before HTTP Request $json[“someKey”] is undefined. All is red.
You can replace it with plane text for testing, like “value” >>
{ "R5tFe...": "value" }
Additional point:
If the object “R5tFe…” need a string and you want to use $json, you have to write:
{ "R5tFe...": "{{$json['someKey']}}"
The value need additional " surrounded - from $json you don’t get it.
In {{}}-Brackets you write JS-Code
An example:
Thx @pemontto to show me the “error” in Jan’s code
But after some testing, I learned by Jan writing, it automatically creates an object and converts $json[“someKey”] to a string. The " not needet. Thanks @Jan.
{{ {
"HKOVHm760DWQ3EzImlY4":"{{$node["Webhook from Leadbyte"].json["body"]["lifeinsurance"]}}","VeCp6ErrTzSoOPE0HDYm":"{{$node["Webhook from Leadbyte"].json["body"]["age"]}}","UjIg9lVRbeG4bbYrIhK4":"{{$node["Webhook from Leadbyte"].json["body"]["how_much_the_coverage"]}}","YXPZlOutLKD9E8dZrdPo":"{{$node["Webhook from Leadbyte"].json["body"]["benefeciary"]}}","3178iL062C3HZOV8qmNT":"{{$node["Webhook from Leadbyte"].json["body"]["benefeciary_name"]}}","R5tFEwtnpmpuFTmFH32F":"{{$node["Webhook from Leadbyte"].json["body"]["hobby"]}}"
} }}