Skip to main content

Hi there,

 

I am experiencing an error when trying to configure a custom request. For some reason Zapier does not like the json body I am using, even is the same body I am using on Insomnia/Postman.

Here is more information about how I configure the request:

 

Request Type: Patch
Data Pass-Through? True
Data: { "name": "test_zapier", "label": "test_zapier", "type": "enumeration", "fieldType": "select", "groupName": "contactinformation", "hidden": false, "displayOrder": 2, "hasUniqueValue": false, "formField": true, "modificationMetadata": { "readOnlyOptions": false, "readOnlyValue": false, "readOnlyDefinition": false, "archivable": true }, "options": " { "label": "Option A", "description": "Choice number one", "value": "A", "displayOrder": 1, "hidden": false }, { "label": "Option B", "description": "Choice number two", "value": "B", "displayOrder": 2, "hidden": false }, { "label": "Option Cuarta", "description": "asdfasdf", "value": "4", "displayOrder": 4, "hidden": false } ] }
Unflatten: Yes

The error I get when testing:

Invalid input JSON on line 1, column 3: Unexpected character (''' (code 39)): was expecting double-quote to start field name

Thanks in advance!

Hi @LIN3S 

Good question.

Please post screenshots with how your Zap step is configured along with the encountered error.


@Troy Tessalone  Sure!

Some screenshots about the configuration:

 


 


 


For the Body which is what seems to be not working:

 

 


@LIN3S 

Can you post a screenshots of the encountered error?


@LIN3S 

Which of these HubSpot API endpoints are you trying to use?

 


@LIN3S

Which of these HubSpot API endpoints are you trying to use?

 


Sure! This is the error screenshot:

 



The HubSpot Api Endpoint is this one: 
 


Thanks for your time!


@LIN3S 

Try removing the “name” line as that doesn’t appear to be indicated in the HubSpot API endpoint docs.

 


@Troy Tessalone 

Didn’t work. I tried to simplify just with the minimum paramenters, but I keep getting the same error:
 

{
"groupName": "contactinformation",
"hidden": false,
"options": n
{
"label": "Option A",
"description": "Choice number one",
"value": "A",
"displayOrder": 1,
"hidden": false
}
]
}

 


@LIN3S 

Make sure any extra whitespace (spaces/tabs) are removed from the JSON.

 

Perhaps try one of these HubSpot Zap actions:

 


@Troy Tessalone Thank you so much! 

With the first option API Request (Beta) worked properly!


Reply