AI-Powered Smart Email Auto-Responder for Gmail - n8n Workflow

Automate Gmail responses using this advanced n8n workflow. It classifies incoming emails via Google Gemini, identifies inquiries (Guest Post, YouTube, Courses), and sends custom HTML replies. This n8n workflow saves time by instantly processing inquiries.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Agencies or Solopreneurs managing high volumes of specialized inquiries (e.g., guest posts, partnerships, courses).
Users looking for advanced, real-world examples of an n8n workflow combining AI and email services.
Technical content creators needing to categorize and respond to different types of outreach efficiently.
Developers seeking robust n8n templates for intelligent email routing.

Overview

This powerful n8n workflow transforms your inbox from a bottleneck into an automated service center. By leveraging the Google Gemini Chat Model via the n8n node for Text Classification, the system accurately identifies the intent of every incoming email—whether it's a guest post pitch, a YouTube review request, or a course inquiry. This automated n8n solution ensures immediate, tailored, and professional responses are sent out, providing exceptional customer service around the clock. Furthermore, after processing, the n8n workflow handles essential backend tasks, marking the email as read, applying an organization label, and syncing the contact information directly to Brevo (Sendinblue). This is a highly effective example of how powerful n8n templates can be for scaling communication.

How it Works


  1. Trigger and Validation: The n8n workflow starts with the Gmail Trigger node, polling for new incoming emails. An initial check prevents the automation from processing internal messages (based on the domain check in the Emails from Existing Contracts n8n node) and only proceeds if the message is a new, original thread (subject does not start with "Re:" checked by the Reply n8n node).

  2. AI Classification: The body and subject of the email are fed into the Text Classifier n8n node, which connects to the Google Gemini Chat Model. This model categorizes the intent of the message into one of three predefined categories: "Guest Post," "Youtube," or "Udemy Courses."

  3. Conditional Response: Based on the output of the classification, the n8n workflow branches to one of three Email Send n8n nodes, each configured with a detailed, specific HTML template corresponding to the inquiry type (Guest Post Inquiry, Youtube Video Inquiry, or Course Inquiry).

  4. CRM and Cleanup: Regardless of the response sent, the flow converges. The original email is marked as read using a Gmail n8n node, a specific label is applied for organizational tracking, and finally, the sender's email address is synchronized (upserted) into Brevo (Sendinblue) using the Sendinblue n8n node, ensuring the contact is added to your CRM pipeline. This completes the end-to-end processing handled by the n8n workflow.

Installation Guide


  1. Import: Copy the provided n8n workflow JSON and paste it into your n8n instance using the "New" button and selecting "Import from JSON."

  2. Credentials Setup: This n8n workflow requires four distinct credentials:

Gmail OAuth2: Needed for the Gmail Trigger and Gmail n8n nodes (Mark as Read, Apply Label). Ensure this credential has read, compose, and modify permissions.
Google Gemini (PaLM) API: Required for the Google Gemini Chat Model n8n node to power the classification logic.
SMTP: Required for the three Email Send n8n nodes to send the automated HTML replies.
Brevo (Sendinblue) API: Required for the Create Contact in Brevo n8n node to sync contact details.

  1. Configuration: Review the categories and descriptions in the Text Classifier n8n node to ensure they align with your business needs. Update the HTML content within the three email send nodes to customize your pricing and outreach details.

  2. Activation: Once all credentials and configurations are set, activate the n8n trigger to start polling your Gmail inbox and running this powerful n8n workflow.

Node Details

Gmail Trigger: Function: Starts the n8n workflow by polling a Gmail inbox for new messages every hour. Key Configuration: Uses Gmail OAuth2 credentials to monitor the inbox. This is the crucial starting n8n trigger.
Emails from Existing Contracts (IF n8n node): Function: Filters out internal emails (those containing '@syncbricks.com') to prevent unnecessary processing or auto-reply loops. Key Configuration: Checks if the headers.from contains the internal domain.
Reply (IF n8n node): Function: Ensures the n8n workflow only proceeds if the subject line is a new inquiry (does not start with "Re:"). Key Configuration: Checks if $json.subject does not start with "Re:".
Text Classifier (LangChain n8n node): Function: Analyzes the email content (subject + body) using the connected Google Gemini model to determine the user's intent based on custom-defined categories ("Guest Post," "Youtube," "Udemy Courses").
Google Gemini Chat Model (LangChain n8n node): Function: Provides the large language model backend necessary for the Text Classifier n8n node to perform semantic analysis. Key Configuration: Uses models/gemini-2.0-flash-exp.
Email Send (3 instances): Function: Sends highly customized, pre-written HTML responses specific to the classified inquiry. Key Configuration: Utilizes an SMTP credential and dynamically extracts the recipient's address using n8n expressions.
Mark as Read & Apply Label (Gmail n8n nodes): Function: Performs post-processing cleanup in Gmail, marking the original message as handled and applying a tracking label (Label_6332648012153150222).
Create Contact in Brevo (Sendinblue n8n node): Function: Upserts the sender's email address into the Brevo CRM platform using the sender's email address extracted from the initial n8n trigger data.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

**Amjid Ali** is an automation expert and AI enthusiast specializing in creating intelligent workflows using low-code platforms like **n8n**. With a passion for simplifying complex processes, he designs solutions that enhance productivity and streamline operations. As an active contributor to the **n8n Creator Hub**, Amjid shares innovative use cases, practical templates, and best practices, empowering the community to unlock the full potential of workflow automation.

Featured*