Use this powerful n8n workflow to automate RAG-based financial analysis. Load earnings report PDFs into a Pinecone vector database and leverage a Gemini AI Agent to generate detailed reports in Google Docs.
Download this n8n workflow template and start using it instantly.
Financial Analysts needing automated, rapid summarization and comparison of quarterly earnings reports.
Data Scientists and ML Engineers building complex RAG pipelines in a low-code environment like n8n.
Businesses requiring contextualized information extraction from large sets of proprietary PDF documents.
Users leveraging n8n templates for advanced LangChain integration.
For financial analysts, researchers, and automation specialists, manually processing multiple quarterly earnings reports (often hundreds of pages long) is tedious and time-consuming. This specialized n8n workflow solves this by creating a robust Retrieval-Augmented Generation (RAG) system.
This n8n automation first orchestrates the ingestion of Google Drive-hosted PDF reports, splitting them, embedding them using Google Gemini, and storing the vectors in Pinecone. Once indexed, an advanced AI Agent, configured as a specialized financial analyst, uses the RAG knowledge base to answer complex queries about trends, outliers, and comparisons across quarters, delivering the final, professionally formatted report directly into Google Docs. This structure ensures accurate, contextualized analysis powered by a sophisticated n8n node configuration.
This n8n workflow operates in two main phases: Data Ingestion and Report Generation.
List Of Files To Load (Google Sheets) n8n node.Loop Over Items n8n node iterates over each document listed in the sheet.Download File From Google Drive n8n node fetches the specified PDF binary file.Default Data Loader processes the PDF binary.Recursive Character Text Splitter breaks the document into smaller, embeddable chunks.Embeddings Google Gemini n8n node converts these text chunks into vectors.Pinecone Vector Store (in insert mode) uploads these vectors to the dedicated 'company-earnings' index, making the data searchable.When clicking ‘Test workflow’ n8n trigger.AI Agent n8n node is activated with the query: 'Give me a report on Google's last 3 quarter earnings...' The agent acts as a financial analyst, utilizing its pre-configured tools.Vector Store Tool (RAG setup), which performs a similarity search against the Pinecone index using the Embeddings Google Gemini (retrieval) model and synthesizes the context via the Google Gemini Chat Model1.Save Report to Google Docs n8n node, which inserts the markdown-formatted financial report into the designated Google Document.company-earnings before running the ingestion phase of the n8n workflow.Google Sheets OAuth2, Google Drive OAuth2, Google Docs OAuth2, Google Gemini(PaLM) Api, and Pinecone API.List Of Files To Load (Google Sheets) n8n node to point to your specific spreadsheet containing the PDF file URLs.Save Report to Google Docs n8n node with the URL or ID of the Google Doc where you want the final analysis report to be saved. When clicking ‘Test workflow’ (n8n trigger):
Function: Manually starts the report generation process.
Key Configuration: Standard manual n8n trigger used for testing and immediate execution.
List Of Files To Load (Google Sheets) (n8n node):
Function: Serves as the initial data source, pulling metadata (specifically File URLs) for the earnings reports from a designated Google Sheet.
Key Configuration: Links to a specific Google Sheet Document ID and Sheet Name (e.g., 'GOOG').
Download File From Google Drive (n8n node):
Function: Downloads the actual binary PDF files using the URL dynamically retrieved from the Google Sheets n8n node output.
Key Configuration: Operation set to 'download'; File ID derived dynamically using an expression linking back to the Google Sheets data.
Pinecone Vector Store (n8n node):
Function: The primary vector database interaction point. Used in two distinct chains: one for inserting new vectors (ingestion) and one for retrieval (RAG query).
Key Configuration: Index name: company-earnings.
AI Agent (n8n node):
Function: The core decision-making and generation component of this n8n workflow. It uses a sophisticated system prompt defining its role as a financial analyst and orchestrates the use of internal tools (the RAG retrieval chain).
Key Configuration: Custom prompt defining the comprehensive financial analysis task; linked to the Vector Store Tool and uses an OpenAI Chat Model for generation.
Vector Store Tool (n8n node):
Function: Provides the AI Agent with access to the RAG knowledge base (Pinecone) via a specialized retrieval chain, ensuring all answers are grounded in the provided earnings reports.
Key Configuration: Description: 'Retrieve information about the last 3 quarters of Google Earnings'.
Save Report to Google Docs (n8n node):
Function: The final action in this n8n workflow, taking the structured output from the AI Agent and writing it into a pre-existing Google Doc.
* Key Configuration: Operation 'update'; content set to the agent's markdown output ({{ $json.output }}).
Implement a robust n8n workflow for advanced RAG chatbots. This n8n template uses OpenAI, Qdrant vector storage, LangChain n8n nodes, and webhooks to handle complex Q&A, calendar booking, and external API tracking.

Use this powerful n8n workflow to build a sophisticated Retrieval-Augmented Generation (RAG) system. Automatically ingest PDFs and CSVs from Google Drive, generate context-aware embeddings using OpenAI, store data in a Supabase vector database, and deploy an AI chatbot agent.

Instantly generate custom sales proposals using an n8n workflow triggered by a form submission. This n8n automation integrates OpenAI content generation with Google Slides text replacement for rapid document delivery.

Automate financial tracking by sending receipts, invoices, or voice notes via Telegram. This powerful n8n workflow uses AI categorization, OCR, and Google Sheets for real-time expense and income logging.

Full-stack developer with 5+ years streamlining healthcare processes. Proficient in NodeJS, VueJS, MongoDB, PostgreSQL, Kubernetes, and n8n. Ready to optimize your workflows – book a consult via my link.







































