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 draft replies for approval

Both methods give your agent the ability to:

  • Draft replies to incoming emails for you to approve (it never auto-sends)
  • Maintain email thread context
  • Hand off to a human when needed
  • Track email conversations in your dashboard

Email is approval-first. When you turn on Let AI draft replies, the AI prepares a reply and queues it in Activity > Email for your approval. Nothing is sent until you approve it.


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#

  • Let AI draft replies: Toggle whether the AI prepares draft replies for your approval (it never sends on its own)
  • Display Name: Name shown in the "From" field of outgoing emails
  • Email Signature: Custom signature (supports multiple lines)
  • Include Original Message: Toggle to quote the original email 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#

  • Let AI draft replies: Toggle whether the AI prepares draft replies for your approval (it never sends on its own)
  • Display Name: Name shown in the "From" field of outgoing emails
  • Email Signature: Custom signature (supports multiple lines)
  • Include Original Message: Toggle to quote the original email in replies
  • Test Email: Send a test email to verify everything works

How Drafting Works#

Email is approval-first — the AI never sends a message on its own.

  • Let AI draft replies on: When an email arrives, the AI prepares a draft reply using your sources and queues it in Activity > Email for your approval. You can edit it before approving, or reject it.
  • Let AI draft replies off: Emails are still logged and visible in your inbox, but no drafts are generated.

Which emails get a draft (and which get routed to your team or escalated) is governed by your Human Review rules. Human Review can draft, notify, or hand over a thread, but it never auto-sends.


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

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

Each thread shows:

  • Sender labels in standard Name <email@domain.com> format for inbound messages, and your chosen "reply from" name for outbound replies
  • Read state -- unread threads are highlighted; opening or marking a thread as read persists across devices
  • A Latest badge on the most recent message so you can jump straight to it

Email inbox threads are kept separate from Chat Training and are not used as training data.

Human Handoff#

When the agent encounters a complex or sensitive email:

  1. It notifies your team
  2. AI drafting pauses for that thread
  3. A team member takes over from the dashboard
  4. Click "Resume AI" to let the AI draft for the thread again

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 drafted reply is accurate in Activity > Email
  3. Check the thread appears in your dashboard
  4. Approve the draft, then test thread handling by replying to it

Troubleshooting#

Agent Not Drafting Replies#

Check these in order:

  1. Email is enabled:

    • Go to Deploy > Email
    • Verify email is enabled and connected
  2. AI drafting is on:

    • Check the "Let AI draft replies" toggle
    • Remember: drafts wait in Activity > Email for your approval — they are never sent automatically
  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 emails and draft replies, 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#