I have created a custom app “BQE Core” using OAuth. I am able to process the Post requests under my account “munawar@bqe.com” both from my test account and the customer account. The issue is that there is no post request received on my custom app (WebSite hosted on Azure) when some other user triggers the webhook, eg; peter.hahm@titustalent.com. Client HubSpot ID is 481357 and the app id is 237254. Any help in this matter will be appreciated. Also the webhook fires when one of the custom field Partner Status changes to “Active”.
Hey @Mkhurshid
Are you still working on this?
To be clear, you are saying that when you update the Partner Status property, a webhook is envoked.
But, when someone else does the same, nothing occurs. Is that correct?
And you are seeing no errors in the app?
Webhooks in hunspot workflows are extremly simple in a way that they can not fail. The issue could rather be how you set up your workflow to trigger that webhook - triggering workflows are waaay more complicated.
Webhooks simply just send a signal (http get request) to the adress entered in your workflow and I know for a fact that works.
In order to help you further we need to see the rules or terms on how your workflow is triggered. Are you using workflows and how is it triggered? Screenshot of the trigger would be best. It could also be an error due to reoccurring workflows that can easily be fixed.
The hubspot support can sign into your account to help you configure the error in workflow also so if you want a quick fix, the support is the best way to go in this case.
Edit: You write that there are no post request recieved in you app. Make sure to listen for a GET request in your code. Also URL needs to be a website not an email.
What I meant that when the Partner Status property changes (a custom property), webhook is envoked.
But, when someone else does the same, nothing occurs. I save the token and refresh it automatically in my app using OAuth, so when the webhook is invoked it simply posts a simple model to a ASPNET CORE controller that is hosted on Azure. Once I have the Object ID from the webhook payload, I get the company details along with the contacts using the Access Token via a Get Request. (Azure website that I have created saves the access token along with the refresh token to an online store, I refresh the access token using refresh token after the former expires) All that works fine, the only issue is that it works for me (I am setup as a user on the client Hub), it is not working for some other user if they change the project status . Is it related to 2FA. Here is the screenshot of how the WebHook is setup in my dev portal for the Custom APP. Michael C I would not use an Email Address :), it is a website hosted on azure..
And this is ASPNET Controller code that processes the web hook event. Michael C not to overwhelm you, just to give you an idea I am past sending HubSpot JSON payload to an email when events trigger :). I was able to make it work for users after I turned off the 2FA, I am investigating further with other users now and will keep you posted.
[HttpPost]
public async void Post([FromBody] List<HubSpotWebHookCompanyPost> value) {
if (ModelState.IsValid) { var hubspotsettings = await this.MongoService.GetHubSpotSettingsAsync(); var tempval = value.FirstOrDefault(x=>x.propertyValue==“Active”); List<string> ls = (value.Select(x => x?.objectId.ToString())).ToList<string>(); var IsLinked = await MongoService.FindLinkedBatchAsync(ls, CoreKnownModules.Client); if (tempval is not null && tempval.portalId.ToString() == hubspotsettings.hub_id && IsLinked.FirstOrDefault() is null && tempval.appId.ToString()==hubspotsettings.app_id && hubspotsettings.realtime) { var tiers = await HubSpotService.GetHubSpotCompanyTiers(); foreach (var item in value) { Company company = await HubSpotService.GetHubSpotCompanyDetailsByIDAsync(item.objectId.ToString()); company.properties.TierName = (tiers.options.FirstOrDefault(x => x.value == company.properties?.company_tier))?.label ?? string.Empty; var owner = this.HubSpotOwners.FirstOrDefault(x => x.id == company.properties.hubspot_owner_id); if (owner is null) { var hubowner = await this.HubSpotService.GetHubSpotOwnerByIDAsync(company.properties.hubspot_owner_id); if (hubowner is not null) { this.HubSpotOwners.Add(hubowner); company.properties.hubspot_owner_name = $“{hubowner?.firstName?.Trim()} {hubowner.lastName?.Trim()}”; } } else { company.properties.hubspot_owner_name = $“{owner?.firstName?.Trim()} {owner.lastName?.Trim()}”; } HubSpotCompanyResponse cbase = new HubSpotCompanyResponse(); cbase.companies = new List<Company>(); cbase.companies.Add(company); var records = await this.Factory.CreateClientAsync(cbase); if (records.Count() > 0) { CoreBatchModel<ClientModel> cbatch = new CoreBatchModel<ClientModel>(); cbatch.Items.AddRange(records); await this.CoreService.ProcessBatchRecordsAsync<ClientModel, ClientModel>(records, cbatch, CoreKnownModules.ClientBatch); if (records.Where(x => x.StatusMessage == “Created”).Count() > 0) { foreach (var cl in records.Where(x => x.StatusMessage == “Created”)) { if (cl?.CoreNewGroupAssignment?.Count>0) { List<GroupAssignment> cbgitems = new List<GroupAssignment>(); foreach (var ag in cl.CoreNewGroupAssignment) { GroupAssignment cg = new GroupAssignment() { entityId = cl.id.ToString(), groupId = ag.id }; cbgitems.Add(cg); } if (cbgitems.Count > 0) { CoreBatchModel<GroupAssignment> cb = new CoreBatchModel<GroupAssignment>(); cb.Items.AddRange(cbgitems); await this.CoreService.ProcessBatchRecordsAsync<GroupAssignment, GroupAssignment>(cbgitems, cb, CoreKnownModules.GroupsDetailBatch); } } var contacts = await this.HubSpotService.GetHubSpotContactsByCompanyIDAsync(cl.HubSpotId); List<Contact> corecontacts = new List<Contact>(); foreach (var contact in contacts.results) { var hc = await this.HubSpotService.GetHubSpotContactDetailsByCompanyIDAsync(contact.id); if (hc is not null) { hc.properties.coreClientId = cl.id.ToString(); if (String.IsNullOrEmpty(hc.properties?.company)) { hc.properties.company = cl?.company; } var cc = this.Factory.CreateClientContactAsync(hc); // var a = await this.CoreService.PostRecordBatchAsync<Contact, Contact>(cc, CoreKnownModules.ClientContact); corecontacts.Add(cc); } } if (corecontacts.Count > 0) { CoreBatchModel<Contact> cb = new CoreBatchModel<Contact>(); cb.Items.AddRange(corecontacts); await this.CoreService.ProcessBatchRecordsAsync<Contact, Contact>(corecontacts, cb, CoreKnownModules.ClientContactBatch); } }
Just to update all. Please close this incident, app seems to be stable now and is working as expected…
@Mkhurshid , did you make any modifications to get it working?
Yes I did. All is working as expected, thanks for the followup.
What was the solution?
The only thing that I changed for the user in question was to disable 2FA and everything started working. Not sure if it is related.

