Query Google Drive Documents via WhatsApp with AI Agent
Workflow Description
An intelligent automation that enables WhatsApp users to ask questions about files stored in Google Drive. The system analyzes documents using an AI agent powered by OpenAI, stores data in a vector database, and returns answers directly through WhatsApp messages, maintaining conversation history.
How it works
- 1.Receive user query via webhook and route it to the AI agent
- 2.Load and process Google Drive documents, split text, and generate embeddings
- 3.Search the vector database to find relevant document sections
- 4.Generate accurate answer using OpenAI language model
- 5.Send response back to WhatsApp user with conversation context
Use cases
- Enable employees to ask questions about company policies stored in Drive
- Instantly retrieve project information and contract details via WhatsApp
- Extract data from reports and technical documents conversationally
Requirements
- Google Drive account with documents to be indexed and searched
- WhatsApp Business API account properly configured and active
- Valid OpenAI API key with sufficient usage credits
- Active webhook endpoint and stable internet connection
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (24)
Respond to Webhook
Webhook
AI Agent
Agent
Sticky Note
Sticky Note
OpenAI Chat Model
OpenAI
When clicking ‘Test workflow’
Manual Trigger
Qdrant Vector Store
Vector Store Qdrant
Create collection
HTTP Request
Refresh collection
HTTP Request
Get folder
Google Drive
Download Files
Google Drive
Embeddings OpenAI
OpenAI
Default Data Loader
Document Default Data Loader
Token Splitter
Text Splitter Token Splitter
Sticky Note2
Sticky Note
Sticky Note1
Sticky Note
Verify
Webhook
Respond
Webhook
is Message?
If
Only message
Whats App
Send
Whats App
Window Buffer Memory
Memory Buffer Window
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note