Gmail & Outlook Integration in AIWU Workflows
After this setup, your AIWU workflows will send emails via Gmail or Outlook automatically — triggered by WordPress events like new orders, form submissions, user registrations, or content publishing.
In this article: Gmail Setup · Outlook Setup · Practical Examples · Common Issues
Before You Start
You’ll need:
- AIWU plugin v4.9+ installed and activated
- A working workflow — build your first workflow if you haven’t yet
- A Gmail or Microsoft 365 / Outlook account
- For Gmail: Google account with 2-Step Verification enabled
- Time needed: ~15 minutes
Part 1: Connect Gmail
Step 1: Generate a Gmail App Password
Go to your Google Account → Security → 2-Step Verification → App passwords.
Select app: Mail. Select device: Other. Name it “AIWU Plugin”. Click Generate.
What you should see: A 16-character password in a yellow box. Copy it — you won’t see it again.
Step 2: Configure SMTP in AIWU
Go to WordPress Admin → AI Copilot → Settings → Integrations → Email.
Enter these settings:
| Field | Value for Gmail |
|---|---|
| SMTP Host | smtp.gmail.com |
| SMTP Port | 587 |
| Encryption | TLS |
| Username | Your full Gmail address |
| Password | The 16-character App Password |
| From Name | Your business name |
| From Email | Your Gmail address |
Click Save & Test Connection. You should receive a test email at your Gmail address.
Part 2: Connect Outlook / Microsoft 365
Step 1: Get your Outlook App Password
Go to account.microsoft.com → Security → Advanced security options → App passwords.
Click Create a new app password. Copy the generated password.
Step 2: Configure SMTP in AIWU
Go to WordPress Admin → AI Copilot → Settings → Integrations → Email.
Enter these settings:
| Field | Value for Outlook/Microsoft 365 |
|---|---|
| SMTP Host | smtp.office365.com |
| SMTP Port | 587 |
| Encryption | STARTTLS |
| Username | Your Outlook/Microsoft email address |
| Password | The app password you generated |
| From Name | Your name or business name |
| From Email | Your Outlook email address |
Click Save & Test Connection.
Part 3: Using Email in Workflows
Add a “Send Email” Action to Any Workflow
Open any workflow in WordPress Admin → AI Copilot → Workflows → [your workflow] → Edit.
Click Add Action → Send Email.
Configure the email action:
| Field | Example | Notes |
|---|---|---|
| To | {{user_email}} |
Use variables for dynamic recipients |
| Subject | Welcome to {{site_name}}, {{user_name}}! |
Supports all workflow variables |
| Body | Plain text or HTML | AI can generate this content dynamically |
| From Override | Leave blank to use default | Override per-email if needed |
Practical Example: Welcome Email on User Registration
This workflow sends a personalized AI-generated welcome email when a new user registers:
- Trigger: User Registration
- Action 1: Generate Text — prompt: “Write a warm welcome email for {{user_name}} who just joined {{site_name}}. Mention they can explore [key feature]. Keep it under 100 words.”
- Action 2: Send Email — To:
{{user_email}}, Subject: “Welcome, {{user_name}}!”, Body:{{generated_text}}
See the full recipe: New User → Welcome Email Sequence.
Verify It Works
After setting up your workflow:
- Trigger it manually (most workflows have a Test Run button).
- Check the Workflow Log tab — you should see a green “Email sent” status.
- Check the recipient’s inbox. If you’re testing, send to yourself.
Common Issues
Problem: “Authentication failed” error when testing connection.
Fix: Double-check your App Password — it must be the generated app password, NOT your regular account password. Re-generate if unsure.
Problem: Gmail shows “Less secure app access” warning.
Fix: App Passwords bypass this restriction. Make sure you’re using the App Password method (Step 1), not your regular password.
Problem: Emails are sending but landing in spam.
Fix: Make sure the “From Email” matches your authenticated Gmail/Outlook address. Sending “from” an address that doesn’t match your SMTP credentials causes spam flags.
Problem: Microsoft 365 connection fails even with correct credentials.
Fix: SMTP AUTH may be disabled at the organization level. Ask your IT admin to enable it for your account in the Microsoft 365 Admin Center.
Still stuck? Check the general troubleshooting guide or contact support.
What’s Next
- 🟢 Build a welcome email sequence: Workflow Recipe: New User → Welcome Email — ready-to-copy workflow using Gmail
- 🟡 Add calendar events: Google Calendar Automations — book appointments automatically
- 🔵 Add Slack notifications too: Slack Integration — notify your team when emails go out
- 🔧 Advanced triggers: Webhooks for external email triggers — trigger emails from outside WordPress
Last verified: AIWU v.4.9.2 · Updated: 2026-02-25
