IMAP Email Parser
Monitor email accounts and automatically trigger workflows when new emails arrive. Connect Gmail, Outlook, Yahoo, or any IMAP-compatible email service to FlowMattic and automate your email processing. Perfect for creating support tickets, processing invoices, capturing leads, and managing attachments without manual intervention.
Quick Setup
Connect Your Email Account
- Go to FlowMattic Settings → IMAP Email Accounts
- Click Add New Account
- Enter your email details:
- Account Label: Friendly name (e.g., “Support Email”)
- Host: Mail server address (e.g.,
imap.gmail.com) - Port:
993for SSL or143for TLS - Username: Your email address
- Password: Your email password (use App Password for Gmail/Outlook)
- Encryption: SSL (recommended)
- Click Test Connection
- Click Add Account
Create Workflow
- Create new workflow
- Select IMAP Email Parser as trigger
- Choose your email account
- Select folder to monitor (default: INBOX)
- Choose trigger type
- Set check frequency (recommended: 5-10 minutes)
- Click Save & Capture Email
Trigger Types
Email Received: Triggers on every new email
Email with Subject Contains: Triggers when subject has specific text
Email from Specific Sender: Triggers for emails from certain addresses
Email with Attachment: Triggers only when emails have attachments
Available Actions
Import Attachments
Downloads email attachments and saves them to WordPress media library automatically.
Use Cases:
- Save invoice PDFs from vendor emails
- Store customer documents from support tickets
- Archive contract attachments from legal correspondence
- Capture lead magnets sent via email
- Backup important files received in emails
Required Fields:
- Email folder: Use
folderfrom trigger - Message UID: Use
uidfrom trigger
Returns for Each Attachment:
media_1_id- WordPress media library IDmedia_1_url- Direct file URLmedia_1_name- Original file namemedia_1_type- MIME type (e.g., application/pdf)
Additional attachments return media_2_id, media_3_id, etc. Use these IDs in subsequent workflow steps to update posts, send notifications, or process files further.
Available Data
Use these fields in your workflow:
subject- Email subjectfrom_email- Sender emailfrom_name- Sender nameto- Recipientbody_text- Plain textbody_html- HTML versiondate- Date sentuid- Unique IDhas_attachments- true/falseattachment_count- Number of attachments
Email Provider Settings
Gmail
- Host:
imap.gmail.com - Port: 993
- Encryption: SSL
- Note: Must use App Password
Outlook
- Host:
outlook.office365.com - Port: 993
- Encryption: SSL
- Note: Must use App Password
Yahoo
- Host:
imap.mail.yahoo.com - Port: 993
- Encryption: SSL
Gmail Setup
- Enable IMAP: Gmail Settings → Forwarding and POP/IMAP
- Create App Password:
- Google Account → Security → 2-Step Verification → App Passwords
- Select “Mail” and your device
- Copy generated password
- Use App Password in FlowMattic (not regular password)
Outlook Setup
- Enable IMAP: Outlook Settings → Mail → Sync email
- Create App Password:
- Microsoft Account → Security → App Passwords
- Generate new password
- Use App Password in FlowMattic
Examples
Support Tickets: Email received → Create ticket → Send confirmation
Invoice Processing: Email with invoice → Import attachment → Create record
Lead Capture: Contact form email → Extract data → Add to CRM
Troubleshooting
Connection Failed
- Verify host and port
- Use App Password for Gmail/Outlook
- Check if hosting blocks IMAP
- Try disabling “Validate Certificate”
No Emails Found
- Ensure emails are unread
- Check emails are within 24 hours
- Verify filters aren’t too restrictive
Processing Twice
- Enable “Mark as Read”
- Check for duplicate workflows
Can’t Import Attachments
- Use
uidfrom trigger - Check WordPress upload permissions
- Verify file types are supported
IMAP Extension Error
- Contact hosting provider to enable PHP IMAP extension
Settings
Polling Frequency: How often to check (5-10 minutes recommended)
Mark as Read: Marks processed emails as read
Email Folder: Which folder to monitor
How It Works
- Checks email at set intervals
- Remembers last processed email
- Only processes new emails
- Processes oldest first
- Never deletes emails
Security
- Use App Passwords
- Enable SSL/TLS
- Use dedicated email accounts
- Review accounts regularly
FAQ
How often should I check for emails?
We recommend checking every 5-10 minutes to balance server load and timely processing. More frequent checks may impact your email provider’s rate limits. You can adjust the schedule based on your needs - urgent emails can use 5-minute intervals, while non-critical monitoring can use 15-30 minutes.
Can I monitor multiple email accounts?
Yes, you can add unlimited email accounts. Each account is stored separately with its own credentials. Create separate workflows for each account based on your trigger event requirements - for example, one workflow for support emails and another for sales notifications.
Does FlowMattic delete emails from my server?
No, all emails remain on your mail server. FlowMattic only reads emails without modifying them. You have the option to mark emails as read if needed to avoid duplicate processing, but this is optional. Your original emails stay intact and accessible through your regular email client.
Can I monitor multiple folders in the same account?
Yes, but you’ll need one workflow per folder. Each workflow can monitor a different folder (INBOX, Sent, Custom folders, etc.). This gives you flexibility to process different folders with different actions - for example, monitoring INBOX for support tickets and a “Orders” folder for purchase notifications.
Is my email password secure?
Yes, all credentials are encrypted and stored securely in your WordPress database. Passwords are never exposed in workflow data or logs. We recommend using App Passwords (for Gmail/Outlook) instead of your main account password for additional security.
How do I use this with 2FA-enabled accounts?
For accounts with two-factor authentication (Gmail, Outlook, Yahoo), you must generate an App Password. Regular passwords won’t work with IMAP when 2FA is enabled. See the Gmail/Outlook/Yahoo setup guides above for step-by-step App Password generation instructions.