Overview
An automated portfolio tracker on Google Sheets with all the functions collects, organizes and provides information for your investments from various sources. It is very convenient for the actual portfolio tracking and calculations that are required to be updated at all times to provide an accurate view of the investment portfolio.
Users input investment specifics such as stock symbols and purchase prices, and the sheet populates current prices, position, gains/losses, and portfolio weight, offering one, combined, tap-prompted snapshot of all their investments.
Objective
The objective of an automatically tracked portfolio in Google Sheets is to automatically query and retrieve information about different assets, enabling a user to view a constantly updated overview of a portfolio in a single, consolidated place where user can track the performance, maintain the right asset allocation and reach informed decisions without constant manual (or automatic) checks across different accounts or spreadsheets.
How does it work?
Step 1: Manual / Scheduled Trigger
You can initiate the workflow in two ways:
- Manual Trigger: A user manually clicks “Execute Workflow” in n8n to update portfolio real time.
- Automation of Scheduling: The workflow can be scheduled to run at a specific frequency with a CronNode (Hourly, Daily, Weekly, etc) and updates can be made without human intervention.
Step 2: Fetch Existing Portfolio Data
The workflow starts by fetching the portfolio data from Google Sheets, which serves as the dataset of record. Typical fields include:
- Stock/Asset Name, Quantity Owned, Purchase Price, Purchase Date, Market Prices
- HTTP Request node that communicates with an API of a financial data provider to obtain up-to-date stock prices.
Step 3: Fetch Market Prices (API Call)
And then an HTTP Request node talks to a financial data provider API in order to get up-to-date stock prices.
The API provides live or near-realtime data for each ticker.
This ensures that the value of the portfolio is consistent with real-time market conditions.

Step 4: Data Cleaning (Code Node)
- In the raw API response there is often unnecessary information.
- The data is then processed, refined and merged by a Code Node, selecting only what we care about Ticker, Current Market Price, Timestamp
Step 5: Integrate Portfolio Data with Market Prices
- For that, we use a Merge Node to relate the ticker data from the API with each of the portfolio entries.
- We make sure that every row in the sheet contains the latest market value.
Step 6: Calculation / Transformation (Code Node)
Other calculations which is to be performed by a Code Node are:
- Current value (Quantity x Latest Price)
- Gains or Losses (Value Just Now – Value When You Bought It)
- Outputs final rows to be updated back to Google Sheets.
Step 7: Update Google Sheets
- The Update Row in Sheet node replaces previous entries in the portfolio sheet.
- Your Google Sheet will always show you real-time market data and how your portfolio is doing.

Technology Stack Included
Key Benefits
Real Time Portfolio Tracking
Integrating n8n with Google Sheets for real time portfolio tracking offers several benefits like being updated with the live stock/crypto/fund values directly in Google Sheets.
Automation Saves Time
n8n automation saves time of the manual work of updating the sheets with the latest investment data and its associated errors and its rework, allowing the simplification of complex data handling.
Errorless P&L Calculation
Automating the P&L calculation offers the benefit of eliminating the human errors resulting in higher accuracy, faster reporting and time saving as it has autofillup data.
Combined Dashboard
A combined dashboard with automation provides numerous benefits by offering a single source for all the data. Offering the real time insights, and automating tasks, alerts, and reports.
Adoptable Triggering
Adoptable triggering enhances automation by enabling processes to run based on user, application, or data-driven events, making them more responsive, efficient and tailored to your specific needs.
Closure
The objective of automated tracked portfolio in the Google Sheets enables the ease of doing all the work of filling the data manually and errors related to it. It is very convenient for the actual portfolio tracking and calculations that are required to be updated at all times to provide an accurate view of the investment portfolio.