Create macro
create_macroDestructive
Create a macro: a named sequence of actions an agent runs on a conversation with one click. Call list_agents, list_teams or list_labels first when an action needs an id or a label. visibility global means every agent sees it.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| actions | Yes | Steps the macro runs, in order. action_params per action: change_priority → exactly one of low, medium, high, urgent, nil; change_status → exactly one of open, resolved, pending, snoozed; assign_agent → one agent id (list_agents), the string "self" for whoever runs the macro, or "nil" to unassign; assign_team → one team id (list_teams), or the string "nil" to unassign; add_label → label titles (list_labels), one or more; remove_label → label titles, one or more; send_message → the message text (one string); send_email_transcript → one string of comma-separated email addresses; mute_conversation → none; snooze_conversation → none; resolve_conversation → none; send_whatsapp_flow → one object: {flow_id (list_whatsapp_flows, published only), flow_cta (the button label, at most 30 characters), body, and optionally header, footer, initial_screen}; add_private_note → the note text (one string); remove_assigned_team → none. | |
| visibility | Yes | global (everyone) or personal (only the author). |