n8n Expert: Complete Gmail-AI Automated Email Response Workflow

Job ID: 40223603

Budget: $30 – $250 USD

Expert Needed: Build Full Gmail-AI Workflow for Email Replies with RAG, Product Cross-Referencing, and Google Sheets Integration

Description:I'm looking for an experienced n8n (automation tool) developer to complete and optimize a workflow for handling business email inquiries. The goal is to automate smart email replies for a company that manufactures motors, alternators, and generators. The workflow should trigger on new Gmail emails, analyze the full thread, use AI (ChatGPT/OpenAI) to generate context-aware replies, retrieve and cross-reference product datasheets from Google Drive, identify missing specs, suggest models, and log/update inquiries in Google Sheets for tracking.The workflow is partially built (Gmail trigger, thread fetching, basic AI reply, draft creation), but needs polishing, error-handling, and additions for RAG (retrieval-augmented generation) and Sheets integration. Current issues include Google Drive folder search returning empty/400 errors despite correct IDs/permissions.Key requirements:Gmail Trigger & Thread Fetching: Trigger on new emails matching filters (e.g., subject keywords, from specific senders). Fetch full email thread (all messages in conversation) using Gmail node, aggregate into a single text string for AI context.
AI Reply Generation (ChatGPT/OpenAI): Use OpenAI node (or similar) with structured prompt to:Extract requirements (power, voltage, RPM, quantity, application, etc.).
Identify missing data (common gaps: frequency, duty cycle, certifications, timeline).
Cross-reference product sheets to suggest 1-2 models with reasoning.
Draft professional reply body (thank, summarize, ask for misses, suggest models, call to action).
Output structured JSON (e.g., {replyBody, extractedRequirements, missingData, suggestedModels}).

Information Retrieval (RAG from Google Drive): List/download all files (Google Docs, Sheets, PDFs) from a specific Drive folder.
Extract text content (handle Docs as plain text).
Aggregate into a knowledge base string for AI prompt (e.g., "File: XYZ Datasheet\nContent: ...").
Bonus: If possible, vectorize for better search (using Supabase/Pinecone if easier than Drive).

Product Cross-Referencing: In AI prompt or separate Code node, match extracted specs to datasheet data (e.g., from Sheets or embedded JSON of models/specs).
Google Sheets Integration: Log new/updated inquiries: Append rows with sender, date, extracted requirements, missing data, suggested models, reply status.
Update existing rows for ongoing threads (e.g., match by thread ID or subject).
Handle technical queries (e.g., pull from Sheets for spec answers).

Output & Draft: Use AI output to create Gmail draft reply (with signature, threaded).
Error-Handling & Optimization: Add If nodes for empty results, timeouts, retries. Make dynamic (e.g., folder ID from env var).
Testing: Test with 2–3 sample emails/threads (I'll provide).

Current n8n version: Cloud 2.6.3. Workflow is 70% done — I'll share export JSON/screenshots.Skills Required:Expert in n8n (nodes: Gmail, Google Drive, OpenAI, Google Sheets, Code, Loop).
Experience with RAG/AI agents in n8n.
Google API troubleshooting (Drive permissions, OAuth scopes).
JavaScript for Code nodes.
Bonus: Vector DB integration (Supabase/Pinecone) if Drive proves tricky.

Budget: $100