Gmail smart auto-responder with GPT-4o and Google Drive context memory
Advanced Gmail AI Auto-Responder with Context Intelligence The next-generation email automation that knows your communication style, remembers conversations, and responds with human-like intelligence.
π What Makes This Advanced? Unlike basic AI email responders, this workflow creates contextually intelligent responses by:
π Reading your communication profile from Google Drive π§ Remembering full conversation history with vector embeddings π― Understanding context from previous emails in the thread π€ Using AI agents instead of simple prompt-response patterns πΎ Building memory of your communication style and preferences
The Result: Responses that sound authentically like you, with perfect context awareness.
β±οΈ Time & Impact
Setup Time: 45 minutes Time Saved: 2-3 hours daily Skill Level: Intermediate-Advanced Monthly Cost: $20-30 (OpenAI API + storage) Intelligence Level: Human-like contextual awareness
π οΈ Prerequisites & Setup Required Accounts:
n8n Cloud/Self-hosted (AI features required) Gmail Account with API access Google Drive with profile document OpenAI Account (GPT-4o recommended)
Required Credentials in n8n:
Gmail OAuth2 API Google Drive OAuth2 API OpenAI API (with sufficient credits)
n8n Gmail Smart Auto-Responder with GPT-4o and Google Drive Context Memory
This n8n workflow automates smart email responses using AI, leveraging Google Drive for contextual memory. It listens for new emails in Gmail, processes their content with an AI agent (likely GPT-4o, given the directory name hint), and generates a relevant response. The workflow is designed to provide intelligent, context-aware replies by utilizing a vector store and memory buffer for the AI.
What it does
This workflow performs the following steps:
- Triggers on New Emails: Continuously monitors a specified Gmail account for new incoming emails.
- Initial Data Processing: Extracts relevant information from the incoming email.
- Loads Context from Google Drive: Retrieves contextual documents from Google Drive. These documents are likely used to provide background information to the AI for generating more informed responses.
- Splits Documents for AI Processing: Uses a Recursive Character Text Splitter to break down the Google Drive documents into manageable chunks for the AI.
- Embeds Document Chunks: Generates embeddings for the text chunks using OpenAI's embedding model, preparing them for storage in a vector store.
- Stores Context in Vector Store: Populates a simple in-memory vector store with the embedded document chunks, making them searchable for the AI.
- Initializes AI Memory: Sets up a simple memory buffer for the AI agent to maintain conversational context.
- Generates AI Response: Uses an OpenAI Chat Model (likely GPT-4o, though the JSON specifies
lmChatOpenAi) within an AI Agent to process the incoming email and the loaded context, generating a smart response. - Filters for Response: Includes a conditional check (
Ifnode) to potentially filter or route the AI's output based on certain criteria (e.g., if a response was generated). - Prepares Email for Sending: If a response is generated, it prepares the content for sending.
- Sends Auto-Response via Gmail: Sends the AI-generated response back to the original sender using Gmail.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- Gmail Account: A Google account with Gmail enabled for sending and receiving emails.
- Google Drive Account: A Google Drive account containing the contextual documents.
- OpenAI API Key: An API key for OpenAI to use the chat model (e.g., GPT-4o) and embeddings.
- Credentials: Configured n8n credentials for:
- Gmail (OAuth2 or API Key)
- Google Drive (OAuth2 or API Key)
- OpenAI (API Key)
Setup/Usage
- Import the Workflow: Download the workflow JSON and import it into your n8n instance.
- Configure Credentials:
- Set up your Gmail credentials for the "Gmail Trigger" and "Gmail" nodes.
- Set up your Google Drive credentials for the "Google Drive" node.
- Set up your OpenAI credentials for the "Embeddings OpenAI" and "OpenAI Chat Model" nodes.
- Specify Google Drive Context: In the "Google Drive" node, configure which files or folders to use as context for the AI.
- Customize AI Agent: Adjust the prompt and settings within the "AI Agent" node to tailor the AI's behavior and response style.
- Activate the Workflow: Once configured, activate the workflow. It will start listening for new emails in your specified Gmail account and respond automatically.
Related Templates
AI multi-agent executive team for entrepreneurs with Gemini, Perplexity and WhatsApp
This workflow is an AI-powered multi-agent system built for startup founders and small business owners who want to automate decision-making, accountability, research, and communication, all through WhatsApp. The βvirtual executive team,β is designed to help small teams to work smarter. This workflow sends you market analysis, market and sales tips, It can also monitor what your competitors are doing using perplexity (Research agent) and help you stay a head, or make better decisions. And when you feeling stuck with your start-up accountability director is creative enough to break the barrier π― Core Features π§βπΌ 1. President (Super Agent) Acts as the main controller that coordinates all sub-agents. Routes messages, assigns tasks, and ensures workflow synchronization between the AI Directors. π 2. Sales & Marketing Director Uses SerpAPI to search for market opportunities, leads, and trends. Suggests marketing campaigns, keywords, or outreach ideas. Can analyze current engagement metrics to adjust content strategy. π΅οΈββοΈ 3. Business Research Director Powered by Perplexity AI for competitive and market analysis. Monitors competitor moves, social media engagement, and product changes. Provides concise insights to help the founder adapt and stay ahead. β° 4. Accountability Director Keeps the founder and executive team on track. Sends motivational nudges, task reminders, and progress reports. Promotes consistency and discipline β key traits for early-stage success. ποΈ 5. Executive Secretary Handles scheduling, email drafting, and reminders. Connects with Google Calendar, Gmail, and Sheets through OAuth. Automates follow-ups, meeting summaries, and notifications directly via WhatsApp. π¬ WhatsApp as the Main Interface Interact naturally with your AI team through WhatsApp Business API. All responses, updates, and summaries are delivered to your chat. Ideal for founders who want to manage operations on the go. βοΈ How It Works Trigger: The workflow starts from a WhatsApp Trigger node (via Meta Developer Account). Routing: The President agent analyzes the incoming message and determines which Director should handle it. Processing: Marketing or sales queries go to the Sales & Marketing Director. Research questions are handled by the Business Research Director. Accountability tasks are assigned to the Accountability Director. Scheduling or communication requests are managed by the Secretary. Collaboration: Each sub-agent returns results to the President, who summarizes and sends the reply back via WhatsApp. Memory: Context is maintained between sessions, ensuring personalized and coherent communication. π§© Integrations Required Gemini API β for general intelligence and task reasoning Supabase- for RAG and postgres persistent memory Perplexity API β for business and competitor analysis SerpAPI β for market research and opportunity scouting Google OAuth β to connect Sheets, Calendar, and Gmail WhatsApp Business API β for message triggers and responses π Benefits Acts like a team of tireless employees available 24/7. Saves time by automating research, reminders, and communication. Enhances accountability and strategy consistency for founders. Keeps operations centralized in a simple WhatsApp interface. π§° Setup Steps Create API credentials for: WhatsApp (via Meta Developer Account) Gemini, Perplexity, and SerpAPI Google OAuth (Sheets, Calendar, Gmail) Create a supabase account at supabase Add the credentials in the corresponding n8n nodes. Customize the system prompts for each Director based on your startupβs needs. Activate and start interacting with your virtual executive team on WhatsApp. Use Case You are a small organisation or start-up that can not afford hiring; marketing department, research department and secretar office, then this workflow is for you π‘ Need Customization? Want to tailor it for your startup or integrate with CRM tools like Notion or HubSpot? You can easily extend the workflow or contact the creator for personalized support. Consider adjusting the system prompt to suite your business
Automated YouTube video uploads with 12h interval scheduling in JST
This workflow automates a batch upload of multiple videos to YouTube, spacing each upload 12 hours apart in Japan Standard Time (UTC+9) and automatically adding them to a playlist. βοΈ Workflow Logic Manual Trigger β Starts the workflow manually. List Video Files β Uses a shell command to find all .mp4 files under the specified directory (/opt/downloads/εθ―ε‘/A1-A2). Sort and Generate Items β Sorts videos by day number (dayXX) extracted from filenames and assigns a sequential order value. Calculate Publish Schedule (+12h Interval) β Computes the next rounded JST hour plus a configurable buffer (default 30 min). Staggers each videoβs scheduled time by order Γ 12 hours. Converts JST back to UTC for YouTubeβs publishAt field. Split in Batches (1 per video) β Iterates over each video item. Read Video File β Loads the corresponding video from disk. Upload to YouTube (Scheduled) β Uploads the video privately with the computed publishAtUtc. Add to Playlist β Adds the newly uploaded video to the target playlist. π Highlights Timezone-safe: Pure UTC β JST conversion avoids double-offset errors. Sequential scheduling: Ensures each upload is 12 hours apart to prevent clustering. Customizable: Change SPANHOURS, BUFFERMIN, or directory paths easily. Retry-ready: Each upload and playlist step has retry logic to handle transient errors. π‘ Typical Use Cases Multi-part educational video series (e.g., A1βA2 English learning). Regular content release cadence without manual scheduling. Automated YouTube publishing pipelines for pre-produced content. --- Author: Zane Category: Automation / YouTube / Scheduler Timezone: JST (UTC+09:00)
Monitor bank transactions with multi-channel alerts for accounting teams
Enhance financial oversight with this automated n8n workflow. Triggered every 5 minutes, it fetches real-time bank transactions via an API, enriches and transforms the data, and applies smart logic to detect critical, high, and medium priority alerts based on error conditions, amounts, or risk scores. It sends multi-channel notifications via email and Slack, logs all data to Google Sheets, and generates summary statistics for comprehensive tracking. π°π¨ Key Features Real-time monitoring every 5 minutes for instant alerts. Smart prioritization (Critical, High, Medium) based on risk and errors. Multi-channel notifications via email and Slack. Detailed logging and summary reports in Google Sheets. How It Works Schedule Trigger: Runs every 5 minutes. Fetch Transactions: HTTP request retrieves real-time transaction data. API Error?: If condition for error logic is met, sends error alert. Enrich & Transform Data: Advanced risk calculation enhances data. Critical Alert?: If condition (50% or risk > 8) is met, raises alert. High Priority?: If condition (5% or risk > 7) is met, raises alert. Medium Priority?: If condition is met, raises alert. Log Priority to Sheet: Google Sheets appends critical, high, or medium priority data. Send Critical Email: HTML email to execute sheets append. Send High Priority Email: Email to finance team. Send High Priority Slack: Slack notification to finance team. Send Medium Priority Email: Email to finance team. Merge All Alerts: Combines all alerts for comprehensive tracking. Generate Summary Stats: Code block for analytics. Log Summary to Sheet: Summary statistics storage. Setup Instructions Import the workflow into n8n and configure the bank API credentials in "Fetch Transactions." Set up Google Sheets OAuth2 and replace the sheet ID for logging nodes. Configure Gmail API Key and Slack Bot Token for alerts. Test the workflow with sample transaction data exceeding risk or amount thresholds. Adjust priority conditions (e.g., 50%, 5%, risk > 8) based on your risk policy. Prerequisites Bank API access with real-time transaction data (e.g., https://api.bank.com) Google Sheets OAuth2 credentials Gmail API Key for email alerts Slack Bot Token (with chat:write permissions) Structured transaction data format Google Sheet Structure: Create a sheet with columns: Transaction ID Amount Date Risk Score Priority (Critical/High/Medium) Alert Sent Summary Stats Updated At Modification Options Adjust the "Schedule Trigger" interval (e.g., every 10 minutes). Modify "Critical Alert?" and "High Priority?" conditions for custom thresholds. Customize email and Slack templates with branded messaging. Integrate with fraud detection tools for enhanced risk analysis. Enhance "Generate Summary Stats" with additional metrics (e.g., average risk). Discover more workflows β Get in touch with us