Hubspot API Connection

Hi friends,

We’re trying to push client (user) data into Hubspot our CRM, we’re doing this through an API.

Here’s our issue, we need to use this date format: https://developers.hubspot.com/docs/faq/how-should-timestamps-be-formatted-for-hubspots-apis

And despite our many tried it keeps seeming not to work.

Here’s the API action we’re trying to send: https://developers.hubspot.com/docs/methods/contacts/update_contact-by-email

Thanks in advance :slight_smile:

Hey @chriscardone, are you trying to update a date property or a date/time property in Hubspot?

If a date/time property you can simply take your date property in Bubble and extract the UNIX timestamp like this. I’m obviously using a text field but the same functionality exists in your workflows

If updating a date only property in Hubspot, you need to change the time to midnight before extracting the UNIX timestamp so it would look like this.

Date: change hours to 0 change minutes to 0 change seconds to 0:extract

That will change the date to exactly midnight before extracting the UNIX timestamp which is what Hubspot looks for on their date property.

1 Like

One caveat as I haven’t tested this but I just saw that Hubspot is looking for the timestamp to be midnight UTC. I am fairly certain Bubble stores dates in UTC (so the above formula should work) but if not you may have to add a +hours to the formula above to adjust from user’s current timezone to UTC.

Here’s a forum discussion that goes into some depth on that