create_workflow
Create a workflow (confirm-gated; Coach Pro or gym plan required). Either pass templateKey (from list_workflow_templates) to switch on a ready-made one, or give name, triggerType, optional days, and actionType + text. actionType 'send_message' sends text as written ({{clientName}} etc. allowed); 'ai_message' treats text as an instruction and has AI draft a message in the coach's voice, held for approval unless requireApproval is false; 'notify_coach' only reminds the coach. Safety limits are built in: 8am–9pm client-local time, max 2 workflow messages per client per day, each event fires once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| via | No | chat | |
| days | No | ||
| name | No | ||
| text | No | ||
| confirm | No | Must be true to actually execute. If false/omitted, returns a preview only. | |
| actionType | No | ||
| templateKey | No | ||
| triggerType | No | ||
| requireApproval | No |