Answer questions about documentation with BigQuery RAG and OpenAI
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects OpenAI Chat Model. It also calls api.openai.com and bigquery.googleapis.com over HTTP.
How it runs
Trigger: When a chat message arrives (plus 1 other trigger).
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (BigQuery RAG OpenAI); memory: Simple Memory
- Set field - question (Edit Fields (Set)): sets 1 field: question
- OpenAI - Create Embedding (HTTP Request): calls api.openai.com (POST)
- Set Field - Embedding (Edit Fields (Set)): sets 1 field: embedding
- BigQuery - Vector Retriever - n8n docs (HTTP Request): calls bigquery.googleapis.com (POST)
- Documents retrieved (Edit Fields (Set)): sets 1 field: documents
Services it uses
HTTP calls to: api.openai.com, bigquery.googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (8)
- AI Agent
@n8n/n8n-nodes-langchain.agent - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Call n8n Workflow Tool
@n8n/n8n-nodes-langchain.toolWorkflow - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest
From the author
BigQuery RAG with OpenAI Embeddings This workflow demonstrates how to use Retrieval-Augmented Generation (RAG) with BigQuery and OpenAI. By default, you cannot directly use OpenAI Cloud Models within BigQuery. Try it This template comes with access to a…