Need more details on supported workflow actions

https://legacydocs.hubspot.com/docs/methods/workflows/v3/create_workflow. I am planing to programmatically create workflow and use actions EMAIL, UPDATE_LIST.

What are the allied JSON properties for these actions?

Where can I find the request JSON schema for these actions?

Hey, :waving_hand: To confirm you are not missing any additional examples or documentation outside the endpoints listed here — Workflows API Overview

One thing I noticed on the example page was this line — “When in doubt, create a workflow in
HubSpot with the desired actions first and inspect the API response from the workflow request.

I made a quick test using what you mentioned. My steps:

  • I went in-app and created a Contact-based workflow with no enrollment and two actions — add to a static list and send an automated email

  • I used this endpoint to get the ID — Get workflows

  • I used this endpoint to return the formatting for the JSON request. You can reuse it in the future — Get workflow (by ID)

    ...
     "name": "Test1",
     "actions": [
     {
     "type": "UPDATE_LIST",
     "listId": 4,
     "directive": "ADD",
     "actionId": 1,
     "stepId": 1
     },
     {
     "type": "EMAIL",
     "emailCampaignId": 243846973,
     "emailContentId": 100524098339,
     "emailCampaignGroupId": 243847496,
     "actionId": 2,
     "stepId": 1,
     "goalListCount": 0
     }
     ],
     ...​
    
  • There isn’t a quicker way to do this. You’ll need to create a workflow with the options in-order to get an example returned via the above endoint

Not perfect, and I hope it will help get you moving forward.

Have fun building!

— Jaycee