# Trigger Flow

> Trigger a Directus automation flow Arguments: <flow-name-or-id> <collection> [--keys <id1,id2>] [--data <json>].

- Skill: `agents-store/trigger-flow` (Agent Skill)
- Install (CLI): `npx get-skill add agents-store/trigger-flow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agents-store/trigger-flow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: agents-store (https://skillmd.com/u/agents-store)
- Updated: 2026-11-16
- Page: https://skillmd.com/skills/agents-store/trigger-flow

---


# Trigger Flow

Follow the `flow-automation` skill (`${CLAUDE_PLUGIN_ROOT}/skills/flow-automation/SKILL.md`) for how flows, triggers and operations work; read it before the first call.

## Arguments

- `flow-name-or-id` (required) — Flow name (partial match) or UUID
- `collection` (required) — Collection context
- `--keys <id1,id2>` — Item IDs (required if flow needs selection)
- `--data <json>` — JSON payload passed as `$trigger.body`

## Process

1. **Find the flow:**
   - Call `flows` tool with `action: "read"` to list all flows
   - Match by name (partial, case-insensitive) or by UUID
   - If multiple matches, ask user to clarify

2. **Read flow definition:**
   - Call `flows` tool with `action: "read"` and `key: "<flow-uuid>"`
   - Check trigger type (must be manual or webhook for programmatic triggering)
   - Check if `requireSelection` is set (if yes, `--keys` is required)
   - Show flow details to user before triggering

3. **Trigger the flow:**
   ```json
   {
     "id": "<flow-uuid>",
     "collection": "<collection>",
     "keys": ["<id1>", "<id2>"],
     "data": { "custom": "payload" }
   }
   ```

4. Display the flow execution result

## Example

Input: `"Welcome Email" contacts --keys abc-123 --data {"send_now": true}`

## Important

- Always read the flow definition before triggering
- Verify the flow is active (status: "active")
- Check trigger type compatibility
- Warn user before triggering flows with side effects (emails, webhooks, deletions)
