Skip to content

Docs: Flows v4 API — actionTypeId 0-13 returns 500, plus type/objectTypeId discriminator and enum-operator gotchas #695

Description

@DigitalMole81

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.

  1. 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.
  2. 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.

  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.

  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions