Manage workflows
workflows_manageAutomations. create (a trigger and steps; active by default and then acts by itself, so confirm), update (isActive false pauses), delete (confirm first).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Required for: update, delete. | |
| name | No | Required for: create; optional for: update. | |
| steps | No | Required for: create; optional for: update. Ordered steps, each { id?, type, config: {...} }. Types and config: send_sms { to?, body }; send_email { to?, subject, body_html?, body_text? } (blank to = the run's contact); add_to_campaign { campaign_id } (ongoing, sending); apply_tag / remove_tag { tag_name }; create_note { body }; create_task { title, description?, due_at?, due_in_days?, kind?, location?, contact_id? }; fire_webhook { url, method?, headers?, body? }; update_field { field, value } (first_name, last_name, email, phone, position, city, source, notes, primary_phone, company_id); set_custom_field { field_key, value } ("cf." prefix optional); move_deal_stage { stage_id, deal_id? }, set_deal_value { value, deal_id? } (default: the run's deal); create_deal { title, value?, stage_id? } → deal_id; set_status { status } (name; "none" clears);delay { delay_seconds | until_time HH:MM | until_date + until_offset_days?, stop_if?: {reply?, meeting?, optout?} } (account tz; stop_if: stop if they did it meanwhile); branch { condition, then: [steps], else: [steps] }. Record steps also take entity_type/entity_id. Strings support {{first_name}}, {{trigger.event}}, {{steps.<id>.output.<key>}} (give steps an id). On 400 INVALID_WORKFLOW, fix what it lists; do not retry as is. | |
| action | Yes | ||
| isActive | No | Used by: create, update. Default true. | |
| condition | No | Used by: create, update. Run is skipped unless true. { all|any: [{ field, op, value }] }. Fields: entity.<column>, cf.<field_key>, trigger.event|entity_type|entity_id, trigger.payload.<key> (not payload.<key>). Ops: equals, not_equals, contains, not_contains, starts_with, ends_with, is_set, is_not_empty, is_empty, includes_tag, greater_than, greater_or_equal, less_than, less_or_equal, older_than_days, newer_than_days. last_contacted_at older_than_days includes never-contacted contacts. | |
| description | No | Used by: create, update. | |
| triggerType | No | Required for: create; optional for: update. | |
| triggerEvent | No | Used by: create, update. Event name, or inbound webhook id. | |
| triggerConfig | No | Used by: create, update. Scheduled only: { recurrence: one_time|hourly|daily|weekly, run_at?, time_of_day?, days_of_week?, minute_of_hour?, timezone?, audience?: { tags: [1-5 names] } }. With audience it runs once per contact carrying any tag (max 500); without, once with no contact. |