Update custom field in GHL

Hi everyone, I would like you help with an HTTP request node. I am trying to run a JSON, that will update a custom field inside GHL with an AI response, however, I keep getting an error message that says invalid JSON parameters

Error: JSON parameter needs to be valid JSON

Could you try:

{
  "customFields": [
    {
      "id": "Y5SfxOnqT2lphxB9tFSq",
      "key": "contact.automated_message",
      "field_value": {{ JSON.stringify($json.text) }}
    }
  ]
}


1 Like

Thanks, This worked

The error means the body of your HTTP request isn’t being parsed as valid JSON. When using dynamic expressions like {{ JSON.stringify($json.text) }}, you need to make sure the overall structure remains proper JSON.

Try this format in your request body (raw JSON mode):
{
“customFields”: [
{
“id”: “Y5SfxOnqT2lphxB9tfSq”,
“key”: “contact.automated_message”,
“field_value”: {{ JSON.stringify($json.text) }}
}
]
}

Make sure:

  • You’re using RAW mode in the HTTP node (not “Form URL-Encoded”).
  • There’s no extra quote wrapping the entire JSON block.
  • The variable $json.text actually exists and is not undefined.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.