Skip to content
FlowHubFluxonLab
A
AI Automationfree

Send portfolio risk reports from Google Sheets with OpenAI and Gmail

by Incrementorsadapted from n8n official workflow galleryUpdated Aug 2026
RequiresAAI AgentCCodeGmailGmailGoogle SheetsGoogle SheetsOpenAI Chat ModelOpenAI Chat Model
Share Post Share
Fo1. Form — Portfolio Request1. Form — Portf…2. Sheets — Load Portfolio Holdings2. Sheets — Loa…Ag3. Aggregate — Bundle All Holdings3. Aggregate — …Co4. Code — Calculate Portfolio Risk Metrics4. Code — Calcu…Ag5. AI Agent — Generate Risk Report5. AI Agent — G…OpenAI Chat ModelOpenAI Chat Mod…Co6. Code — Build HTML Risk Report Email6. Code — Build…7. Gmail — Send Risk Report7. Gmail — Send…8. Sheets — Log Analysis for Audit8. Sheets — Log…12345678
1/5
STEPS · 8
Starts on an incoming request

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 an audit record back to Google Sheets. How it works Receives a portfolio analysis request from an n8n Form containing the investor details, base currency, and a Google Sheet ID. Reads all holdings from the provided Google Sheets document (Portfolio tab) and bundles the rows into a single portfolio dataset. Calculates market value, allocations, sector and asset-class breakdowns, P&L, concentration flags, and a 0–100 risk score. Sends the computed portfolio summary, breakdowns, risk flags, and holdings to OpenAI to generate a structured risk report in HTML. Builds a branded HTML email that includes the AI narrative plus sector and top-holdings tables and a concentration alert banner. Sends the HTML risk report to the investor via Gmail and appends a summary row to a Google Sheets “Analysis Log” audit sheet.

Tags

n8nreference-onlyagentgmailgoogle-sheetslm-chat-open-ai
Connects
AAI AgentCCodegmailGmailsheetsGoogle SheetsopenaichatmodelOpenAI Chat Model
CategoryAI Automation
Triggermanual
Complexitycomplex
Nodes9
AddedJun 25, 2026

Related workflows

See all AI Automation
ACDgmail
free

AI: Summarize podcast episode and enhance using Wikipedia

The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team
ACgmail
free

Send and track Slack invoice requests with Gemini, Google Sheets and Gmail

Quick overview Youtube Video: https://youtu.be/42-oHh9w9Eo This workflow listens for Slack @mentions, uses Google Gemini to classify the request and extract invoice details, then reads and updates Google Sheets, generates invoice PDFs with PdfBro, sends invoices or reminders via Gmail, and posts confirmations or errors back to Slack. How it works Triggers when the workflow’s Slack app is mentioned in a specified Slack channel. Uses Google Gemini to classify the message intent (send invoice, remind invoice, or check status) and extract the recipient email and invoice due date. Routes the request based on the extracted intent and stops if the intent cannot be determined. For SEND_INVOICE, looks up the client in a Google Sheets “Client Bill” spreadsheet and posts a Slack error if no matching email is found. If a client is found, generates an invoice PDF with PdfBro, emails it to the client via Gmail, appends/updates the invoice record in a Google Sheets “Client Invoices” spreadsheet, and posts a Slack confirmation. For REMIND_INVOICE, finds an UNPAID invoice for the email in the “Client Invoices” Google Sheet, regenerates the invoice PDF with PdfBro, emails a reminder via Gmail, and p

by iamvaar
Agmailopenaichatmodeltextclassifier
free

Suggest meeting slots using AI

The purpose of this n8n workflow is to automate the process of identifying incoming Gmail emails that are requesting an appointment, evaluating their content, checking calendar availability, and then composing and sending a response email. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team