❄️ Winter Sale: 40% OFF AIWU
WINTER_SECRET
Valid until Mar 1st
Gmail & Outlook Integration in AIWU Workflows - AIWU – AI Plugin for WordPress
Table of Contents
< All Topics

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
💡 Tip: AIWU uses SMTP to send emails. Gmail and Outlook both support SMTP — you just need to generate an App Password or OAuth credentials.

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.

⚠️ Important: App Passwords require 2-Step Verification to be active on your Google account. If you don’t see the “App passwords” option, enable 2-Step Verification first.

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.

✅ Done! Gmail is connected. You can now use the Send Email action in any workflow.

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.

⚠️ Note for Microsoft 365 Business accounts: Your IT admin may need to enable SMTP AUTH for your account. Go to Microsoft 365 Admin Center → Users → Active Users → [your user] → Mail → Manage email apps → enable “Authenticated SMTP”.

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:

  1. Trigger: User Registration
  2. 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.”
  3. 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:

  1. Trigger it manually (most workflows have a Test Run button).
  2. Check the Workflow Log tab — you should see a green “Email sent” status.
  3. Check the recipient’s inbox. If you’re testing, send to yourself.
✅ Success! If the log shows “Email sent” and you received the email, your integration is working.

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

Last verified: AIWU v.4.9.2 · Updated: 2026-02-25

Scroll to Top