Email Integration

Connect email to let your AI agent handle email conversations via Gmail or forwarding

Email Integration#

Let your AI agent handle email conversations automatically. AlonChat supports Gmail via direct OAuth connection and email forwarding for other providers like Outlook, Yahoo, and any SMTP-compatible service.


How It Works#

MethodProvidersCapabilities
Gmail OAuthGmail, Google WorkspaceRead, reply, and send emails directly
Email ForwardingOutlook, Yahoo, any providerReceive forwarded emails and auto-reply

Both methods give your agent the ability to:

  • Automatically reply to incoming emails
  • Maintain email thread context
  • Hand off to a human when needed
  • Track email conversations in your dashboard

Setting Up Gmail (OAuth)#

Step 1: Enable Email#

  1. Go to your agent dashboard
  2. Navigate to Deploy > Email
  3. Click Enable Email
  4. Click Connect Gmail

Step 2: Authorize Gmail#

  1. Sign in with your Google account
  2. Grant AlonChat permission to read and send emails
  3. Your Gmail account will appear as connected

Step 3: Configure Settings#

  • Auto-Reply: Toggle automatic email responses on/off
  • Display Name: Name shown in outgoing emails
  • Email Signature: Custom signature (supports multiple lines)
  • Include Original: Toggle to include the original message in replies

Step 4: Test#

Click the Test Email button to send a test email and verify everything works.


Setting Up Email Forwarding#

For Outlook, Yahoo, and other providers, use email forwarding to route messages to your agent.

Step 1: Get Your Forwarding Address#

  1. Go to your agent dashboard
  2. Navigate to Deploy > Email
  3. Click Enable Email
  4. A unique forwarding address is generated for your agent (e.g., agent-abc123@mail.alonchat.com)

Step 2: Configure Forwarding in Your Email Provider#

Gmail#

  1. Open Gmail Settings > Forwarding and POP/IMAP
  2. Click "Add a forwarding address"
  3. Paste your AlonChat forwarding address
  4. Gmail sends a verification code -- AlonChat detects it automatically (polls every 3 seconds)
  5. Forwarding is verified and enabled

Outlook#

  1. Go to Outlook Settings > Mail > Forwarding
  2. Enable forwarding to your AlonChat address
  3. Return to AlonChat and check the "I've set up forwarding" confirmation checkbox

Yahoo#

  1. Go to Yahoo Mail Settings > Filters
  2. Create a filter to forward messages to your AlonChat address
  3. Note: Yahoo Mail Plus may be required for forwarding on free accounts
  4. Return to AlonChat and check the "I've set up forwarding" confirmation checkbox

Other Providers#

  1. Follow your email provider's forwarding instructions
  2. Forward to your AlonChat forwarding address
  3. Return to AlonChat and check the "I've set up forwarding" confirmation checkbox

Step 3: Configure Response Settings#

  • Auto-Reply: Toggle automatic email responses on/off
  • Display Name: Name shown in outgoing emails
  • Email Signature: Custom signature (supports multiple lines)
  • Include Original: Toggle to include the original message in replies
  • Test Email: Send a test email to verify everything works

Auto-Reply Options#

OptionDescription
All emailsReply to every incoming email automatically
First contact onlyOnly reply to the first email in a thread
OffDisable auto-reply (emails are still logged and visible in your dashboard)

Thread Handling#

AlonChat maintains full email thread context:

  • Thread continuity -- The agent reads the full thread history before replying, so it understands the context of ongoing conversations
  • Subject line preservation -- Replies maintain the original subject line with "Re:" prefix
  • Conversation grouping -- All emails in a thread are grouped together in your AlonChat dashboard
  • Human handoff -- If the agent cannot answer, it can notify your team to take over the thread

AI Email Actions#

During chat conversations on any channel, your agent can also perform email actions:

ActionDescription
Send EmailSend a new email on behalf of the business
Reply to EmailReply within an existing email thread
Read EmailRetrieve and summarize recent email content

These actions require a connected Gmail account (OAuth). They allow your agent to send emails as part of a Messenger, WhatsApp, or widget conversation -- for example, emailing a quote to a customer who requested it via chat.


Managing Email Conversations#

View Email Threads#

  1. Go to Activity in the sidebar
  2. See all email conversations
  3. View agent responses alongside the original emails
  4. Take over manually if needed

Human Handoff#

When the agent encounters a complex or sensitive email:

  1. It notifies your team
  2. Auto-reply pauses for that thread
  3. A team member takes over from the dashboard
  4. Click "Resume AI" to re-enable auto-reply for the thread

Best Practices#

1. Set Expectations in Your Signature#

Include a note that responses may be AI-assisted:

Code
Best regards,
[Company Name]

Note: Initial responses may be handled by our AI assistant.
A team member will follow up if needed.

2. Monitor Response Quality#

  • Review email responses daily during the first week
  • Check for accuracy, tone, and completeness
  • Add missing information to your sources

3. Use Human Handoff for Sensitive Topics#

Configure handoff for:

  • Billing disputes
  • Legal inquiries
  • Complaints
  • Complex technical support

4. Configure Display Name Carefully#

Use a recognizable sender name such as:

  • "[Company Name] Support"
  • "[Company Name] Team"
  • Your actual business name

5. Test Before Going Live#

  1. Send a test email to your agent's address
  2. Verify the auto-reply is accurate
  3. Check the response appears in your dashboard
  4. Test thread handling by replying to the auto-reply

Troubleshooting#

Agent Not Responding to Emails#

Check these in order:

  1. Email is enabled:

    • Go to Deploy > Email
    • Verify email is enabled and connected
  2. Auto-reply is on:

    • Check the auto-reply toggle
    • Ensure it is not set to "Off"
  3. Forwarding is working (non-Gmail):

    • Send a test email to your regular address
    • Check if it arrives at the AlonChat forwarding address
    • If not, re-check forwarding settings in your email provider
  4. Gmail connection is active:

    • Check the connection status
    • If expired, reconnect via OAuth
  5. Agent is trained:

    • Ensure your sources have relevant content
    • Re-train if you recently added new sources

Emails Going to Spam#

If auto-replies are landing in recipients' spam folders:

  • Ensure your display name looks professional
  • Avoid excessive links or promotional language in signatures
  • Ask recipients to mark your replies as "not spam"

Forwarding Verification Stuck#

For Gmail forwarding:

  • AlonChat polls for the verification code every 3 seconds
  • If it takes longer than a minute, check your AlonChat email inbox for the code
  • Try removing and re-adding the forwarding address

Limitations#

  • Gmail OAuth: Full read and reply capabilities
  • Email forwarding: Can receive and auto-reply, but cannot read the original inbox
  • Attachments: Text content of emails is processed; attachment handling is limited
  • Rate limits: Email sending is rate-limited to prevent spam flags
  • No calendar invites: Use the Google Calendar integration for scheduling instead

Privacy and Security#

  • Email content is encrypted at rest and in transit
  • Gmail OAuth tokens are stored securely and can be revoked anytime
  • Forwarded emails are processed and stored in your agent's conversation history
  • AlonChat does not access emails outside of the connected account or forwarding address
  • GDPR-compliant data handling with deletion on request

Next Steps#