workflows.fit
Back to n8n workflows
n8n templateFreeBy Pinecone

RAG-powered document chat with Google Drive, OpenAI, and Pinecone Assistant

Try it out This n8n workflow template lets you chat with your Google Drive documents (.docx, .json, .md, .txt, .pdf) using OpenAI and Pinecone Assistant. It retrieves relevant context from your files in real time so y...

Data & StorageAILangchainCore NodesAgentLm Chat Open AiSticky NoteGoogle Drive Trigger
Loading interactive preview...

Template notes

Try it out

This n8n workflow template lets you chat with your Google Drive documents (.docx, .json, .md, .txt, .pdf) using OpenAI and Pinecone Assistant. It retrieves relevant context from your files in real time so you can get accurate, context-aware answers about your proprietary data—without the need to train your own LLM.

What is Pinecone Assistant?

[Pinecone Assistant](https://docs.pinecone.io/guides/assistant/overview) allows you to build production-grade chat and agent-based applications quickly. It abstracts the complexities of implementing retrieval-augmented (RAG) systems by managing the chunking, embedding, storage, query planning, vector search, model orchestration, reranking for you.

Prerequisites

A [Pinecone account](https://app.pinecone.io/) A GCP project with [Google Drive API enabled and configured](https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/) An [Open AI account](https://auth.openai.com/create-account) and [API key](https://platform.openai.com/settings/organization/api-keys)

Setup

1. Create a Pinecone Assistant named n8n-assistant in the Pinecone Console [here](https://app.pinecone.io/organizations/-/projects/-/assistant) 2. Setup your Google Drive OAuth2 API credential in n8n 1. In the File added node -> Credential to connect with, select Create new credential 2. Set the Client ID and Client Secret from the values generated in the prerequisites 3. Set the OAuth Redirect URL from the n8n credential in the Google Cloud Console ([instructions](https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/create-your-google-oauth-client-credentials)) 4. Name this credential Google Drive account so that other nodes reference it 3. Use the Connect to Pinecone button to authenticate to Pinecone or if you self-host n8n, create a Pinecone credential and add your [Pinecone API key](https://app.pinecone.io/organizations/-/projects/-/keys) directly 4. Select your Assistant Name in each of the Pinecone Assistant nodes 5. Setup the Open AI credential in n8n 1. In the OpenAI Chat Model node -> Credential to connect with, select Create new credential 2. Set the API Key field to your OpenAI API key 6. Add your files to a Drive folder named n8n-pinecone-demo in the root of your My Drive 1. If you use a different folder name, you'll need to update the Google Drive triggers to reflect that change 7. Activate the workflow or test it with a manual execution to ingest the documents 8. Chat with your docs!