🔑 Core Concept
Every automation = Trigger + Action
- Trigger: New email added to Google Sheet
- Action: AI writes a personalized email → Gmail sends it
📄 Step 0: Prepare Your Google Sheet
Create a Google Sheet like this:
| Name | Email |
|---|
| Rahul | rahul@email.com |
| Ananya | ananya@email.com |
Every time you add a new row, the automation will trigger.
⚡ Step 2: Create the Trigger
What this does: Tells n8n to start the workflow whenever something changes in your Google Sheet.
- Click Add Node → Select Google Sheets
- Connect your Google account (credentials)
- Choose your spreadsheet and the correct sheet/tab
- Click Fetch Event to test
✅ Result: On the left panel, you'll see live data from the sheet confirming the trigger works.
🤖 Step 3: Call an AI Agent
What this does: AI will write and personalize the email using the name from Google Sheets.
1. System Prompt
You are a helpful email assistant.
Write a professional cold email.
Do not include a subject line.
2. User Message
Write an email starting with "Dear {{Name}}"👉 Drag the Name variable from the left panel into the message
- Add a new node → AI Agent
- Connect Google Sheets → AI Agent
- Paste the System Prompt and User Message
- Click Execute Node
🧠 Step 4: Choose AI Model
- Inside the AI Agent node, click Model
- Select OpenAI
- Use free credits (works perfectly for this use case)
- Click Execute Node
✅ Result: You'll see a fully written email generated by AI.
✉️ Step 5: Send Email via Gmail
What this does: Sends the AI-generated email automatically.
- Add a new node → Gmail
- Connect AI Agent → Gmail
- Select Send Message
- Choose your Gmail credentials
Gmail Field Setup:
- To: Drag Email variable from Google Sheets
- Subject: Inviting {{Name}} (drag Name variable)
- Message Body: Drag the AI Agent output
▶️ Step 6: Execute the Workflow
- Click Execute Workflow
- Watch each node: Yellow → Processing, Green → Success
✅ Final Result: Email is sent, message is personalized, automation works end-to-end! 🎉
🔁 What Happens Automatically?
Every time you add a new email to the Google Sheet:
- n8n detects the new row
- AI writes a personalized email
- Gmail sends the email
No manual work needed.