Monitor portfolio correlation and diversification with Google Sheets and Slack
Ready for 3.0What this workflow does
This workflow has 16 nodes and runs on a schedule (every month at 09:00). Along the way it connects Google Sheets and Slack. It also calls 192.168.101.63:5678 over HTTP.
How it runs
Trigger: On a schedule (every month at 09:00).
- Load Portfolio Holdings (Google Sheets): uses Google Sheets
- Validate Portfolio Holdings (If): checks a condition and branches into true / false
- Calculate Portfolio Weights (Code): runs custom JavaScript code
- Fetch Historical Market Data (HTTP Request): calls 192.168.101.63:5678 (POST)
- Consolidate Historical Price Data (Code): runs custom JavaScript code
- Calculate Pairwise Correlations (Code): runs custom JavaScript code
- Calculate Diversification Metrics (Code): runs custom JavaScript code
- Build Correlation Chart Configuration (Code): runs custom JavaScript code
- Prepare Diversification Summary Record (Code): runs custom JavaScript code
- Prepare Pairwise Correlation Records (Code): runs custom JavaScript code
…plus 5 more steps. See the full node list below.
Services it uses
HTTP calls to: 192.168.101.63:5678
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow runs monthly to read portfolio holdings from Google Sheets, fetch 90 days of historical prices via an HTTP endpoint, calculate pairwise correlations and a diversification score, store results back to Google Sheets, generate a…