APIs & Integrations

AAslam4
Member

Enroll a contact into a workflow | Workflows API

SOLVE

POST/automation/v2/workflows/:workflowId/enrollments/contacts/:email - Add a contact to a workflow.

 
 

Can anyone make this api work? I keep getting a 404 resource not found.. even in the test call in the link above.

Help!
Screenshot from 2023-09-13 18-26-23.png

0 Upvotes
1 Accepted solution
GR73
Solution
Participant

Enroll a contact into a workflow | Workflows API

SOLVE
0 Upvotes
4 Replies 4
CBN
Top Contributor

Enroll a contact into a workflow | Workflows API

SOLVE

I have the same problem. I have not found a solution and HubSpot is clueless and helpless.

 

The issue for me is that new workflows do not have the id that works with V2 of the endpoint to enroll contacts into a workflow.

 

My new workflow has this definition:

 

{
"id": "1639575837",
"isEnabled": true,
"objectTypeId": "0-1",
"flowType": "WORKFLOW",
"revisionId": "21",
"name": "Phase 1: Activation (Opt-In) Emails Workflow",
"createdAt": "2025-03-20T14:48:13.293Z",
"updatedAt": "2025-03-25T00:17:00.843Z"
}

 

Unfortunately the id does not work with the enroll endpoint. I get this response:

 

{"status":"error","message":"resource not found","correlationId":"d984d458-cfee-69bc-f5b5-311b2006fdba"}





When you look at an 'old' workflow, then you have a UUID parameter.

 

{
"id": "58649142",
"isEnabled": true,
"objectTypeId": "0-1",
"flowType": "WORKFLOW",
"revisionId": "115",
"name": "1.0 Free trial: Day 1 Welcome - Account Created",
"uuid": "hybrid-execution-wf-23109586",
"createdAt": "2021-03-09T21:34:25.799Z",
"updatedAt": "2025-02-07T07:13:12.538Z"
},

 

When you use the last part of the UUID as defined in the previous documentation by HubSpot, then it works.

 

The problem is that we do not have other ids in the new workflow.

 

All help is appreciated. 

0 Upvotes
GR73
Solution
Participant

Enroll a contact into a workflow | Workflows API

SOLVE

i found a solution, i hope (or not...) this is still relevant to you:
https://community.hubspot.com/t5/APIs-Integrations/enroll-existing-contacts-via-API/m-p/1139587/high...

0 Upvotes
nychd
Contributor

Enroll a contact into a workflow | Workflows API

SOLVE

Did you ever figure this out? Having the same problem. 

0 Upvotes
SophieHull
Member

Enroll a contact into a workflow | Workflows API

SOLVE

It seems like you're encountering a "404 resource not found" error when trying to add a contact to a workflow using the API. Double-check the correctness of the :workflowId and :email parameters in your API request URL, as well as the endpoint structure, to ensure they match the system's requirements. If the issue persists, you might want to consult the API documentation or reach out to the API provider's support for further assistance in resolving this specific error.

0 Upvotes