Skip to main content
inputBulkUpsertWorkflowStepInput

Fields

stepId
ID

Optional step ID - if provided and exists in this workflow, step will be updated. Otherwise created with new ID.

type

The type of step: ACTION, CONDITION, WAIT or NOTE.

name
String

Optional name for the step.

payload
String!
required

JSON-encoded step configuration: an object with "version":1 and a type, using exactly the fields below. IDs belong to the current workspace. Accepted action types depend on the workflow trigger.

  • CONDITION: a leaf, or a combinator {"version":1,"type":"and"|"or","conditions":[…]} / {"version":1,"type":"not","condition":{…}}. Leaves: any_message_contains / any_customer_message_contains (keywords: string[], matchType?: CONTAINS|MATCHES_WORD); contains_label (labelTypeIds); priority_equals (priorities: int[], 0=Urgent … 3=Low); tier_equals (tierIds); customer_email_includes (customerEmails); support_channel_equals (supportChannels: SLACK|MS_TEAMS|EMAIL|CHAT|DISCORD|API); outside_business_hours (businessHoursScheduleId?); thread_field_equals (threadFieldKey, fieldValue: {type, operator, value}); ai_workflow_rule_condition (prompt, for checks with no native type).
  • ACTION: apply_labels / remove_labels (labelTypeIds); set_priority (priority: 0–3); set_tier (tierId); assign_to_user (userId); assign_to_team (teamLabelId); add_note / send_message (text, markdown or null); set_status (statusDetail, e.g. ThreadStatusDetailDoneManuallySet); set_thread_field (threadFieldKey, threadFieldType, one value field).
  • WAIT: {"duration":<seconds>}. NOTE: {"text":"…"}. Example, labelling invoice threads: a CONDITION {"version":1,"type":"any_message_contains","keywords":["invoice"]} whose true branch goes to an ACTION {"version":1,"type":"apply_labels","labelTypeIds":["lt_…"]}. See WorkflowStep.payload for every type.
transitions
[ID]!
required

Transition step IDs. ACTION steps: [nextStepId], CONDITION steps: [trueStepId, falseStepId], WAIT steps: [completedStepId, cancelledStepId], NOTE steps: []. Use null for terminal/no branch. A NOTE step cannot be a transition target or the startStepId.

positionX
Float

X position of this step on the canvas.

positionY
Float

Y position of this step on the canvas.