Templates / Stock fundamental analysis & AI-powered reports with Mistral and AlphaVantage

Stock fundamental analysis & AI-powered reports with Mistral and AlphaVantage

Ready for 3.0

by Sebastian/OptiLever ✓ · 651 views · created 2025-07-06 · Crypto Trading, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (14)

Auto-fixing Output ParserMistral Cloud Chat ModelStructured Output ParserGmailBasic LLM Chain

What it does

Fundamental Analysis, Stock Analysis, and AI Integration in the Fundamental Analysis Tool --- Overview of the Tool The Fundamental Analysis Tool is an automated workflow designed to evaluate a stock’s fundamentals using financial data and AI-driven insights. Built in the n8n automation platform, it: 1. Collects financial data for a user-specified stock from AlphaVantage. 2. Processes and structures this data for analysis. 3. Analyzes the data using the Mistral AI model to provide expert-level insights. 4. Generates a visually appealing HTML report with charts and delivers it via email. The tool is triggered by a form where users input a stock symbol (e.g., "NVDA" for NVIDIA) and their email address. From there, it follows a three-stage process: data retrieval, data processing, and AI analysis with report generation. --- 1. Fundamental Analysis: The Foundation Fundamental analysis involves evaluating a company’s intrinsic value by examining its financial health, competitive position, and market environment. This tool performs fundamental analysis by: Data Retrieval - Data Types: Six types of data are retrieved via HTTP requests: - Overview: General company details (e.g., sector, industry, market cap). - Income Statement: Revenue, net income, and profitability metrics. - Balance Sheet: Assets, liabilities, and equity. - Cash Flow: Operating, investing, and financing cash flows. - Earnings Calendar: Upcoming earnings events. - Earnings: Historical earnings data (annual and quarterly). Key Metrics Analyzed The tool structures this data into 8 categories critical to fundamental analysis, as defined in the "Code1" node: 1. Economic Moats & Competitive Advantage: Assesses sustainable advantages (e.g., R&D spending, gross profit). 2. Financial Health & Profitability: Examines ROE, debt levels, and dividend yield. 3. Valuation & Market Sentiment: Evaluates P/E ratio, PEG ratio, and book value. 4. Management & Capital Allocation: Reviews market cap justification and cash allocation (e.g., R&D, buybacks). 5. Industry & Risk Exposure: Analyzes revenue cyclicality and geopolitical risks. 6. Key Metrics to Probe: Investigates net income trends and gross margins. 7. Red Flags: Identifies risks like inventory issues or stock dilution. 8. Final Checklist: Summarizes pricing power and risk/reward potential. These categories cover the core pillars of fundamental analysis, ensuring a holistic evaluation of the stock’s intrinsic value and risks. --- 2. Stock Analysis: Tailored Insights The tool performs stock-specific analysis by focusing on the user-provided stock symbol. Here’s how it tailors the process: Input and Customization - Form Submission: Users enter a stock symbol (e.g., "NVDA") and email via the "On Form Submission" node. - Dynamic Data Fetching: The "Set Variables" node passes the stock symbol to the API calls, ensuring the analysis is specific to the chosen stock. Processing for Relevance - Data Filtering: The workflow limits historical data to the last 5 years (via the "Limit" node), focusing on recent trends. - Merging and Cleaning: The "Merge" and "Code2" nodes combine and refine the data, removing irrelevant fields (e.g., quarterly reports) and aggregating annual reports for consistency. Output - The final report is titled with the stock’s name (e.g., "Fundamental Analysis - NVIDIA"), ensuring the analysis is clearly tied to the user’s chosen stock. This stock-specific approach makes the tool practical for investors analyzing individual companies rather than broad market trends. --- 3. AI Integration: Expert-Level Insights The integration of AI (via the Mistral model or others) is what sets this tool apart, automating complex analysis and report generation. Here’s how AI is woven into the workflow: Data Preparation for AI - Structuring: The "Code1" node organizes the raw data into a JSON schema aligned with the eight fundamental analysis categories. - This structured data is fed into the AI for analysis. AI Analysis - Node: "Bas

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.