Workflow API get all actions

Hello,

When I try to get actions from workflows from endpoint "

/automation/v3/workflows/:workflowId", I only get a single path within all branches of the workflow, the left one. All related filters and actions are good for this path btw. I dont know if its a strange functionnality but this happens on all worflow.
If you have any ideas on how to get all branche’s actions or a clear answer that it’s impossible to do could be very helpfull,
Thanks !

Hey, @JLegendre8 :waving_hand: Thanks for flagging this. I get the same result from a quick test. Here’s what I did:

  • Created a contact-based workflow

  • No enrollment options

  • Added two branches – `A` and `B`

  • Added a single action to each branch – send an email for A and clear a property for B

  • Made a request to the endpoint you listedGET https://api.hubapi.com/automation/v3/workflows/51502686​

  • Only got back `actionId 1` aka the “left branch”

    "name": "Testerrr-NOV23",
     "actions": [
     {
     "type": "BRANCH",
     "actionId": 1,
     "filters": [
     [
     {
     "property": "firstname",
     "value": "Bob",
     "type": "string",
     "filterFamily": "PropertyValue",
     "operator": "EQ",
     "withinTimeMode": "PAST"
     }
     ]
     ],
     "rejectActions": [],
     "acceptActions": [​
    

I reached out to the owner of these endpoints to see if this is “working as designed” or if there is an issue in how the response is returned.

Talk soon! — Jaycee

Thanks @Jaycee_Lewis, I hope this can be cleared up while I’m still working on it !
Talk soon !

Hi, @JLegendre8 :waving_hand: I found a resource internally and got our answer.

This is working as designed. The issue is due to the endpoint predating the release of branches in workflows. There isn’t a way to force the endpoint to return multiple branches or coerce that data from another of the existing endpoints for Workflows.

I don’t have a roadmap or date to share, but my suggestion is make sure you’re subscribed to the HubSpot Developer Changelog so you are the first to know when the revamped endpoints get released publicly.

Best,

Jaycee

I agree that this is a major limitation to the Workflow API. We currently use a workflow to sort our lead distribution and having an API that can check the current branch filters, I could then code comparison check to where we currently store our data and then update the filters accordingly. This would allow us to have this automatically update everything from one document, instead of having to change multiple sources manually.