Company RAG and data queries

Stock earnings PDF RAG indexing and Google Docs report workflow

Short answer

This n8n workflow reads a list of quarterly filing links from Google Sheets and fetches each PDF from Google Drive in batches. Filings are embedded with Google Gemini into a Pinecone index. An AI financial analyst agent then queries multi-quarter filings and saves a structured markdown report to Google Docs.

Catalogue ID
#1279
Functional nodes
15
Connections
14
Trigger
manualTrigger
AI layer
AI-assisted
Business problem solved

Business problem solved

Analysts reviewing multiple quarters of dense PDF financial filings spend hours cross-checking figures and writing summaries by hand. Moving comparisons into shared documents manually risks missed outliers.

Trigger

A manual trigger starts the batch ingestion of listed PDF filings and generates the analysis report.

Connected systems

Connected systems

  • Google Sheets
  • Google Drive
  • Google Docs
  • Pinecone vector store
  • Google Gemini and OpenAI
  • Self-hosted n8n

Every workflow is deployed on your own server with documentation, a run log and an error queue.

Workflow architecture

Workflow architecture

  1. 1. Pinecone Vector Store (AI layer) (connects to Loop Over Items)
  2. 2. Embeddings Google Gemini (AI layer) (connects to Pinecone Vector Store)
  3. 3. Default Data Loader (AI layer) (connects to Pinecone Vector Store)
  4. 4. Recursive Character Text… (AI layer) (connects to Default Data Loader)
  5. 5. Loop Over Items (Logic and routing) (connects to Download File From Google…)
  6. 6. When clicking Test workflow (Trigger) (connects to AI Agent)
  7. 7. AI Agent (AI layer) (connects to Save Report to Google Docs)
  8. 8. Vector Store Tool (AI layer) (connects to AI Agent)
  9. 9. Google Gemini Chat Model1 (AI layer) (connects to Vector Store Tool)
  10. 10. OpenAI Chat Model (AI layer) (connects to AI Agent)
  11. 11. Pinecone Vector Store… (AI layer) (connects to Vector Store Tool)
  12. 12. Save Report to Google Docs (Service and data)
  13. 13. Embeddings Google Gemini… (AI layer) (connects to Pinecone Vector Store…)
  14. 14. List Of Files To Load… (Service and data) (connects to Loop Over Items)
  15. 15. Download File From Google… (Service and data) (connects to Pinecone Vector Store)
  • Trigger
  • AI layer
  • Logic and routing
  • Service and data

Node positions and directed links are generated from the verified catalogue record.

Workflow steps

Workflow steps

  1. 01

    Sheet list intake and Drive fetch

    Google Sheets supplies filing URLs and batch loops fetch each PDF report from Google Drive.

  2. 02

    PDF loading and Pinecone indexing

    The PDF loader and recursive splitter chunk filings before the Gemini embedding model indexes them into Pinecone.

  3. 03

    Multi-quarter agent analysis

    The AI agent queries the Pinecone earnings tool to compare quarter-over-quarter trends and flag outliers.

  4. 04

    Google Docs report output

    Generated markdown analysis is inserted directly into the target Google Docs report document.

Error queue and human approval

Error queue and human approval

Built-in state in the catalogue workflow

The verified catalogue workflow contains zero node-level error flags across its 15 functional nodes and 14 connections.

Production layer added by ALTAI

During live deployment, ALTAI adds scheduled filing checks, an ingestion completion gate before report generation, source page citations and an error queue.

Frequently asked

Stock earnings report RAG workflow Frequently asked questions

It allows analysts to batch-load a defined set of quarterly PDFs on demand; live setups add scheduled or new-row triggers.

Production deployments attach filing metadata and page references to every retrieved chunk so analysts trace each metric.

Yes. The output node adapts directly to email drafts, Slack summaries or internal reporting databases during deployment.

Mert Can Gundogdu
The founder takes the call, not a sales team
Next step

We write the proposal after we have found the problem together

In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.

30 minutes · no preparation needed

The call and the week of discovery are both free.Read the terms

Chat on WhatsApp