How to Create an Email Sender AI Agent Using n8n (Step-by-Step Guide)
Automation tools are rapidly changing how businesses manage communication. Instead of manually drafting emails, you can build an AI Email Sender Agent that writes and sends emails automatically based on chat instructions.
Using n8n, you can create a powerful AI workflow that understands your message, generates a professional email using AI, and sends it through Gmail.
In this guide, you’ll learn how to create an Email Sender AI Agent using n8n step-by-step.
What is an Email Sender AI Agent?
An Email Sender AI Agent is an automated system that:
• Receives instructions through chat
• Uses AI to generate an email message
• Sends the email automatically using Gmail
For example, you can type a command like:
Send an email to client@example.com thanking them for attending the meeting.
The AI agent will automatically:
Write the email
Format it professionally
Send it via Gmail
This can save significant time for sales teams, support teams, and business owners.
Tools Required
Before building the workflow, you will need the following tools:
n8n – Automation platform used to create workflows
OpenAI Chat Model – Generates the email content using AI
Gmail Tool – Sends the email
Simple Memory – Helps maintain context in chat
Temp Mail – Disposable email service for testing email sending
You can use Temp Mail – Disposable Temporary Email to create temporary email addresses while testing the automation.
Step-by-Step Guide to Create Email Sender AI Agent in n8n
Step 1: Create a New Workflow
First, open n8n and create a new workflow.
Click:
Create Workflow
Now add the first trigger node.
Choose:
On Chat Message
This node will trigger the workflow whenever a user sends a chat message.
After adding the node, close the configuration window.
Step 2: Add the AI Agent Node
Next, you need to add the AI agent that will handle the email logic.
Click Add New Node
Search for AI Agent
Click AI Agent
Close the configuration window
The AI Agent node will process the user request and decide how to send the email.
Step 3: Add Chat Model
Now connect the AI model that will generate the email text.
Click Add Chat Model
Search for OpenAI Chat Model
Select it
If you haven't already connected OpenAI, click:
Claim Credits
Then connect your OpenAI account.
Close the window after configuration.
Step 4: Add Memory
Next, add memory so the AI agent can maintain chat context.
Click Add Memory
Select Simple Memory
Close the window
Memory helps the AI remember conversation context during interactions.
Step 5: Add Gmail Tool
Now add the Gmail integration so the AI can send emails.
Click Add Tool
Search for Gmail Tool
Select Gmail Tool
Next, configure Gmail access.
Create Gmail Credential
Click:
Create New Credential
Then:
• Sign in with your Google account
• Grant required permissions
Once connected, configure the fields.
Gmail Tool Configuration
Set the following options:
To: Let Model Define
Subject: Let Model Define
Email Type: Text
Message: Let Model Define
Append n8n Attribution: Off
Then close the configuration window.
Step 6: Configure AI Agent System Message
Now we define how the AI agent should behave.
Double click the AI Agent node.
Go to:
Options → System Message
Add the following instruction:
You are very polite email sending agent.
You have to send email based on requirements shared over the chat.
Make sure at the end of the email you write:
Best Regards
Email Sender Name
This ensures every email generated by the AI follows a polite and professional format.
Close the window after saving.
Step 7: Make the Chat Public (Optional)
If you want others to use this AI agent through a public chat interface, you can enable public access.
Double click on:
When Chat Message Received
Then enable:
Make Chat Publicly Available
This allows you to share the chat interface with others.
Testing the Email AI Agent
Once your workflow is ready, test it with prompts like:
Example 1
Send an email to test@example.com inviting them for a meeting tomorrow.
Example 2
Send a thank you email to client@example.com for the project discussion.
The AI agent will automatically:
• Generate the email
• Add subject and message
• Send the email using Gmail
Benefits of Using an AI Email Sender Agent
Saves Time
No need to manually draft repetitive emails.
Professional Email Writing
AI ensures emails are polite and well-structured.
Automation
Emails can be sent automatically from chat prompts.
Scalability
Businesses can automate communication workflows easily.
Final Thoughts
Creating an Email Sender AI Agent using n8n is a simple yet powerful way to automate email communication.
With just a few nodes — Chat Trigger, AI Agent, OpenAI Chat Model, Memory, and Gmail Tool — you can build a system that generates and sends emails automatically.
This type of AI automation is extremely useful for:
• Sales follow-ups
• Customer support
• Client communication
• Internal team updates
If you're learning AI automation with n8n, building agents like this is a great starting point.
Doc - https://docs.google.com/document/d/18u5BKT8NrV5uxsuoltdxiW63GMI7rkhBud2mKtZs8A4/edit?usp=sharing
Comments
Post a Comment