Automate Personalized Emails with n8n, OpenAI & Airtable (No Code!)


If you're looking for a simple way to automatically send intelligent emails using data from Airtable and the power of OpenAI, then you're in the right place. In this guide, I’ll walk you through building an n8n automation that pulls data from Airtable, generates content with OpenAI, and sends it via Gmail—all without writing a single line of code!
⚙️ Tools Required:
n8n (self-hosted or cloud)
🧠 Use Case
Imagine you're maintaining a list of leads or users in Airtable. Every time a new record is added (e.g., a new lead), you want:
OpenAI to write a personalized email.
Gmail to send that email automatically.
🛠️ Step-by-Step Guide
✅ Step 1: Set Up Your Airtable
Create a base (e.g., "Leads") in Airtable.
Add fields like:
Name
Email
Company
Interest
You’ll use this data to craft a custom prompt for OpenAI.
⚡ Step 2: Create an n8n Workflow
- Open your n8n instance and click “New Workflow.”
🔔 Step 3: Add Airtable Trigger
Click
+
→ Search and add Airtable Trigger.Connect your Airtable account (use Airtable API key).
Choose the base and table you created.
Set trigger type to
Create
orUpdate
.
📌 This step starts the flow whenever a new Airtable record is added or modified.
🤖 Step 4: Add OpenAI Node
Click
+
→ Add OpenAI node.Select “Message Model”.
Add your OpenAI API key.
In the Prompt, write something like:
You are responsible for customers orders. Your task is to collect incoming information about new orders and create a clear summary that will be sent via email to the team. The email should be signed with 'Customer Success Team'
Here are the details of the customers orders:
Order Number: {{ $json.fields['Order number'] }}
Customer:{{ $json.fields.Customer }}
Product:{{ $json.fields.Product }}
Quantity:{{ $json.fields.Quantity }}
Price:{{ $json.fields.Price }}
Date:{{ $json.fields.Date }}
Status:{{ $json.fields.Status }}
Please provide the following output parameters:
Email subject:
Email content:
Set the model (e.g.,
gpt-4o
).Set Max Tokens if needed.
💡 Tip: You can use Markdown or HTML in the response to format the email.
📤 Step 5: Add Gmail Node
Click
+
→ Add Gmail node.Authenticate with your Gmail account.
Set:
To:
{{$json["Email"]}}
Subject: “Thank You for Your Interest!”
Message:
{{$node["OpenAI"].json["message"]}}
🎯 This sends the AI-generated email to the user's email address.
✅ Step 6: Test the Flow
Save and activate the workflow.
Add a new record to your Airtable.
Watch the magic happen! ✨
📊 Bonus: Use Cases
Marketing Campaigns
Auto-generate outreach emails based on user interests.Customer Support
Respond to tickets stored in Airtable with AI-generated answers.Content Automation
Auto-generate blog outlines or summaries via email.
🧠 Final Thoughts
This no-code automation empowers you to streamline communications, save time, and engage smarter. With just a few clicks, you're tapping into the full power of OpenAI—without needing to code.
If you found this useful, share it or drop a comment below. I’d love to hear how you're using AI + automation in your workflows!
Subscribe to my newsletter
Read articles from Harendra Barot directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Harendra Barot
Harendra Barot
I'm an IT professional and business analyst, sharing my day-to-day troubleshooting challenges to help others gain practical experience while exploring the latest technology trends and DevOps practices. My goal is to create a space for exchanging ideas, discussing solutions, and staying updated with evolving tech practices.