Skip to main content

Generate portfolio exposure risk summaries with Sheets, Gemini, Slack, and Gmail

Workflow preview

Workflow preview
100%
Generate portfolio exposure risk summaries with Sheets, Gemini, Slack, and Gmail preview
Open on n8n.io

1. Workflow Overview

Portfolio Exposure Risk Summary Generator n8n + Google Sheets + Gemini + Slack + Gmail This workflow automatically analyzes portfolio data from Google Sheets on a scheduled basis, calculates e...

Best for

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

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.set, n8n-nodes-base.gmail

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate portfolio exposure risk summaries with Sheets, Gemini, Slack, and Gmail
Workflow name
Generate portfolio exposure risk summaries with Sheets, Gemini, Slack, and Gmail

Portfolio Exposure Risk Summary Generator

> n8n + Google Sheets + Gemini + Slack + Gmail


This workflow automatically analyzes portfolio data from Google Sheets on a scheduled basis, calculates exposure metrics such as sector allocation and concentration and generates a professional risk summary using Google Gemini. The report is then sent via email, shared on Slack and logged for historical tracking.

Quick Implementation Steps

What It Does

This workflow performs a complete portfolio risk analysis pipeline. It starts by fetching portfolio data from a Google Sheet and validating whether the required data exists. If valid data is present, it calculates key exposure metrics such as total portfolio value, sector allocation and concentration levels using a Code node.

These calculated metrics are then passed to an AI model (Google Gemini), which generates a concise and professional risk summary. The workflow ensures the output is structured properly before preparing a final report.

The final output is distributed through multiple channels: an email report, a Slack notification and a log entry in Google Sheets. If no portfolio data is available, the workflow gracefully handles the scenario by generating a fallback report and logging it.

Who It's For

  • Financial analysts monitoring portfolio risk
  • Investment advisors managing client portfolios
  • Business owners tracking asset exposure
  • Automation enthusiasts building financial workflows

Requirements to Use This Workflow

How It Works & Setup Guide

Step 1: Schedule Trigger

  • Configure the "Schedule Risk Review" node
  • Default: Weekly run (Monday at 9 AM)

Step 2: Connect Portfolio Data

  • Use "Read Portfolio From Sheet" node

  • Ensure sheet contains columns like:

  • Asset Name

  • Sector

  • Quantity

  • Price

  • Market Value (optional)

Step 3: Validate Data

  • "Check Portfolio Data Exists" ensures valid entries exist
  • If no data → fallback branch executes

Step 4: Calculate Exposure Metrics

  • Code node calculates:

  • Total portfolio value

  • Sector exposure and percentages

  • Top holding concentration

  • Top 3 holdings

Step 5: Generate AI Risk Summary

  • "Generate Risk Summary" uses Gemini model
  • Input includes calculated metrics
  • Output is structured JSON with risk summary

Step 6: Parse AI Output

  • "Parse Risk Summary" ensures valid JSON output
  • Handles fallback parsing if needed

Step 7: Prepare Final Report

  • "Prepare Risk Report Data" formats final fields:

  • Total value

  • Top sector and exposure

  • Top holding and concentration

  • Risk summary

  • Run date and ID

Step 8: Deliver Report

  • Email sent via Gmail node
  • Slack message posted
  • Data logged in Google Sheets

Step 9: Fallback Handling

  • If no portfolio data exists:

  • Default summary is generated

  • Logged to sheet for consistency

How To Customize Nodes

  • Modify schedule timing in Schedule node
  • Update Google Sheet structure as per your data
  • Adjust Code node logic for additional metrics
  • Customize AI prompt for different analysis styles
  • Change email/Slack message formatting

Add‐ons

  • Add risk scoring system (low/medium/high)
  • Integrate historical trend analysis
  • Add client-specific reporting
  • Include asset-level risk breakdown
  • Connect dashboards (e.g., Google Data Studio)

Use Case Examples

  • Weekly portfolio risk monitoring
  • Client portfolio reporting for advisors
  • Internal investment review automation
  • Risk alerts for concentrated holdings
  • Portfolio diversification analysis

Troubleshooting Guide

Issue Possible Cause Solution
No data processed Empty Google Sheet Ensure portfolio data exists
AI output not parsed Invalid JSON response Check prompt format or parsing node
Email not sent Gmail credentials missing Reconnect Gmail account
Slack message not delivered Incorrect channel setup Verify Slack channel ID
Incorrect calculations Missing numeric values Validate sheet data types

Need Help?

If you need assistance setting up this workflow, customizing it for your business or building advanced automation solutions, feel free to reach out to our n8n automation developers at WeblineIndia / Global. Our team specializes in building scalable and production-ready automation workflows tailored to your needs.

We can help you extend this workflow with advanced analytics, dashboards, integrations and enterprise-grade solutions.

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 - Schedule Risk Review

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

Block 2 - Read Portfolio From Sheet

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

Block 3 - Check Portfolio Data Exists

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

Block 4 - Calculate Portfolio Exposure Metrics

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

Block 5 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 6 - Generate Risk Summary

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

Block 7 - Parse Risk Summary

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

Block 8 - Prepare Risk Report Data

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

Block 9 - Send Risk Report Email

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 10 - Log Risk Review Result

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

Block 11 - Send Risk Report to Slack

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

Block 12 - Prepare Empty Portfolio Log

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

Block 13 - Sticky Note1

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

Block 14 - Sticky Note2

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

Block 15 - Sticky Note3

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

Block 16 - Sticky Note4

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

3. Summary Table

Workflow Generate portfolio exposure risk summaries with Sheets, Gemini, Slack, and Gmail
Complexity advanced
Nodes 16
Categories Crypto Trading, AI Summarization
Author WeblineIndia
Published 20 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15850/15850.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 Generate portfolio exposure risk summaries with Sheets, Gemini, Slack, and Gmail do?

Portfolio Exposure Risk Summary Generator n8n + Google Sheets + Gemini + Slack + Gmail This workflow automatically analyzes portfolio data from Google Sheets on a scheduled basis, calculates e...

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.