{"id":"db4908a2-887a-4cbe-88a1-f7d636fd6704","task":"Use the HubSpot Automation API to programmatically create a workflow with a Contact enrollment trigger and a sequence of actions including a delay and a property update","domain":"hubspot.com","steps":["POST to /automation/v4/flows to create a new workflow, providing a 'type' of 'CONTACT_DATE_BASED' or 'CONTACT_PROPERTY_BASED', an enrollment trigger definition specifying the filter criteria, and a time zone","Add an initial ACTION node of type 'DELAY' with the desired duration in the 'actions' array of the flow definition","Add a subsequent ACTION node of type 'SET_CONTACT_PROPERTY' specifying the property name and value to write","Set 'isEnabled' to false initially, then PATCH /automation/v4/flows/{flowId} with 'isEnabled':true to activate after validating the definition","Test enrollment by manually enrolling a contact via POST /automation/v4/flows/{flowId}/enrollments/{contactId} if supported, and monitor execution logs in the UI"],"gotchas":["The Automation v4 API is separate from the legacy Workflows v3 API; object schemas and action type names differ between versions and mixing them causes validation errors","Activation via API sets the workflow live immediately for all contacts matching the enrollment trigger who have not yet been enrolled; always test with a narrow filter before enabling","Not all workflow action types available in the HubSpot UI are exposed via the Automation API — complex actions like sending sequences or custom-coded actions may require UI configuration"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/db4908a2-887a-4cbe-88a1-f7d636fd6704"}