Workflow not getting assigned to contacts created/updated using batch API

workflows

#1

Team,
Our requirement is to assign workflows to a group of contacts as soon as they are exported to HubSpot.
To do so, I am using the API : "/contacts/v1/contact/batch/", to export a group of contacts, and once we receive the status code from the API as 202, we assign the workflows to all contacts of the batch using the API: "/automation/v2/workflows/:workflowId/enrollments/contacts/:email".

Since, create/update contact API does not provide a field in request body for workflow if, we have to do this after batch is run successfully.
However, sometimes the API to enroll a contact to workflow returns an error as 404, even if the contact is shown as exported correctly.
Please let us know as how this could be resolved as there is no issue while exporting contact.
Thanks


#3

Welcome, @Abvashis!

Happy to help. To troubleshoot effectively, though, I'll need more information. Please share:

  1. Your Hub ID.
  2. Example request URLs which returned 404 errors. Do not include your API key. I will redact the email addresses once I receive your response.