When building HubSpot workflows programmatically via POST /automation/v4/flows from this SDK (and from raw HTTP), I've hit four errors that aren't in the docs and where the error messages are actively misleading. Posting the reproducible payloads here in case the SDK can either surface a clearer error or the docs can pick these up.
Tested on a Marketing Hub Pro portal, 30/07/2026, 74 live flows enumerated.
-
Legacy actionTypeId: "0-13" (alter-list-membership) returns HTTP 500 with an empty body. HubSpot split it. Use:
- Add to list:
actionTypeId: "0-63809083" with fields.listId + fields.targetObject: "{{ enrolled_object }}".
- Remove from list:
actionTypeId: "0-63863438" with the same shape.
-
type is required at the top level, and MUST match objectTypeId. Omitting it 400s with Some required fields were not set: [type] (reads like a missing property, actually a missing discriminator). Mismatch (e.g. PLATFORM_FLOW on objectTypeId: "0-1") 400s with Expected an object type other than "0-1" objectType but got "0-1" — blames objectTypeId, but the culprit is type. Verified: CONTACT_FLOW for 0-1, PLATFORM_FLOW for 0-3.
-
ENUMERATION-property operator allowlist is narrower than CRM Search. IS_NOT_EQUAL_TO 400s. Use IS_NONE_OF with a single-element values array; add includeObjectsWithNoValueSet: true if nulls should also match.
-
Unified-events filter branches cannot nest. Nested filterBranches[] inside a UNIFIED_EVENTS entry returns 400: Unified events filter branches cannot have any nested filter branches. Fix: promote each condition to its own top-level eventFilterBranches[] entry (implicitly OR'd).
Full reproducible request/response pairs, allowlist table and verification recipe: https://www.elemra.com/learn/hubspot-flows-v4-api-errors
Happy to open a PR against the SDK's error messages or docs if useful — let me know which direction is more welcome.
When building HubSpot workflows programmatically via
POST /automation/v4/flowsfrom this SDK (and from raw HTTP), I've hit four errors that aren't in the docs and where the error messages are actively misleading. Posting the reproducible payloads here in case the SDK can either surface a clearer error or the docs can pick these up.Tested on a Marketing Hub Pro portal, 30/07/2026, 74 live flows enumerated.
Legacy
actionTypeId: "0-13"(alter-list-membership) returns HTTP 500 with an empty body. HubSpot split it. Use:actionTypeId: "0-63809083"withfields.listId+fields.targetObject: "{{ enrolled_object }}".actionTypeId: "0-63863438"with the same shape.typeis required at the top level, and MUST matchobjectTypeId. Omitting it 400s withSome required fields were not set: [type](reads like a missing property, actually a missing discriminator). Mismatch (e.g.PLATFORM_FLOWonobjectTypeId: "0-1") 400s withExpected an object type other than "0-1" objectType but got "0-1"— blamesobjectTypeId, but the culprit istype. Verified:CONTACT_FLOWfor0-1,PLATFORM_FLOWfor0-3.ENUMERATION-property operator allowlist is narrower than CRM Search.
IS_NOT_EQUAL_TO400s. UseIS_NONE_OFwith a single-elementvaluesarray; addincludeObjectsWithNoValueSet: trueif nulls should also match.Unified-events filter branches cannot nest. Nested
filterBranches[]inside aUNIFIED_EVENTSentry returns 400:Unified events filter branches cannot have any nested filter branches. Fix: promote each condition to its own top-leveleventFilterBranches[]entry (implicitly OR'd).Full reproducible request/response pairs, allowlist table and verification recipe: https://www.elemra.com/learn/hubspot-flows-v4-api-errors
Happy to open a PR against the SDK's error messages or docs if useful — let me know which direction is more welcome.