At a glance
- Trigger
- Manual Trigger (When clicking ‘Test workflow’)
- Nodes
- 15
- Apps
- Pinecone, Google Gemini, OpenAI, Google Docs, Google Sheets and Google Drive
- AI nodes
- 10
- Credentials
- 6 types
- Category
- RAG, documents and vector search
Apps and integrations
Node types used
How it works
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
AI Agent Report Generation using RAG
Loading data to Pinecone vector store
Setup notes
The text below comes from the sticky notes inside the workflow. We removed links, code samples and anything that looks like a key or token.
Set up steps
- Google Cloud Project & Vertex AI API
- Create a Google Cloud project.
- Enable the Vertex AI API for your project.
- Google AI API key
- Obtain a Google AI API key from Google AI Studio.
- Pinecone account and API key
- Create a free account on the Pinecone website.
- Obtain your API key from your Pinecone dashboard.
- Create an index named company-earnings in your Pinecone project.
- Google Drive - download and save financial documents
- Go to a company you want to analize and download their quarterly earnings PDFs
- Save the PDFs in Google Drive
- Create a Google Sheet that stores a list of file URLs pointing to the PDFs you downloaded and saved to Google Drive
- Configure credentials in your n8n environment for
- Google Sheets OAuth2
- Google Drive OAuth2
- Google Docs OAuth2
- Google Gemini(PaLM) Api (using your Google AI API key)
- Pinecone API (using your Pinecone API key)
- Import and configure the workflow
- Import this workflow into your n8n instance.
- Update the List Of Files To Load (Google Sheets) node to point to your Google Sheet.
- Update the Download File From Google Drive to point to the column where the file URLs are
- Update the Save Report to Google Docs node to point to your Google Doc where you want the report saved.
Nodes in this workflow
The 15 nodes in file order (sticky notes excluded). Branches and connections determine execution order in n8n:
- Pinecone Vector Store (Pinecone Vector Store)
- Embeddings Google Gemini (Google Gemini Embeddings)
- Default Data Loader (Default Data Loader)
- Recursive Character Text Splitter (Recursive Character Text Splitter)
- Loop Over Items (Loop Over Items)
- When clicking ‘Test workflow’ (Manual Trigger)
- AI Agent (AI Agent)
- Vector Store Tool (Vector Store Question Answer Tool)
- Google Gemini Chat Model1 (Google Gemini Chat Model)
- OpenAI Chat Model (OpenAI Chat Model)
- Pinecone Vector Store (Retrieval) (Pinecone Vector Store)
- Save Report to Google Docs (Google Docs)
- Embeddings Google Gemini (retrieval) (Google Gemini Embeddings)
- List Of Files To Load (Google Sheets) (Google Sheets)
- Download File From Google Drive (Google Drive)
Credentials you need
- Google Docs OAuth2 – used by Save Report to Google Docs
- Google Drive OAuth2 – used by Download File From Google Drive
- Google Gemini (PaLM) API – used by Embeddings Google Gemini, Embeddings Google Gemini (retrieval) and Google Gemini Chat Model1
- Google Sheets OAuth2 – used by List Of Files To Load (Google Sheets)
- OpenAI API – used by OpenAI Chat Model
- Pinecone API – used by Pinecone Vector Store and Pinecone Vector Store (Retrieval)
Configure your own credentials after importing. Create each credential in n8n, then select it in the node.
How to import into n8n
- Download the JSON file with the button above.
- In n8n, open a new workflow, select the ... menu and choose Import from File. You can also paste the JSON straight into the editor canvas.
- Open each node that shows a warning and select or create its credential.
- Read the notes on the canvas, test the workflow with sample data, then activate it.
Do you need somewhere to run it? Read our guide to self-hosted n8n.