Issue with Patch http request to Hubspot

Hi Everybody,

My workflow is the following: I’m pushing all the companies of my database Hubspot throught that workflow to clean and match the city with a region.

Once this is done I want to mark that companies which went through the workflow (the first http request makes a filter based on that property: nuts2_workflow). If it’s null then it brings the company in the workflow.

My issue is the Patch http Request to Hubspot (update the company). I get the message: ERROR: JSON parameter need to be an valid JSON

Anybody has some thoughts about it? Maybe my approach is wrong?

My request:
https://api.hubapi.com/crm/v3/objects/companies/{{ $json.id }}?idProperty=nuts2_workflow

The documentation of Hubspot:

Hey @Thibaud_Dubrule,

Can you share the actual workflow so we can see what you are sending, That error suggests that there is a JSON field being sent that doesn’t have valid JSON in it.

Hi @Jon

Thanks for reaching out. Indeed sorry…

Here’s my current workflow. It’s the http Request3 that is causing problems.

Thanks for your help

Hey @Thibaud_Dubrule,

The first thing I have noticed is you don’t actually have any data set, You have Send Query Parameters enabled with an empty parameter in it and at the bottom it has Send Body enabled with JSON that is empty.

You would need to add the JSON data you are updating to the node so that it knows what to send but it will need to be in the format that Hubspot is expecting.

Hi @Jon
Thanks for your answer.

Indeed I was making tests so I put everything in the URL:
https://api.hubapi.com/crm/v3/objects/companies/{{ $json.id }}?idProperty=nuts2_workflow

{{ $json.id }} = Company ID I want to update
idProperty=nuts2_worflow the property I want to update from that company

I’m not sure what should go in the Send Body. In the Hubspot doc it talks about:
IdProperty - The name of a property whose values are unique for this object type