Problem with enrollment in a workflow with a coded step

I have a coded step that was created some weeks ago, let’s say 3.

3 weeks ago it ran, but, we misjudged the service key’s scopes and the coded step couldn’t make the changes it needed to the objects in question, nevertheless, 3000+ contacts were enrolled.

Today, we have fixed the scopes problem and want to reenroll those 3000+ contacts, it’s easy with a filter.

We filter, we re-enroll, the worfklow starts enrolling contacts and then, after 300 or so it stops.

I do the same thing again, apply the workflow to the same filtered segment… the workflow gets activated, it advances 300 or so contacts and then stops.

So I have to filter again.

Is there an explanation for this?

Hi @Sebasluke,

Can you please share a screenshot of the exact enrollment and re-enrollment settings?

How are you verifying whether the contacts were enrolled or not? I assume through the workflow details page? Understand your workflow details page

For contacts who didn’t enroll (you can check by picking contacts at random and checking the workflow details page), have you checked this? Troubleshoot workflow enrollment issues

If yes, and if you confirmed all of the above, I’d recommend reaching out to HubSpot support.

Best regards

Hi, thanks for the response, this is the way it’s subscribed and using this filter + workflow details the thing can be easily evaluated.

We fixed it via api, will check with support. thanks.

Hey @Sebasluke,

Thanks for posting here and letting us know what worked in the meantime. Please feel free to keep us updated when you hear back from Support. Hopefully this can help other folks in the Community as well!

Thank you!!

Sam, Community Manager

You probably have to check the logs of the workflow and API key for this but I’m guessing you’re likely running into the rolling 10 limit for the API key. Basically, you’re limited to how many calls you can make (varies from 100 to 200 depending on your plan) in a 10 second period. Any calls that hit the limit will return a 429 error.

Depending on how your code is running, if it throws an appropriate error, HubSpot will attempt to retry the action several times until it fails. If you have a lot of records hitting the workflow at once, this can cause them to never get pass the limit.

You should be able to look at the API log and check the errors or the Workflow action logs to see something similar.

Various solutions include adding branches that randomly distribute and add delays to them to stagger the api requests. Or adding multiple API keys and have them randomly selected for each request.