Examples

Practical email workflows you can copy and adapt.

badge 13

Support tickets

Turn support@ emails into triaged tickets.

  • badge 13 Auto-create tickets
  • badge 13 Route by priority
  • badge 13 Extract customer/order data
// structuredEmails
const ticket = {
subject: email.subject,
from: email.fromData.address,
priority: extractPriority(email.textBody)
}
badge 13

Leads to CRM

Qualify inbound leads from contact@.

  • badge 13 Parse contact submissions
  • badge 13 Score and assign owner
  • badge 13 Sync to CRM
// structuredEmails
const lead = {
email: email.fromData.address,
company: extractCompany(email.textBody),
score: scoreLead(email.textBody)
}
badge 13

Monitoring alerts

Convert alerts to incidents with owners.

  • badge 13 Parse alert emails
  • badge 13 Route by severity
  • badge 13 Notify on Slack
// structuredEmails
const incident = {
severity: extractSeverity(email.subject),
service: parseService(email.textBody),
assignee: route(email.textBody)
}
badge 13

Orders

Sync order emails to your system.

  • badge 13 Parse confirmations
  • badge 13 Track shipments
  • badge 13 Update inventory
// structuredEmails
const order = {
id: extractOrderId(email.subject),
status: parseOrderStatus(email.textBody),
to: email.toData[0].address
}
badge 13

Content

Publish posts from editor@ inbox.

  • badge 13 Convert to Markdown
  • badge 13 Extract tags
  • badge 13 Auto-publish
// structuredEmails
const content = {
title: email.subject,
author: email.fromData.name,
body: toMarkdown(email.textBody)
}
badge 13

AI routing

Label, prioritize, and auto-reply.

  • badge 13 Intent + sentiment
  • badge 13 Smart replies
  • badge 13 Team routing
// structuredEmails
const analysis = {
intent: classify(email.textBody),
sentiment: sentiment(email.textBody),
priority: priorityScore(email.textBody)
}

Implement in minutes

Use the SDK + a webhook to handle any example.

Universal handler

import { createInboundClient } from '@inboundemail/sdk'

const inbound = createInboundClient({
  apiKey: process.env.INBOUND_API_KEY
})

// Set up webhook for any use case
app.post('/webhook/email', async (req, res) => {
  const { email }: InboundWebhookPayload = req.body // structuredEmails
  
  // Universal email data extraction
  const emailData = {
    from: email.fromData.address,
    subject: email.subject,
    content: email.textBody,
    attachments: email.attachments,
    timestamp: email.date
  }
  
  // Route based on your use case
  switch (detectUseCase(emailData)) {
    case 'support':
      await handleSupportTicket(emailData)
      break
    case 'lead':
      await processLead(emailData)
      break
    case 'monitor':
      await createIncident(emailData)
      break
    case 'order':
      await updateOrderStatus(emailData)
      break
    default:
      await processGenericEmail(emailData)
  }
  
  res.status(200).json({ success: true })
})

Where it fits

Teams across industries automate with inbound email.

🛒

E-commerce

Order processing, returns, customer support automation

🏥

Healthcare

Patient communications, appointment scheduling, lab results

🏢

SaaS

User onboarding, support ticketing, usage notifications

💰

Finance

Transaction alerts, compliance reporting, customer inquiries

🎓

Education

Student communications, grade notifications, enrollment processing

🏠

Real Estate

Lead qualification, property inquiries, document processing

📰

Media

Content submissions, subscription management, reader engagement

⚙️

DevOps

System monitoring, incident management, deployment notifications

Start building

5,000 emails free. Type-safe SDK. Examples included.

inbound | Email Processing Examples - Real-World Use Cases for Inbound Email API | inbound