Skip to main content

Track weekly portfolio risk using GPT-4.1, Slack alerts, and Google Sheets

Workflow preview

Workflow preview
100%
Track weekly portfolio risk using GPT-4.1, Slack alerts, and Google Sheets preview
Open on n8n.io

1. Workflow Overview

Description This workflow reads your portfolio from Google Sheets, fetches market data, evaluates key risk factors such as sector concentration, volatility, and stock correlation, and generates ...

Best for

  • Crypto Trading automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.code, n8n-nodes-base.googlesheets, n8n-nodes-base.set, n8n-nodes-base.splitinbatches, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.slack, n8n-nodes-base.wait

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Rahul Joshi.

Original n8n.io source

1.1 Workflow description

Title
Track weekly portfolio risk using GPT-4.1, Slack alerts, and Google Sheets
Workflow name
Track weekly portfolio risk using GPT-4.1, Slack alerts, and Google Sheets

📊 Description This workflow reads your portfolio from Google Sheets, fetches market data, evaluates key risk factors such as sector concentration, volatility, and stock correlation, and generates an easy-to-understand risk summary using AI. When meaningful risk is detected, the workflow sends a structured alert to Slack and stores a weekly risk snapshot in Google Sheets for tracking trends over time. This automation is designed to help investors, analysts, and teams understand portfolio risk clearly without manual analysis or constant monitoring.

🔁 What This Workflow Does

1️⃣ Runs automatically on a weekly schedule using a Schedule Trigger 2️⃣ Reads portfolio holdings from Google Sheets 3️⃣ Validates portfolio data to ensure required fields are present 4️⃣ Processes stocks in batches to avoid API rate limits 5️⃣ Fetches historical price data from Alpha Vantage 6️⃣ Normalizes market data into a consistent structure 7️⃣ Calculates portfolio-level risk metrics. 8️⃣ Generates a single portfolio risk score and risk flag 9️⃣ Uses AI to explain detected risks in simple language 🔟 Sends a clear weekly risk alert to Slack 1️⃣1️⃣ Stores a summarized weekly risk snapshot in Google Sheets 1️⃣2️⃣ Handles invalid data safely to avoid noisy or misleading alerts

⭐ Key Benefits

✅ Understand portfolio risk at a glance ✅ Detect sector overexposure and diversification issues early ✅ Receive only meaningful, high-signal alerts ✅ Simple AI explanations instead of raw numbers ✅ Automatic weekly risk history stored in Google Sheets ✅ No financial advice, only analytical insights ✅ Designed for reuse and easy customization

🧩 Features

  • Weekly automated portfolio risk analysis
  • Google Sheets–based portfolio input
  • Alpha Vantage market data integration
  • Batch processing with rate-limit protection
  • Sector, volatility, and correlation risk analysis
  • Portfolio risk scoring system
  • AI-generated risk explanations
  • Slack alerts for detected risk
  • Google Sheets storage for historical tracking

🔐 Requirements

  • Google Sheets credentials
  • Alpha Vantage API key
  • Slack credentials (OAuth or webhook)
  • AI provider API key

🎯 Target Audience

  • Long-term and active investors
  • Portfolio and risk analysts
  • Finance and operations teams
  • Fintech and investment platforms
  • Automation engineers building financial workflows

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Validate Portfolio Input

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 2 - Read Portfolio Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 3 - Risk Thresholds and Settings

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Batch Portfolio Symbols

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - Fetch Market Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 6 - Normalize Alpha Vantage Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Portfolio Risk Engine

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 9 - Build Alert Payload

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Send Notification

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 11 - Rate Limit Buffer (Alpha Vantage)

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 12 - Portfolio Risk Summary

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 13 - Risk Check

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Store Weekly Risk Snapshot

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 20 - Weekly Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

3. Summary Table

Workflow Track weekly portfolio risk using GPT-4.1, Slack alerts, and Google Sheets
Complexity advanced
Nodes 20
Categories Crypto Trading, AI Summarization
Author Rahul Joshi
Published 23 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12947/12947.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Track weekly portfolio risk using GPT-4.1, Slack alerts, and Google Sheets do?

Description This workflow reads your portfolio from Google Sheets, fetches market data, evaluates key risk factors such as sector concentration, volatility, and stock correlation, and generates ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Crypto Trading, AI Summarization use case.