Templates / Send portfolio risk reports from Google Sheets with OpenAI and Gmail

Send portfolio risk reports from Google Sheets with OpenAI and Gmail

Needs changes

by Incrementors ✓ · 5 views · created 2026-06-25 · Crypto Trading, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 9 nodes and runs when someone submits an n8n form (“Portfolio Risk Analyzer”). Along the way it connects Google Sheets, OpenAI Chat Model and Gmail.

How it runs

Trigger: When someone submits an n8n form (“Portfolio Risk Analyzer”).

  1. 2. Sheets — Load Portfolio Holdings (Google Sheets): get many
  2. 3. Aggregate — Bundle All Holdings (Aggregate): combines items into one
  3. 4. Code — Calculate Portfolio Risk Metrics (Code): runs custom JavaScript code
  4. 5. AI Agent — Generate Risk Report (AI Agent): runs an AI agent, with model: OpenAI Chat Model
  5. 6. Code — Build HTML Risk Report Email (Code): runs custom JavaScript code
  6. 7. Gmail — Send Risk Report (Gmail): uses Gmail
  7. 8. Sheets — Log Analysis for Audit (Google Sheets): append

Services it uses

Google SheetsOpenAI Chat ModelGmail

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in 5. AI Agent — Generate Risk Report (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Removed in 3.0Replace with
AI Agent v1 (old agent modes)
5. AI Agent — Generate Risk Report (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (7)

From the author

Quick overview This workflow collects a portfolio request via an n8n Form, loads holdings from Google Sheets, calculates portfolio risk and concentration metrics, generates an HTML risk narrative with OpenAI, then emails the full report via Gmail and appends…

Excerpt from Incrementors's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.