> ## Documentation Index
> Fetch the complete documentation index at: https://docs.greentick.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Automations

> Validate, save, publish, and enroll GreenTick workflows from an assistant.

An automation is a workflow on one WhatsApp number. The assistant saves a draft first. It publishes or enrolls only after you ask.

## Order of calls

**1. Read the catalog**

`get_workflow_catalog` lists starter workflows. `create_workflow_from_template` copies one by `templateSlug` and `name`. The copy is a draft.

**2. Validate**

`validate_workflow` checks the steps and does not save them. The first step must be a trigger: `message_received`, `webhook`, or `campaign_enrolled`. Name, description, text, and caption must fit `get_limits`.

**3. Save the draft**

`create_workflow` or `update_workflow` stores the draft. A draft blocks `enroll_automation` until `publish_workflow` succeeds. `list_workflows` and `get_workflow` show draft and published status.

**4. Publish**

`publish_workflow` runs only after you ask. A validation error stays on that tool. The assistant does not enroll the workflow to get around it.

**5. Enroll**

`list_automations` returns published automations that can be enrolled. `enroll_automation` takes up to 100 contacts. The assistant does not enroll a draft.

`discard_workflow_draft` drops unpublished edits. `delete_workflow` deletes the workflow and its execution history, and only after you ask. `export_workflows` exports up to 50 workflows by id. `get_workflow_analytics` reads one workflow's analytics.

Drip campaigns in the dashboard only list workflows whose trigger is `campaign_enrolled`. A `message_received` workflow does not appear there.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.