BulkUpsertWorkflowStepInput
Input for a single step in the bulk upsert operation.
BulkUpsertWorkflowStepInputFields
Optional step ID - if provided and exists in this workflow, step will be updated. Otherwise created with new ID.
The type of step: ACTION, CONDITION, WAIT or NOTE.
Optional name for the step.
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,markdownor 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_…"]}. SeeWorkflowStep.payloadfor every type.
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.
X position of this step on the canvas.
Y position of this step on the canvas.
Was this page helpful?

