Using POST to Create or Update a contact from Zoho

contacts

#1

I have been trying to to create a POST from Zoho to HubSpot using the information available here. I have not been able to get it to work for me.

I need to move leads recorded in Zoho to be moved to Hubspot as a contact, if the contact is already there then the information on the contact needs to be updated using the info sent by zoho.

The “URL to Notify” is set to: https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/my-email-address/?hapikey=6dcxxx32-xxxxx--our-key-xxxx

The “my-email-address” part above is one thing I can think of is going wrong, so as a trial I sent my own contact (lead on zoho) to hubspot, receive the following error on Zoho “HTTP Response - 400”. I know that I can use Zapier, but that has a delay.

On “Webhooks Failures” on Zoho I see that it says “HTTP Response - 400”, that is all the information Zoho gives for POST.

Can anyone please let me know what I need to do so that the POST from Zoho to HubSpot works correctly?

Attached is a screenshot of the fields I have in Zoho.


#2

Can you share the exact URL you are using with your email address included? (and although it doesn’t make sense to share the hapi key here, do make sure it is correct as that could result in a bad request 400 error as well).


#3

I did check the API key to make sure it was correct, it is.

Ah… here is the actual URL: https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/support@email.com/?hapikey=6dcxxx32-xxxxx--our-key-xxxx&firstname=${Leads.First Name}&lastname=${Leads.Last Name}&email=${Leads.Email}&phone=${Leads.Phone}&company=${Leads.Company}&industry=${Leads.Industry}&training15min=${Leads.Training15Min}&country=${Leads.Country ©}&lifecyclestage=opportunity&lead_subscription=old-lead

For comparison, here is a working URL for ActiveCampaign: https://our-domain.api-us1.com/admin/api.php?api_key=xxxx-x--x-x-x-x-x&api_action=contact_sync&api_output=json&email=${Leads.Email}&first_name=${Leads.First Name}&last_name=${Leads.Last Name}&tags=${Leads.Industry}&phone=100&p[33]=33&status[33]=1


#4

Ah, so I think your problem is not the email address, but instead that this endpoint (and most of our other endpoints) require the contact data to be passed in as JSON, not URL encoded.

If you look at the example in the documentation you’ll see the contact fields are being passed in as a JSON block rather than in the request URL.


#5

That becomes a problem for us… as most web services online only allow you to pass information using a URL… Zoho, Activecampaign and even Zapier.

Is there a way to parse the URL as JSON like Activecampaign does by using &api_output=json ?


#6

Unfortunately there is no alternate way to use this endpoint. Zapier has a direct connection to Hubspot which you could use instead, or you would have to use/create some middleware that can pass in JSON instead of the webhook you currently have.

There is another integration for Zoho (more robust than Zapier) through Bedrock Data: https://www.bedrockdata.com/hubspot/hubspot-zoho-integrations

An here is the Zapier info in case you don’t have it already: https://zapier.com/zapbook/hubspot/zoho-crm/