Why can I note create a note to my hubspot account?

I am trying to create a note “Account Research” to my Hubspot environment (see below for the workflow). But I am retrieving the error code ‘400’.

This is how my HTTP request node looks like:

And the JSON code for the body is:

{
“properties”: {
“hs_note_body”: “test”
},
“associations”: [
{
“to”: { “id”: {{$(‘Get a deal’).item.json.dealId}} },
“types”: [
{
“associationCategory”: “HUBSPOT_DEFINED”,
“associationTypeId”: 514
}
]
}
]
}

But it is not working and I am receiving the following Error Code:

Error code

400

Full message

400 - "{\"status\":\"error\",\"message\":\"Error creating NOTE. Some required properties were not set.\",\"correlationId\":\"acaed8dd-e373-4d28-8e4c-9b99cb918fa0\",\"context\":{\"properties\":[\"hs_timestamp\"]},\"category\":\"VALIDATION_ERROR\"}"

Request

{ "body": { "Properties": "{\n \"properties\": {\n \"hs_note_body\": \"test\"\n },\n \"associations\": [\n {\n \"to\": { \"id\": 40665603339 },\n \"types\": [\n {\n \"associationCategory\": \"HUBSPOT_DEFINED\",\n \"associationTypeId\": 514\n }\n ]\n }\n ]\n}" }, "headers": { "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7", "Authorization": "**hidden**" }, "method": "POST", "uri": "https://api.hubapi.com/crm/v3/objects/notes", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "followAllRedirects": true, "timeout": 300000, "encoding": null, "json": false, "useStream": true }

Hello there, from the error, it says that you are missing a required field to be included in the json body and it is this field hs_timestamp that you can put inside the properties object,

so it should look something like this

“properties”: {
“hs_note_body”: “test”,
“hs_timestamp”: {{ $now }}
},

1 Like

I tested that too before…

Also used the following:

{
  "hs_note_body": "test",
  "hs_timestamp": {{ Date.now() }}
}

But same error @fahmiiireza

also 400 error,with the same error message like literally the same error? or now its different message error @martijnmldrs

Hello @martijnmldrs, after I read HubSpot documentation, the hs_timestamp needs to be UNIX Timestamp in miliseconds.
you can use this for your http request node

{
  "hs_timestamp": {{ $now.toMillis() }}
}

@cutecatcode @fahmiiireza

Updated the code to:

{
  "properties": {
    "hs_note_body": "test",
    "hs_timestamp": {{ $now.toMillis() }}
  },
  "associations": [
    {
      "to": {
        "id": {{ $('Get a deal').item.json.dealId }}
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 514
        }
      ]
    }
  ]
}

But the error still persists.

{
“errorMessage”: “Bad request - please check your parameters”,
“errorDescription”: “Error creating NOTE. Some required properties were not set.”,
“errorDetails”: {
“rawErrorMessage”: [
“400 - "{\"status\":\"error\",\"message\":\"Error creating NOTE. Some required properties were not set.\",\"correlationId\":\"dcac9b98-2a48-44e8-9a5e-5f2464372646\",\"context\":{\"properties\":[\"hs_timestamp\"]},\"category\":\"VALIDATION_ERROR\"}"”
],
“httpCode”: “400”
},
“n8nDetails”: {
“nodeName”: “HTTP Request”,
“nodeType”: “n8n-nodes-base.httpRequest”,
“nodeVersion”: 4.2,
“itemIndex”: 0,
“time”: “24/07/2025, 14:48:46”,
“n8nVersion”: “1.102.4 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: Bad request - please check your parameters”,
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1476:10)“,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)”,
" at ExecuteContext.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1762:11)"
]
}
}

Hi there, try this instead

"hs_timestamp": {{ $now.toMillis() * 1 }}

it forces it to become a number because from what i see it needs to be a number


I see it now, you need to add the whole field in my attached pic, the hs_timestamp do not need any conversion to timestamp (but that’s ok for now).

You need to add hubspot_owner_id and hs_attachment_ids

Read here for further information

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