I’m using the Hubspot node to create a new contact. Part of the data is a date field (custom property in Hubspot). No matter how I format the date, it always results in the same error. I tried UNIX, UNIX with milliseconds, other formats like YYYY-MM-DD and similar combinations to no avail.
Hello @ChristopherG
From a quick search, it looks like the accepted date format is a Unix timestamp in milliseconds, though I haven’t tested it myself..
The thing i want to add is if the property expects a number, you need to send it as a number and not a string..
You can convert it like this:
{{ Number("1764099806") }}
Give that a try…
Nope, won’t do. I used a Code node to convert it to a number, but at the end I still get the same error message.
Not in code node because it will be sent as a string i guess,
convert it here :
just try this:
{{ Number($json.formattedDateUnix) }}
It is a number alright

Hi again,
I’m still stuck on this problem. I have a similar workflow in Make (which I hope to replace with the one here in n8n) where I also create a contact in Hubspot with a date field. That goes through without any problems, so why doesn’t it work in n8n?
Hi again,
I have been discussing this matter in the Hubspot community, and my understanding is that Hubspot accepts the date as a string with the format yyyy-MM-dd. However I still get an error message, which makes me think something is wrong with the Hubspot node in n8n.
Can someone have a look, please?
Thanks



