EditContact call automatically



I have create one api for edit the ContactData, but that api is called by default in every time
whenever i start my server and edit contact api called by default and its continue called and update the data.


Hi @avinash,

If I understand you correctly, your code is calling this endpoint every time you start your server. What should it be doing?

I will likely not be able to advise specifically on how to alter your code, but could you set up some trigger for conditions when the endpoint should be called?



Thanks for your quickly response.

i am create the webhook on add the integration
that time i am use the this api

yield createWebhook1(userData,"contact.propertyChange",'firstname');

here createWebhook1 is function and this function called when i am add the intergration and here webhook created successfully

yield editContactWebhook(webhookData,objectId);

Here i am check the condition than if and condition is true than editContactWebhook will called

and In editContactWebhook function i have uppdate the data
and last i will send the reponse if its successfully.

resolve(true) // send the response from the editContactWebhook function

but once this function called editContactwebhook function called continuesly



Hi, @avinash.

Please correct me if I misunderstand:

  1. Your app listens for when a contact's firstname changes through a webhook subscription.
  2. If you receive a notification with "subscriptionType": "contact.propertyChange", then you trigger the editContactWebhook function.

My question is: Does editContactWebhook update data in HubSpot or your system? If it updates the contact's firstname in HubSpot, this will create a loop.



In editContactWebhook update data in our System..


Hi, @avinash.

Can you confirm that the integration only goes from HubSpot to your system (and not back to HubSpot)?

If the editContactWebhook function does not interact with HubSpot's APIs, I'm afraid I will not be much help troubleshooting.

When you say "editContactWebhook function [is] called continuously," it sounds like you are describing the fact that resolve(true) keeps returning the same result over and over again.

For example:


Is that correct?

If so, this suggests there some kind of loop on your end that needs to be resolved. I won't be your best resource for debugging that code.