Automated Multi-Currency Stock Portfolio Tracker by Denis GrasbergerAutomated Multi-Currency Stock Portfolio Tracker by Denis Grasberger

Automated Multi-Currency Stock Portfolio Tracker

Denis Grasberger

Denis Grasberger

The Challenge The client required a robust, fully automated system to track daily stock performance and volumes across multiple international markets (US, UK, Europe). Manually updating stock prices in Google Sheets was time-consuming and prone to human error, especially regarding currency conversions (e.g. USD/GBP to EUR) and formatting consistency.
The Solution I engineered a n8n workflow that orchestrates the entire data pipeline from API retrieval to final reporting.
Key Features & Workflow Logic:
Dynamic Data Fetching: The system iterates through a Google Sheets "Mapping Table" to identify which stocks to track and their target destination in the report.
Real-Time API Integration: Connects to the EODHD API to fetch end-of-day stock prices and trading volumes for global tickers.
Intelligent Currency Conversion:
Automatically fetches live Forex rates (e.g. EUR/USD, EUR/GBP) via API.
Detects the source currency (USD, GBP/Pence, EUR etc.) and converts all values into a standardized Euro format.
Handles edge cases like converting London Stock Exchange pence (GBp) to standard currency units.
Advanced Data Processing: Javascript Code Nodes utilize complex logic to handle arrays, format numbers (German locale), and map data to specific spreadsheet cells dynamically.
Smart Error Handling: Includes logic to detect empty sheets, calculate the next available row dynamically (appending data vs. overwriting), and manage API rate limits.
Reporting: Generates a clean, date-stamped entry in Google Sheets and triggers an email notification with a PDF snapshot of the day's performance at night.
The Outcome The client now has a "set and forget" system that runs automatically every morning. It provides an accurate, standardized view of their portfolio value in Euros, eliminating manual data entry and ensuring 100% data integrity for financial decision-making.
Technical Stack:
n8n (Workflow Automation)
Javascript (Data Transformation & Logic)
EODHD API (Financial Data)
Google Sheets API (Database & Reporting)
JSON (Data Structure)
Like this project

Posted Dec 11, 2025

Automated stock tracking system with real-time API integration and data processing.