Multiple enroll of contact in a workflow in one api call

I’m currently enrolling a lot of user to a workflow. So fat I’ve only found a way to enroll contact to a workflow one by one.

The problem is I have 300+ contact to enroll and that trigger hubspot’s rate limiter. So I wonder if there is a way to enroll many (if possible thousands) of contact to a workflow at once.

Hey, @GBersac8 :waving_hand: Thanks for your question. As far as the Workflow API endpoints go, you are not missing an option. There is not a batch option or a way to programmatically handle bulk enrollments. Your options include:

  • Handling rate limiting and queuing on your end via your code
  • Creating a static or active list to bulk enroll your contacts in-app

If you have a moment to test and are willing to be a bit creative, consider trying to use the Import API as a workaround:

  • create your CSV for import (it could be new or existing Contacts)
  • create a custom property to flag these as workflow batch enrollments (ImportBatchID for example)
  • set the workflow to enroll using the unique property value set during import (e.g., contacts with “ImportBatchID: 12345”)
  • this could be tested using a small set of test contacts using a Developer test account and dummy contacts

I hope this helps you get moving forward! — Jaycee

Hi @GBersac8

As per the HubSpot API doc, you can enroll only one contact at a time.

You can refer to the doc attached below

https://legacydocs.hubspot.com/docs/methods/workflows/add_contact

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.

Thanks!