Automated Crypto Portfolio Value Tracking in Airtable - n8n Workflow

Use this robust n8n workflow to automatically fetch cryptocurrency prices via CoinGecko and update your Airtable portfolio ledger hourly. A crucial n8n template for finance tracking.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Cryptocurrency investors who maintain their holdings data in Airtable.

  • Automation specialists looking for practical n8n templates integrating external APIs with databases.

  • Users needing a scheduled n8n workflow solution for financial monitoring.

  • Anyone who wants to leverage the CoinGecko n8n node for price data integration.

Overview

Keeping a crypto portfolio ledger updated manually is time-consuming and prone to errors. This powerful n8n workflow template solves this by scheduling an hourly update cycle. It seamlessly integrates the CoinGecko API with Airtable, ensuring that the 'Present Price' for every asset in your portfolio is always current. Furthermore, the n8n template utilizes a custom calculation (via a Function n8n node) to sum up the total portfolio value, providing a real-time historical log of your wealth. This specific n8n workflow is essential for accurate, hands-off portfolio reporting, making it a highly valuable piece of automation.

How it Works

The entire process is initiated by the 'Run Top of Hour' n8n trigger, which executes the n8n workflow every hour.


  1. Initial Data Retrieval: The 'Get Portfolio' n8n node connects to Airtable to retrieve a list of all cryptocurrency records, specifically fetching the Symbol (CoinGecko ID) and the Airtable record ID for subsequent updates.

  2. Price Fetching: For each asset, the 'CoinGecko' n8n node is executed, using the retrieved Symbol to query the current USD price.

  3. Data Structuring: The 'Set' n8n node prepares the data payload, combining the CoinGecko price (Present Price) and the Airtable record ID (Id). This step ensures the necessary data points are ready for the update.

  4. Individual Record Update: The 'Update Values' n8n node pushes the current price back into the relevant record in the 'Portfolio' table in Airtable.

  5. Total Value Calculation Prep: Once all individual asset prices are updated, the 'Get Portfolio Values' n8n node retrieves the newly calculated Present Value (assuming this is a calculated field within Airtable: Holdings * Present Price) for every asset.

  6. Aggregation: The 'Determine Total Value' Function n8n node iterates through the incoming data, sums all the individual 'Present Value' fields, and outputs the final 'Portfolio Value (US$)'.

  7. Logging: Finally, the 'Append Portfolio Value' n8n node logs this aggregated total value as a new entry in a separate 'Portfolio Value' table in Airtable, providing a continuous time-series record of the portfolio's performance.

Installation Guide

To deploy this n8n workflow template, follow these steps:


  1. Import: Copy the provided n8n workflow JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Credentials Setup:

Airtable: You must provide your Airtable API Key credentials to the 'Airtable' n8n node. Click on the credential selector for 'Get Portfolio' and 'Update Values' nodes and connect your API key.

  1. Configuration Check:

Ensure the application ID (appT7eX4iZcZVRIdq) and the table names ('Portfolio', 'Portfolio Value') within the Airtable n8n node configurations match your actual Airtable base and tables. If your base ID is different, update it in all five Airtable n8n nodes.

  1. Activation: Once credentials are set, activate the n8n workflow. The 'Run Top of Hour' n8n trigger will begin execution automatically.

Node Details

Run Top of Hour (Cron Trigger)
Function: Serves as the primary n8n trigger, ensuring the automation runs reliably once every hour.
Key Configuration: Set to run using the everyHour mode.
Get Portfolio (Airtable Node)
Function: Retrieves the list of cryptocurrency symbols and record IDs from the 'Portfolio' table necessary for fetching current prices.
Key Configuration: Operation set to list; Fields explicitly set to fetch Symbol.
CoinGecko (CoinGecko Node)
Function: Fetches the real-time market data for the corresponding cryptocurrency symbol.
Key Configuration: coinId is dynamically pulled from the previous Airtable output using an expression: ={{$json["fields"]["Symbol"]}}.
Set (Set Node)
Function: Standardizes and maps the incoming data, extracting the USD price and the original Airtable ID for the update step.
Key Configuration: Sets Present Price using the expression ={{$json["marketdata"]["currentprice"]["usd"]}}.
Update Values (Airtable Node)
Function: Updates the 'Present Price' field in the 'Portfolio' table for each individual asset record using the record ID.
Key Configuration: Operation set to update; ID pulled dynamically.
Determine Total Value (Function Node)
Function: This custom code n8n node aggregates all the individual 'Present Value' items into a single total portfolio value.
Key Configuration: Contains JavaScript logic to loop through items and sum the values found in value.json.fields['Present Value'].
Append Portfolio Value (Airtable Node)
Function: Logs the final calculated total portfolio value into a separate historical tracking table.
* Key Configuration: Operation set to append; Fields updated include Portfolio Value (US$).

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by
jason
jason

Featured*