Skip to main content

Generate client portfolio summaries using Google Sheets, NewsAPI, Gemini and Gmail

Workflow preview

Workflow preview
100%
Generate client portfolio summaries using Google Sheets, NewsAPI, Gemini and Gmail preview
Open on n8n.io

1. Workflow Overview

Client Portfolio Summary Generator Google Sheets, NewsAPI, Gemini AI & Gmail This workflow automatically analyzes your stock portfolio whenever a new row is added to Google Sheets. It fetches ...

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.splitinbatches, n8n-nodes-base.merge, @n8n/n8n-nodes-langchain.googlegemini, n8n-nodes-base.gmail, n8n-nodes-base.stickynote, n8n-nodes-base.wait, n8n-nodes-base.set

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 client portfolio summaries using Google Sheets, NewsAPI, Gemini and Gmail
Workflow name
Generate client portfolio summaries using Google Sheets, NewsAPI, Gemini and Gmail

Client Portfolio Summary Generator

> Google Sheets, NewsAPI, Gemini AI & Gmail

This workflow automatically analyzes your stock portfolio whenever a new row is added to Google Sheets. It fetches live stock prices, calculates gains/losses, gathers relevant news, generates a simple AI-powered summary and emails the report to you.

Quick Implementation Steps

  1. Login to your n8n account
  2. Connect your Google Sheets Trigger to your portfolio sheet.
  3. Add your NewsAPI key in the “Fetch Stock News” node.
  4. Configure Google Gemini API credentials.
  5. Connect your Gmail account for email delivery.
  6. Add stock entries (Name, Quantity, Purchase Price) in Google Sheets.
  7. Sit back >> your portfolio summary will be emailed automatically.

What It Does

This workflow automates end-to-end portfolio monitoring and reporting. Whenever a new stock entry is added to your Google Sheet, it triggers a sequence of actions that fetch real-time stock prices and calculates the current value and profit/loss for each holding.

In addition to numerical analysis, the workflow enriches your portfolio insights by pulling the latest news articles related to each stock. This provides valuable context behind market movements, helping users better understand performance drivers.

Finally, the workflow uses Google Gemini AI to generate a simple, human-friendly summary of the portfolio. The summary highlights overall performance, best/worst performers and key insights, which is then automatically delivered via email.

Who It's For

  • Individual investors tracking their stock portfolio
  • Financial advisors managing client portfolios
  • Analysts needing automated reporting
  • Automation enthusiasts building finance workflows
  • Anyone who wants simplified portfolio insights without manual effort

Requirements

