Get all workflows of a contact

workflows

#1

Hi,
I am developing a integration of hupspot into our system.
I want to have a List of all workflows a contact is member of.
In the hubspot frontend I created a contact and a workflow and I added the workflow to the contacts workflow memberships. (https://app.hubspot.com/contacts/4787124/contact/1301/)
It is possible to get the contact over the API (/contacts/v1/contact/vid/1301/profile) and it was also successful to get the list of workflows (/automation/v3/workflows) but if i use the endpoint (/automation/v2/workflows/enrollments/contacts/1301) it just returns an empty array.

Does anybody know whats the problem here?


#2

Hi @tobias_encore_io,

Was the contacts currently active in the workflow at the time you requested the contact's workflow enrollments? That endpoint doesn't return past enrollments, only active ones.


#3

Hi Derek,

thanks for your answer. You are right, the workflows, i have designed started automatically when I added the contact. Now I tried to design a workflow, that starts at a date in future and added the contact manually. This workflow is now available via /automation/v2/workflows/enrollments/contacts/1301.

Is there any other way to get all the workflows of a user? In our app I want to display such a list like the one in the HubSpot front end. The HubSpot front end shows a list with all workflows, also the active ones.


#4

Hi @tobias_encore_io,

It's not currently possible to get a list of workflows that a contact was previously enrolled in via the API; it's currently only possible to pull workflows that the contact is active in. I can totally see the use case for that, though; If you have the inclination, I would encourage you to check out the Ideas Forum on the HubSpot Community.