Hello,
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.
Hello,
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?
Hello,
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
if(webhookData[0].subscriptionType==="contact.propertyChange"){
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
Thanks
Hi, @avinash.
Please correct me if I misunderstand:
firstname
changes through a webhook subscription."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.
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:
resolved
resolved
resolved
resolved
resolved
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.