AI Personal Email Assistant using MCP and Google Sheets - n8n Workflow

Automate supplier communication using an n8n workflow leveraging OpenAI and Google Sheets lookup. Use this flexible n8n template to build smart, multi-step AI agents.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Procurement Specialists: Those needing to quickly send tailored emails to suppliers by name only.
Automation Developers: Users looking for advanced examples of n8n templates integrating Langchain agents with external n8n Server nodes (MCP).
Small Business Owners: Individuals seeking to automate routine communication tasks to improve efficiency.
n8n Users: Anyone interested in deploying a complex, tool-using n8n agent powered by OpenAI.

Overview

This sophisticated n8n workflow demonstrates a powerful application of AI agents combined with modular automation using the n8n Multi-Client Protocol (MCP). The core problem it solves is automating complex, conditional communication tasks. Instead of requiring a user to manually find a supplier's email address and draft a communication, the user simply chats with the agent, providing the supplier's name and the message intent.

This specific n8n template is divided into two parts: the Client (the AI agent) and the Server (the execution tool). The AI agent leverages the Thinker n8n node and the Google Sheets Tool to find the necessary data, and then executes the email sending action using the MCP Client Tool, which connects to the separate MCP Server Trigger and the Gmail n8n node. This approach makes the overall n8n workflow highly scalable and maintainable, offering a robust structure for advanced AI automation.

How it Works

The process begins with the Entry Point: Chat with the Agent n8n trigger, initiating a conversation.


  1. Agent Initialization: The input is passed to the Personal Email Assistant n8n agent (powered by GPT-4o-mini via the AI Model Open AI n8n node), which uses a defined system prompt and Chat Memory for context.

  2. Decision Making: The agent's first instruction is to execute the Thinker, think before executing. n8n node. It analyzes the user request and determines which tools are needed (e.g., if an email address is missing).

  3. Data Lookup: If the user only provided a supplier name, the agent uses the Supplier database n8n node (Google Sheets) to query the sheet and retrieve the associated Contact Email.

  4. Action Execution (MCP Client): Once the agent has the destination email, subject, and body, it executes the Node that connects to the MCP server. n8n node. This acts as a client, passing the required parameters (To, Subject, Message) to the server workflow.

  5. Action Fulfillment (MCP Server): The server workflow starts with the MCP Server Trigger n8n trigger. This trigger receives the data from the client.

  6. Email Sending: The server then executes the Send message by Gmail n8n node, which uses the data output by the AI (via $fromAI expressions) to construct and send the final email. This completes the sophisticated n8n workflow execution.

Installation Guide

To set up this n8n template, follow these steps:


  1. Import: Copy the provided n8n workflow JSON and paste it into your n8n canvas.

  2. Google Sheets Setup: Create a Google Sheet named 'Suppliers' containing the columns 'Supplier Name' and 'Contact Email'. Authenticate the Supplier database n8n node with your Google Sheets credentials.

  3. OpenAI Credentials: Provide valid credentials for the AI Model Open AI n8n node, using a model like gpt-4o-mini.

  4. Gmail Credentials: Authenticate the Send message by Gmail n8n node with your appropriate Gmail OAuth2 credentials.

  5. MCP Configuration (Crucial): This n8n workflow requires two separate flows or environments configured for MCP communication. The MCP Server Trigger and the MCP Client Tool must reference each other correctly. Ensure the sseEndpoint URL in the client node is updated to match the public URL of your live n8n server hosting the server workflow.

  6. Activation: Activate both the client and server portions of this n8n workflow to make the Chat Agent available.

Node Details

This advanced n8n workflow utilizes several specialized n8n node types:

Entry Point: Chat with the Agent (Langchain Chat Trigger): The starting point, acting as the user interface (the main n8n trigger) for interacting with the AI assistant.
Personal Email Assistant (Langchain Agent): The intelligence hub. This n8n node manages tool selection based on the system prompt and user input, ensuring logical flow execution.
AI Model Open AI (Langchain LM Chat OpenAi): Provides the large language model (GPT-4o-mini) capability necessary for reasoning and generating the final email content and recipient details.
Supplier database (Google Sheets Tool): An essential utility n8n node used by the agent to lookup missing information, specifically supplier contact emails, based on the supplier name provided by the user.
Thinker, think before executing. (Langchain Tool Think): A key meta n8n node that forces the agent to analyze the current context and plan the necessary steps before calling other tools or completing the request.
Node that connects to the MCP server. (Langchain MCP Client Tool): This n8n node sends the fully prepared email action (To, Subject, Message) as a structured payload to the separate MCP Server n8n workflow for execution.
MCP Server Trigger (Langchain MCP Trigger): The receiving n8n trigger in the server workflow. It waits for commands from the MCP Client.
Send message by Gmail (Gmail Tool): The final action n8n node, responsible for drafting and sending the actual email using AI-generated parameters.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by
Omar Hdez
Omar Hdez

Featured*