[ use case ]

AI SaaS Onboarding Email Agent

Build an AI agent that sends personalized onboarding emails based on user behavior, answers questions from new users, and guides them to activation — through a real mailbox on your domain.

The problem

Most SaaS onboarding sequences are static. A user signs up and receives the same drip campaign as everyone else — regardless of whether they completed setup in five minutes or never logged in again. Day 1: welcome email. Day 3: feature highlight. Day 7: "We miss you." The sequence ignores what the user actually did.

When users reply to onboarding emails with questions, those replies typically land in a shared inbox that gets triaged hours later by a support team. The moment of confusion — when the user is most at risk of churning — passes before anyone responds. By the time support replies, the user has moved on.

Behavioral email tools like Customer.io and Intercom can trigger based on events, but they send from no-reply addresses or generic support domains. Users cannot reply naturally. And when they do, the response goes to a ticketing system — not back into the onboarding conversation.

How an AI agent solves this

An AI onboarding agent sends from a real mailbox like [email protected] with a human-sounding name. It adapts email content and timing to each user's behavior, and when users reply, the agent responds immediately with contextual help.

  • Sends the right email at the right time based on what the user has or has not done
  • Answers setup questions instantly — pulling from your knowledge base and docs
  • Identifies and resolves onboarding blockers before users give up
  • Escalates complex issues to your support team with full conversation context
  • Tracks onboarding blockers as product analytics — discover which steps lose users
  • Sends celebration emails when users hit activation milestones

How it works with Robotomail

Robotomail gives your onboarding agent a real email address on your domain. Users can reply to onboarding emails and get immediate, helpful responses — no ticketing system, no delay.

1. Provision an onboarding mailbox

Create mailbox
curl -X POST https://api.robotomail.com/v1/mailboxes \
  -H "Authorization: Bearer rm_live_key" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "onboarding",
    "domainId": "dom_acmeanalytics",
    "displayName": "Kai from Acme Analytics"
  }'

2. Send behavioral onboarding emails

Your agent checks user activity and sends targeted emails based on what each user has or has not completed.

Behavioral trigger logic
// Behavioral trigger: runs on a schedule, checks user activity
async function sendBehavioralOnboardingEmails() {
  const users = await db.users.findStalled({
    signedUpAfter: daysAgo(7),
    hasNotCompleted: "first_data_source",
  });

  for (const user of users) {
    const daysSinceSignup = daysBetween(user.createdAt, new Date());
    const template = selectTemplate(user.onboardingStep, daysSinceSignup);

    const personalizedEmail = await generateOnboardingEmail({
      userName: user.name,
      template,
      userActivity: await db.activity.getRecent(user.id),
      product: user.plan,
    });

    await fetch(`https://api.robotomail.com/v1/mailboxes/${mailboxId}/messages`, {
      method: "POST",
      headers: {
        "Authorization": "Bearer rm_live_key",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        to: [user.email],
        subject: personalizedEmail.subject,
        bodyText: personalizedEmail.body,
      }),
    });
  }
}

3. Send a personalized nudge

Send onboarding email
curl -X POST https://api.robotomail.com/v1/mailboxes/{mailbox_id}/messages \
  -H "Authorization: Bearer rm_live_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["[email protected]"],
    "subject": "Quick tip: connecting your first data source",
    "bodyText": "Hi Alex,\n\nI noticed you created your account yesterday but haven\'t connected a data source yet. That\'s the step that unlocks everything — dashboards, alerts, and automated reports.\n\nHere\'s the fastest way to get started:\n\n1. Go to Settings > Integrations\n2. Click \"Add Data Source\"\n3. Choose your database type (we support PostgreSQL, MySQL, BigQuery, and 20+ others)\n\nThe whole process takes about 2 minutes. Once connected, I\'ll send you a guide on building your first dashboard.\n\nStuck on anything? Just reply to this email — I\'m here to help.\n\nKai from Acme Analytics"
  }'

4. Register a webhook for replies

Register webhook
curl -X POST https://api.robotomail.com/v1/webhooks \
  -H "Authorization: Bearer rm_live_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/api/onboarding-inbox",
    "events": ["message.received"],
    "mailboxId": "mbx_onboarding_01"
  }'

5. Handle user questions in real time

When a user replies with a question, the webhook delivers the message and your agent responds with contextual help.

Webhook payload
{
  "event": "message.received",
  "data": {
    "id": "msg_ob_4k1m",
    "from": "[email protected]",
    "to": ["[email protected]"],
    "subject": "Re: Quick tip: connecting your first data source",
    "text": "Hi Kai, I'm trying to connect our PostgreSQL database but getting a connection timeout error. We're behind a corporate firewall — do I need to whitelist any IPs?",
    "receivedAt": "2026-03-22T11:20:00Z",
    "threadId": "thr_ob_321"
  }
}
Agent logic
async function handleOnboardingReply(payload) {
  const { from, text, threadId } = payload.data;

  // Look up the user and their onboarding state
  const user = await db.users.findByEmail(from);
  const onboardingState = await db.onboarding.findByUser(user.id);

  // Classify the reply — is it a question, a blocker, or just a thank-you?
  const intent = await classifyOnboardingReply(text, {
    currentStep: onboardingState.currentStep,
    product: "acme-analytics",
  });
  // => { type: "support_question", topic: "connectivity", blocker: true }

  if (intent.blocker) {
    // Generate a contextual help response
    const helpResponse = await generateHelpResponse({
      question: text,
      currentStep: onboardingState.currentStep,
      knowledgeBase: await getRelevantDocs(intent.topic),
    });

    await fetch(`https://api.robotomail.com/v1/mailboxes/${mailboxId}/messages`, {
      method: "POST",
      headers: {
        "Authorization": "Bearer rm_live_key",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        to: [from],
        subject: `Re: ${payload.data.subject}`,
        bodyText: helpResponse,
        inReplyTo: threadId,
      }),
    });

    // Track the blocker for product analytics
    await db.onboardingBlockers.create({
      userId: user.id,
      step: onboardingState.currentStep,
      topic: intent.topic,
      resolvedViaEmail: true,
    });
  }

  // If user completed the step, advance to next onboarding email
  if (intent.type === "step_completed") {
    await db.onboarding.update(user.id, {
      currentStep: onboardingState.currentStep + 1,
    });
    // Next behavioral email will trigger based on updated state
  }
}

Key benefits

  • Behavior-driven, not time-driven. Emails adapt to what each user actually does. A user who connects their database on day 1 gets a dashboard tutorial — not a reminder to connect.
  • Instant support at the moment of confusion. When a user hits a blocker and replies, your agent answers within seconds — before frustration leads to churn.
  • Real reply address. Emails come from a person-like identity on your domain. Users reply naturally — no "do not reply to this email" friction.
  • Blocker analytics. Every question and issue is logged. Discover which onboarding steps cause the most confusion and fix them in-product.
  • Scales with your user base. Whether you have 100 signups per month or 10,000, the agent handles every conversation. No additional headcount needed.

Read the documentation to get started, or learn more about the platform in our launch post. Ready to build? Sign up free.

Ready to build this?

Free tier includes a platform mailbox, 50 sends per day, and webhook delivery. No credit card required.

Start building — free