# Zapier priority flows (founder-first)

This is the recommended shipping order for Zapier-powered workflows that make FreeAgentMaker feel immediately useful in real founder/operator work.

## Core pattern (applies to every flow)

1. **Trigger** from an external app (CRM, forms, support, meeting notes, scheduler).
2. **Run agent** (`POST /api/agents/:id/run`) with clear context.
3. **Draft-first output** in FreeAgentMaker (never auto-send external side effects by default).
4. **Human approval step** (Pending actions or explicit Zap approval gate).
5. **Action execution** in Zapier (create task, post Slack update, update CRM, send recap).
6. **Run receipt + audit trail** captured in FreeAgentMaker.

Keep this pattern consistent so users trust automation from day one.

## Top 5 flows to ship first

### 1) Inbound lead triage

- **Trigger:** New lead in form/CRM.
- **Agent output:** Qualification score, summary, next-best action, follow-up draft.
- **Zap actions:** Create CRM note, alert Slack channel, optional task creation.
- **Why first:** Immediate revenue impact and obvious value for founders.

### 2) Meeting follow-through autopilot

- **Trigger:** New meeting notes/transcript.
- **Agent output:** Decisions, owners, deadlines, follow-up drafts.
- **Zap actions:** Create tasks, draft recap email/slack message, add reminders.
- **Why second:** Turns meetings into execution; high daily painkiller.

### 3) Support ticket intelligence

- **Trigger:** New support ticket/helpdesk event.
- **Agent output:** Severity, routing recommendation, reply draft, escalation note.
- **Zap actions:** Tag/route ticket, notify escalation channel, create internal task.
- **Why third:** High-volume workflow with measurable response-time gains.

### 4) Content repurposing pipeline

- **Trigger:** New long-form content (doc/video/newsletter/blog).
- **Agent output:** Channel-specific draft set (social/email/blog snippets).
- **Zap actions:** Store drafts in Notion/Sheets, queue in scheduler, notify owner.
- **Why fourth:** Consistent distribution engine without manual repackaging.

### 5) Daily founder briefing

- **Trigger:** Scheduled every weekday morning.
- **Agent output:** Top priorities, blockers, follow-ups, suggested next actions.
- **Zap actions:** Send Slack/email briefing, create top-task card.
- **Why fifth:** Habit loop that keeps users returning daily.

## Rollout plan

### Phase 1 (ship now)

- Implement flows 1 and 2 with polished templates and docs.
- Include ready-to-import Zap descriptions and payload examples.
- Require approvals for side-effect actions by default.
- For **run-completion Catch Hooks**, parse **`webhookProtocolVersion: 2`** and surface **`runReceipt`**, **`recoveryHints`** / **`recoveryHint`**, and **`pendingActionsCount`** in Zap steps (see **[ZAPIER.md](./ZAPIER.md)**).

### Phase 2

- Add flows 3 and 4.
- Add failure routing (dead-letter queue + retry hints in UI).

### Phase 3

- Add flow 5 and cross-flow analytics dashboard (trigger-to-action latency, approval rate, completion rate).

## Safety checklist (must pass before broad rollout)

- Approval gate ON by default for external writes/sends/posts.
- Scope minimization for each connected app.
- Clear "why this action" explanation before approval.
- Replay-safe webhooks (idempotency key + dedupe).
- Error visibility in app (not hidden in Zapier only).

## Metrics to track

- Time-to-first-automation (signup to first successful trigger->action run).
- Approval completion rate.
- Trigger->action success rate.
- Draft acceptance/edit ratio.
- Weekly retained users with at least one active flow.

