You are helping me build the following AI agent workflow. ## Goal Stock Risk Alert Automation: Monitors your Google Sheets portfolio for price drops or high volatility and sends an AI-summarized email alert only when risks. ## Specification - What it does: You get clear, AI-summarized email alerts about risky drops or high volatility in your Google Sheets portfolio only when those risks exceed your set limits. This keeps you informed of critical market changes without the noise of unnecessary notifications. - Trigger: On a schedule (Scheduled ยท daily 9:00 AM) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Google Sheets: Read portfolio data - HTTP Request: Fetch real-time prices from Twelve Data - Groq Chat Model: Generate AI risk summaries - Gmail: Send alert notifications ## Known pitfalls, handle each one explicitly in your implementation 1. API rate limits can block the run, so add exponential backoff logic to retry failed requests gracefully. 2. Groq responses may vary in length, so truncate or pad the output to fit standard email client display constraints. 3. Google Sheets triggers can fire multiple times for a single edit, so add a deduplication check using row IDs. 4. Email authentication failures will halt delivery, so verify Gmail API scopes and service account permissions early. ## Reference implementation https://n8n.io/workflows/15515 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/ai-stock-risk-alert-automation/ via usecasesforagents.com