You are helping me build the following AI agent workflow. ## Goal Stock Market Technical Analysis Alerts: Every weekday at 5 PM, it checks your stocks for Golden or Death Cross signals and alerts Discord if a trend change occurs. ## Specification - What it does: Get instant Discord alerts when your stocks hit Golden or Death Cross signals every weekday at 5 PM. This workflow monitors your tickers using Alpha Vantage data to spot trend changes before you do. - Trigger: On a schedule (Scheduled ยท daily 5 PM weekdays) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Alpha Vantage API: Fetch stock price data - PostgreSQL: Store historical price history - Discord: Send alert notifications ## Known pitfalls, handle each one explicitly in your implementation 1. PostgreSQL date types can cause timezone mismatches if not explicitly set to UTC during data insertion and retrieval. 2. The Code node will fail silently on missing historical data for new tickers, so add a check to ensure sufficient rows exist before calculating SMAs. 3. Discord webhooks require proper JSON formatting or the alert message will be rejected by the API endpoint. ## Reference implementation https://n8n.io/workflows/6692 (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/stock-market-technical-analysis-alerts/ via usecasesforagents.com