Send portfolio risk reports with Google Sheets, GPT-4o-mini and Gmail
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Sheets, OpenAI and Gmail.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Choose Portfolio Data Source (If): checks a condition and branches into true / false
- Prepare Uploaded CSV File (Code): runs custom JavaScript code
- Load Portfolio from Google Sheets (Google Sheets): uses Google Sheets
- Read Portfolio CSV Data (Spreadsheet File): reads or writes a spreadsheet file (legacy node)
- Combine Portfolio Holdings (Aggregate): combines items into one
- Set User & Source Details (Edit Fields (Set)): sets or maps fields
- Analyze Portfolio Risk (Code): runs custom JavaScript code
- Check Portfolio Data (If): checks a condition and branches into true / false
- Generate AI Risk Insights (OpenAI): uses OpenAI
- Check User Email for Error Alert (If): checks a condition and branches into true / false
…plus 5 more steps. See the full node list below.
Services it uses
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.
- Still check Spreadsheet File (Read Portfolio CSV Data): Convert to File / Extract from File.
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Spreadsheet File
n8n-nodes-base.spreadsheetFile - Google Sheets
n8n-nodes-base.googleSheets - Aggregate
n8n-nodes-base.aggregate - Edit Fields (Set)
n8n-nodes-base.set - OpenAI
@n8n/n8n-nodes-langchain.openAi - Gmail
n8n-nodes-base.gmail - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick Overview This workflow receives a portfolio via webhook (uploaded CSV or Google Sheets), calculates allocation and concentration risk metrics, generates an OpenAI HTML risk report, emails it through Gmail, and returns a JSON API response with the report…