APIs & Integrations

homepocketryan
Member

Is it possible to get contacts by workflow id for a given timeframe?

Hi there,
I’m trying to do some reporting for my customers. I am a developer. I have API access. I’m trying to get the unique contacts for a given workflow id… more importantly, within a given timeframe.

I’ve tried things like … https://api.hubapi.com/contacts/v1/search/query?q=1626974&hapikey= . or even have tried to get the history for a given workflow id (for said period of time) and then figure out unique contacts in that fashion?

Ultimately, i’m trying to get at contact history… and starting from a workflow id.

Any help is appreciated.

Thank you,
Ryan

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Is it possible to get contacts by workflow id for a given timeframe?

Hi @homepocketryan,

You can use the log events endpoint (below) to get a history of events for that workflow, which will include the contact vid in the event JSON. With the contact vid, you can then use the contacts API to get the contact info. You can also filter the results to return only specific timeframes, events for specific contacts, and/or specific workflow event types (e.g. WORKFLOW_COMPLETED).

0 Upvotes