To use this workflow, ensure you have:

  • n8n account (cloud or self-hosted)
  • Google Sheets account (with portfolio data)
  • Google Sheets Trigger OAuth credentials
  • NewsAPI key (https://newsapi.org)
  • Google Gemini (PaLM) API credentials
  • Gmail account with OAuth2 setup
  • Stock data in Google Sheets with columns:
  • Name
  • Quantity
  • Purchase Price
  • Purchase Date

How It Works & Setup Guide

1. Google Sheets Trigger

  • Node: Google Sheet New Row Add Trigger
  • Configure:
  • Select your spreadsheet
  • Select the sheet (e.g., "stock portfolio")
  • Trigger event: rowAdded

2. Data Cleaning

  • Node: Cleans & standardizes
  • Maps fields:
  • Name
  • Quantity
  • Purchase Price
  • Purchase Date

3. Fetch Live Stock Prices

4. Calculate Portfolio Metrics

  • Node: Calculate Portfolio Metrics
  • Computes:
  • Current Value = Quantity × Current Price
  • Gain/Loss = Current Value - (Quantity × Purchase Price)

5. Fetch Stock News

  • Flow: Iterate stocks → Wait 5 seconds → Fetch news
  • Node: Fetch Stock News
  • Requires: Add your NewsAPI key in query parameters

6. Combine News Articles

  • Node: Combining All News Articles
  • Limits to top 4 articles per stock

7. Merge Data

  • Node: Combine Portfolio + News
  • Combines:
  • Financial metrics
  • News data

8. Format Final Output

  • Node: Final Data Formatter
  • Structures merged data into a clean JSON format

9. Generate AI Summary

  • Node: Generate Portfolio Summary
  • Uses: Google Gemini model: gemini-3.1-flash-lite-preview
  • Output: Simple 4–6 sentence summary

10. Send Email Report

  • Node: Send Email Report
  • Configure:
  • Recipient email
  • Subject: "Portfolio Analysis"
  • Message: AI-generated summary

How To Customize Nodes

Google Sheets Node

  • Change sheet or add more columns (e.g., sector, notes)

Stock Price API

  • Replace with another API if needed (e.g., Alpha Vantage)

News Node

  • Adjust query (e.g., include company name + “stock”)
  • Change article limit

AI Summary Node

  • Modify prompt for:
  • More detailed analysis
  • Different tone (formal, technical, etc.)

Email Node

  • Add HTML formatting
  • Include full report instead of summary

Add-ons (Enhancements)

  • Add portfolio visualization (charts via external tools)
  • Store historical performance in a database
  • Send alerts via Slack/WhatsApp/Telegram
  • Trigger alerts for high gain/loss thresholds
  • Add sentiment analysis from news articles
  • Generate PDF reports instead of plain emails

Use Case Examples

  1. Personal Portfolio Tracking

Automatically monitor your investments and receive updates without manual calculations.

  1. Client Reporting for Advisors

Send periodic portfolio summaries to clients with insights and news.

  1. Daily Market Monitoring

Add entries regularly and get AI-generated updates with context.

  1. Investment Research Automation

Combine price data and news to assist decision-making.

  1. Automated Financial Dashboards

Use this workflow as a backend for dashboards or reporting systems.

There can be many more use cases depending on how you extend and customize this workflow.

Troubleshooting Guide

Issue Possible Cause Solution
No trigger execution Incorrect Google Sheets setup Verify sheet ID and trigger settings
Stock prices not fetched API issue or wrong symbol Check API response and symbol format
News not loading Missing API key Add valid NewsAPI key
Empty AI summary Incorrect input formatting Check "Final Data Formatter" output
Email not sent Gmail credentials issue Reconnect Gmail OAuth
Rate limit errors Too many API calls Increase wait time node delay
Incorrect calculations Data type mismatch Ensure numeric fields are properly parsed

Need Help?

If you need assistance with:

  • Setting up this workflow
  • Customizing nodes for your business needs
  • Adding advanced features or integrations
  • Building similar automation workflows

Feel free to reach out to WeblineIndia. Our n8n experts can help you design, implement and scale automation solutions tailored to your requirements.

Let us help you turn your workflows into powerful business tools.

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 - Calculate Portfolio Metrics

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

Block 2 - Iterate Stocks for News

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

Block 3 - Combining All News Articles

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

Block 4 - Combine Portfolio + News

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 5 - Final Data Formatter

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

Block 6 - Generate Portfolio Summary

Type / Role
@n8n/n8n-nodes-langchain.googleGemini - googleGemini
Config choices
Version 1.1

Block 7 - Send Email Report

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

Block 8 - Sticky Note

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

Block 9 - Sticky Note1

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

Block 10 - Wait For 5 Seconds (Cooling Period)

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

Block 11 - Sticky Note3

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

Block 12 - Sticky Note4

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

Block 13 - Cleans & standardizes

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

Block 14 - Google Sheet New Row Add Trigger

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

Block 15 - Sticky Note2

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

Block 16 - Fetch Live Stock Prices

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

Block 17 - Fetch Stock News

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

3. Summary Table

Workflow Generate client portfolio summaries using Google Sheets, NewsAPI, Gemini and Gmail
Complexity advanced
Nodes 17
Categories Crypto Trading, AI Summarization
Author WeblineIndia
Published 27 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15338/15338.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 client portfolio summaries using Google Sheets, NewsAPI, Gemini and Gmail do?

Client Portfolio Summary Generator Google Sheets, NewsAPI, Gemini AI & Gmail This workflow automatically analyzes your stock portfolio whenever a new row is added to Google Sheets. It fetches ...

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.