Gmail & Outlook Integration: Send and Receive Email from Workflows
Connect AIWU to Gmail or Outlook and let AI handle your email workflows — send notifications from workflows, deliver form responses, trigger automations when emails arrive, and generate AI-drafted replies. This guide covers both directions: sending email from AIWU and using email as a workflow trigger.
Before You Start
You’ll need:
- Familiar with the workflow builder (First Custom Workflow guide)
- AIWU Pro with API key configured
- A Gmail or Outlook account you can authorize
- Time needed: ~10 minutes per integration
- Plan required: Pro
Part A: Send Email from AIWU Workflows
This is the most common use case: a workflow event (new order, new user, form submission) triggers an AI-generated email.
Option 1: Use WordPress Default Mail (Simple)
AIWU can send email via WordPress’s built-in mail system without any OAuth setup. Go to any workflow → Output Action → Send Email. Enter To, Subject, and Body ({ai_output} for AI-generated content).
Limitation: Default WordPress mail often lands in spam. For reliable delivery, use Option 2.
Option 2: Connect Gmail via SMTP (Recommended)
- Install a WordPress SMTP plugin (WP Mail SMTP, FluentSMTP, or Postmark are popular)
- In Gmail: enable 2-factor auth → Google Account → Security → App Passwords → create an app password for “Mail”
- In the SMTP plugin: set host to
smtp.gmail.com, port 587, TLS, your Gmail address, and the app password - Send a test email from the SMTP plugin to verify delivery
- AIWU’s Send Email action now routes through Gmail automatically
Option 3: Connect Outlook / Office 365 via SMTP
- Use the same SMTP plugin approach
- Host:
smtp.office365.com, port 587, STARTTLS - Username: your full Outlook email address, password: your account password
- For organizational accounts: IT may need to enable SMTP AUTH — ask your admin
Part B: Gmail as a Workflow Trigger (Inbound Email)
Receive an email → AIWU processes it with AI → takes action. Use cases:
- Customer sends a support email → AI classifies and routes to correct team channel
- Vendor sends an invoice → AI extracts key data → saves to your records
- Lead replies to a campaign → AI scores the reply → notifies sales
Go to AI Copilot → Workflows → Create New Workflow → Trigger: Inbound Email.
Configure the email trigger:
| Setting | Value |
|---|---|
| Trigger email address | AIWU provides a unique trigger address (e.g. [email protected]) |
| From filter | Optional — only trigger for emails from specific senders |
| Subject filter | Optional — only trigger for emails containing a keyword in subject |
Set up email forwarding in Gmail/Outlook to automatically forward matching emails to the trigger address. In Gmail: Settings → Filters → Create filter → Forward to [trigger address].
{email_subject}, {email_body}, {email_from}, {email_from_name} — use these in your AI prompt to process the email content.
Example: AI-Classified Support Emails to Slack
Trigger: Inbound email forwarded from [email protected]
AI Prompt:
Analyze this customer support email and classify it.From: {email_from_name}
Subject: {email_subject}
Message: {email_body}Classify into one category: Billing / Technical / Shipping / General / Urgent
Determine priority: High / Medium / Low
Write a one-sentence summary.Format:
CATEGORY: [category]
PRIORITY: [priority]
SUMMARY: [summary]
Output Action: Send Slack message to #support channel with the classification and a link to reply.
Verify It’s Working
Send a test email to your trigger address (or to the forwarding address). Check within 60 seconds that the workflow fires and the output action completes.
Common Issues
Problem: “Workflow emails going to spam.”
Fix: Use Gmail/Outlook SMTP instead of WordPress default mail. Also ensure SPF and DKIM DNS records are set for your domain.
Problem: “Inbound email trigger not firing.”
Fix: Verify the forwarding rule is active in Gmail/Outlook. Send a test email directly to the trigger address (not via forwarding) to isolate whether it’s a forwarding issue or a trigger issue.
What’s Next
- 📅 Add calendar events from emails: Google Calendar Integration
- 💬 Route email classifications to Slack: Slack Integration
- 🔧 Workflow variables for email: Workflow Variables Reference
Last verified: AIWU v.4.9.2 · Updated: 2026-02-25
