Why is the HubSpot trigger not recording any events on the client's account despite changes in the Company Property?

This topic was automatically generated from Slack. You can find the original thread here.

I’m working with a client at the moment and using the HubSpot trigger whereby if a Company Property is updated, it will trigger the flow.

On my own account (Using my Pipedream and HubSpot account), it works and we can get a test event to build the workflow.

On the client account (Which uses a different Pipedream account and HubSpot account), no event is ever recorded even when we changed the property on multiple companies.

I’m sorry to hear that you’re experiencing issues with the HubSpot trigger on your client’s account. To use the “New Company Property Change” trigger, please ensure that you’ve followed these steps: 1. Search for the HubSpot app from the trigger menu. 2. Select the “New Company Property Change” trigger. 3. Connect your client’s HubSpot account. 4. Select a Property or pass a string from a previous step. 5. Follow the instructions on the trigger configuration screen. You may need to generate a test event from HubSpot to get real data to test your workflow. If you’ve followed these steps and are still not receiving events, I recommend reaching out to Pipedream support at https://pipedream.com/support for further assistance.

Posted in HubSpot Property Events (Company) work in one account but not the other - #2 by pi

Are you familiar with the event sources model in Pipedream? When you create an app-based trigger like this, it technically runs as a separate resource at https://pipedream.com/sources . Can you visit the sources UI, find the source (trigger) that’s running with the client credentials, and visit the Logs tab?

We only store the last 100 log entries here, so if you don’t see anything that points to a potential problem, try re-creating a new trigger in the workflow UI, then visit the logs to see if you observe any issues on creation / first run. I’d like to see if the logs provide any useful information that we can dig into.

, thank you. I’ve been looking over these the past two days. My own account, it has logs, in the client account, no logs. I’ve created and re-created the source a few times. It always works on my account, but does not work on the clients.

Both HubSpot accounts have the same number of properties. But my account is a ‘dev’ Hubspot account and has less companies.

Otherwise I can’t see any reason why it’s not working on the clients account.

Can you send me a direct message with the event source ID of the client source? If you look in the URL, you’ll see the source ID at the end - https://pipedream.com/sources/dc_abc123 - dc_abc123 is the source ID

If you’re not seeing logs, I suspect a runtime error with the source, and I’d like to take a look

Hi Colin, we looked into it and I’m seeing the customer source run successfully, but it’s not emitting events — the core issue looks like it’s not correctly pulling data for the right time period. I suspect a subtle issue with the data / configuration, e.g. sometimes with large lists of records, we hit edge cases like this. I’m getting someone on my team on this. We’ll take a deeper look at the code and may reach out with more questions. Hopefully we can resolve ASAP.

Colin just shared some other information with me, I asked him to share here

Thanks Dylan. Copying from our DM:

I think I may have solved this. The way the trigger works is probably the issue as I think what it’s actually doing is returning all companies, and looping through, as opposed to filtering on the HubSpot side.

In HubSpot API V3 there is a search end point: CRM API | Search which has a number of filter and sort methods.

_This is my filter: https://gist.github.com/MCKLtech/b9cb3277a391244410e897c8d4fc6947_

And the property I am watching is thinkific_expiry_date

By setting the hs_lastmodifieddate in the filter group to yesterday, and a filter to remove any null values e.g. HAS_PROPERTY, it works as expected.

I believe in the Pipedream HubSpot code ,the function searchCRM could be used here.

I agree that the filter should be improved to only pull items modified since the last run. I also notice that we’re not paginating through the results, so with a large dataset, that might be causing events to be missed. I’ll set up an issue for these changes and link to it here.

awesome thanks Michelle

Thanks Michelle, the issue was first noticed by me on a dataset of approx 2,500 companies and 6000 contacts.

, do you happen to have an approx. ETA for this fix? Reason I ask is that if it will be some time, I’ll build a workaround but if it will be in the coming days, I will wait. Thanks again!

Hi . It’s being reviewed now, and we’ll try to have it published before the end of the week.

, just to close the loop, this is working great. Thank you!

Awesome! Great to hear.