# Zap blueprint: Flag upset customers before they churn

**This is a blueprint, not an import file.** Zapier has no public format for importing Zaps, so you rebuild these steps by hand in the Zap editor. It takes about 10–20 minutes (our estimate).
Create a new Zap: https://zapier.com/app/editor
Full recipe: https://recipeagents.usestarbase.com/recipes/angry-email-flag

## Steps
1. **Trigger:** Gmail: New Email
   - Recipe input: New support message
2. **Filter by Zapier** (optional): only continue if the input is the kind you want (see the recipe's failure modes).
3. **Action:** ChatGPT (OpenAI): Conversation, or AI by Zapier
   - Paste this prompt and map the trigger fields into the {{...}} placeholders:

```
Rate this customer message: calm | frustrated | upset | cancel_risk. Return JSON {level, reason (quote the phrase)}. Sarcasm counts. Message: {{msg}}
```
4. **Action:** Formatter by Zapier → Utilities → Import JSON / or Code by Zapier, to split the JSON fields (if the prompt returns JSON).
5. **Action:** Slack: Send Channel Message
6. **Test each step** with a real example, then turn the Zap on. Keep a human approval on anything customer-facing.

## Recipe steps (from the page)
- Trigger: new message.
- AI step returns sentiment plus a reason.
- If 'upset' or 'cancel_risk', add a priority tag and DM the owner.

## Where it breaks
- Polite but furious: Some customers are very polite when they're angry, which is why the prompt asks for the supporting quote: so you can check it.

App and step names follow Zapier's current app directory as of 2026-10-16. Names change, so search the app in the editor if a step looks different.
