email-agent

Processes incoming emails for Unite-Hub. Extracts sender data, identifies communication intents, links to CRM contacts, analyzes sentiment, and updates contact records with AI insights.

242 stars

Best use case

email-agent is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Processes incoming emails for Unite-Hub. Extracts sender data, identifies communication intents, links to CRM contacts, analyzes sentiment, and updates contact records with AI insights.

Processes incoming emails for Unite-Hub. Extracts sender data, identifies communication intents, links to CRM contacts, analyzes sentiment, and updates contact records with AI insights.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "email-agent" skill to help with this workflow task. Context: Processes incoming emails for Unite-Hub. Extracts sender data, identifies communication intents, links to CRM contacts, analyzes sentiment, and updates contact records with AI insights.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/email-agent/SKILL.md --create-dirs "https://raw.githubusercontent.com/aiskillstore/marketplace/main/skills/cleanexpo/email-agent/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/email-agent/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How email-agent Compares

Feature / Agentemail-agentStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Processes incoming emails for Unite-Hub. Extracts sender data, identifies communication intents, links to CRM contacts, analyzes sentiment, and updates contact records with AI insights.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Email Agent Skill

## Overview
The Email Agent is responsible for:
1. **Processing unprocessed emails** from a workspace
2. **Extracting sender information** and linking to existing contacts
3. **Analyzing email content** for intents and sentiment
4. **Updating CRM contacts** with interaction data
5. **Creating audit logs** for all actions

## How to Use This Agent

### Trigger
User says: "Process emails for Duncan's workspace" or "Analyze unprocessed emails"

### What the Agent Does

#### 1. Fetch Unprocessed Emails
```
Call: convex query emails.getUnprocessed({
  orgId: "k57akqzf14r07d9q3pbf9kebvn7v7929",
  workspaceId: "kh72b1cng9h88691sx4x7krt2h7v7dehh",
  limit: 50
})
```

Returns array of emails not yet processed (`isProcessed: false`)

#### 2. For Each Email

**Step A: Extract Sender Email**
```
From: "john@techstartup.com"
Extract: sender_email = "john@techstartup.com"
```

**Step B: Link to Contact**
```
Call: convex query contacts.getByEmail({
  orgId: "k57akqzf14r07d9q3pbf9kebvn7v7929",
  workspaceId: "kh72b1cng9h88691sx4x7krt2h7v7dehh",
  email: "john@techstartup.com"
})
```

If exists → `contactId = found_contact._id`
If NOT exists → Create new contact with:
  - email: sender_email
  - name: extracted from email or "Unknown"
  - source: "email"
  - status: "lead"

**Step C: Analyze Email Content**

Extract these intent keywords:
- "interested" / "partnership" / "collaboration" → intent: **inquiry**
- "proposal" / "quote" / "pricing" → intent: **proposal**
- "issue" / "problem" / "help" → intent: **complaint**
- "?" / "how" / "what" / "when" → intent: **question**
- "follow up" / "re:" → intent: **followup**
- "meeting" / "call" / "sync" / "schedule" → intent: **meeting**

Multiple intents can apply to one email.

**Step D: Analyze Sentiment**

Read email tone:
- Positive indicators: "excited", "love", "great", "thank you", "appreciate"
- Negative indicators: "problem", "issue", "concerned", "unhappy", "urgent"
- Neutral: Standard business tone

Classify as: **positive**, **neutral**, or **negative**

**Step E: Generate Summary**

Create 1-2 sentence summary of email intent:
```
Example: "John from TechStartup is inquiring about Q4 marketing services and partnership opportunities."
```

**Step F: Mark as Processed**

Call: convex mutation emails.markProcessed({
  orgId: "k57akqzf14r07d9q3pbf9kebvn7v7929",
  emailId: "email_id_from_step_1",
  contactId: "contact_id_from_step_b",
  intents: ["inquiry", "partnership"],
  sentiment: "positive",
  summary: "John inquiring about Q4 partnership"
})

**Step G: Update Contact**

If this is a NEW interaction, update:
```
Call: convex mutation contacts.updateAiScore({
  orgId: "k57akqzf14r07d9q3pbf9kebvn7v7929",
  contactId: "contact_id",
  score: 75  // Increase score based on engagement
})

Call: convex mutation contacts.addNote({
  orgId: "k57akqzf14r07d9q3pbf9kebvn7v7929",
  contactId: "contact_id",
  note: "Email from John: Inquiring about Q4 partnership. Sentiment: positive. Intents: inquiry, partnership"
})
```

**Step H: Log Audit Event**

Call: convex mutation system.logAudit({
  orgId: "k57akqzf14r07d9q3pbf9kebvn7v7929",
  action: "email_processed",
  resource: "email",
  resourceId: "email_id",
  agent: "email-agent",
  details: JSON.stringify({
    from: "john@techstartup.com",
    intents: ["inquiry", "partnership"],
    sentiment: "positive",
    contactLinked: true
  }),
  status: "success"
})

### Error Handling

If something fails:
```
Call: convex mutation system.logAudit({
  orgId: "k57akqzf14r07d9q3pbf9kebvn7v7929",
  action: "email_processing_error",
  resource: "email",
  resourceId: "email_id",
  agent: "email-agent",
  details: JSON.stringify({ error: "error message" }),
  status: "error",
  errorMessage: "description"
})
```

Then continue to next email (don't stop).

## Summary Output

After processing all emails, provide:
```
✅ Email Processing Complete

Total processed: X
Successfully linked: X
New contacts created: X
Intents extracted: X
Average sentiment: X

Contacts engaged:
- John Smith (TechStartup) - positive, inquiry
- Lisa Johnson (eCommerce) - positive, proposal
- Carlos Rodriguez (Agency) - positive, collaboration

Next steps:
1. Review high-priority contacts (positive sentiment + inquiry)
2. Generate followup emails for warm leads
3. Schedule meetings with decision-makers
```

## Key Points

- **Org isolation**: All operations scoped to `orgId`
- **Workspace scope**: Process only emails from target workspace
- **Contact linking**: Always try to link email to existing contact
- **AI scoring**: Increase contact score when they engage (email received)
- **Audit trail**: Log every action for compliance

---

## Example: Processing One Email

**Input Email:**
```
From: john@techstartup.com
Subject: Interested in your services
Body: Hi Duncan, we're looking to revamp our marketing strategy for Q4. Would love to chat about partnership opportunities.
```

**Agent Process:**

1. ✅ Extract sender: `john@techstartup.com`
2. ✅ Query contact: Found "John Smith" in contacts
3. ✅ Extract intents: `["inquiry", "partnership"]`
4. ✅ Analyze sentiment: `"positive"` (enthusiastic tone)
5. ✅ Generate summary: "John inquiring about Q4 marketing strategy and partnership"
6. ✅ Mark email processed with contact link
7. ✅ Increase contact AI score from 68 → 78
8. ✅ Add note with timestamp and details
9. ✅ Log audit event with full context

**Result:**
- Contact updated with fresh interaction data
- Audit trail shows agent processed email
- Contact now appears in "high-value prospects" due to increased score

Related Skills

agent-email-cli

242
from aiskillstore/marketplace

Operate the agent-email CLI to create disposable inboxes, poll for new mail, retrieve full message details, and manage local mailbox profiles. Use when the user needs terminal-based email inbox access for LLM or agent automation workflows.

email-systems

242
from aiskillstore/marketplace

Email has the highest ROI of any marketing channel. $36 for every $1 spent. Yet most startups treat it as an afterthought - bulk blasts, no personalization, landing in spam folders. This skill covers transactional email that works, marketing automation that converts, deliverability that reaches inboxes, and the infrastructure decisions that scale. Use when: keywords, file_patterns, code_patterns.

react-email

242
from aiskillstore/marketplace

Use when creating HTML email templates with React components - welcome emails, password resets, notifications, order confirmations, newsletters, or transactional emails.

email-composer

242
from aiskillstore/marketplace

Draft professional emails for various contexts including business, technical, and customer communication. Use when the user needs help writing emails or composing professional messages.

email-marketing-bible

242
from aiskillstore/marketplace

Comprehensive, data-backed email marketing knowledge base. 908 sources, 4,798 insights. Use when reviewing email setups, building automation flows, diagnosing deliverability, writing email copy, selecting platforms, or pulling benchmarks. Covers strategy, flows, deliverability, copywriting, segmentation, compliance, cold email, and 19 industry playbooks.

email-sequence

242
from aiskillstore/marketplace

When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," or "lifecycle emails." For in-app onboarding, see onboarding-cro.

cold-email

242
from aiskillstore/marketplace

Write B2B cold emails and follow-up sequences that get replies. Use when the user wants to write cold outreach emails, prospecting emails, cold email campaigns, sales development emails, or SDR emails. Also use when the user mentions "cold outreach," "prospecting email," "outbound email," "email to leads," "reach out to prospects," "sales email," "follow-up email sequence," "nobody's replying to my emails," or "how do I write a cold email." Covers subject lines, opening lines, body copy, CTAs, personalization, and multi-touch follow-up sequences. For warm/lifecycle email sequences, see email-sequence. For sales collateral beyond emails, see sales-enablement.

email-assistant

242
from aiskillstore/marketplace

User asks to read, check, or manage emails - User asks to reply to or send an email - User asks to draft an email response

email-notify

242
from aiskillstore/marketplace

Send SMTP email notifications after Codex completes a task. Use when one Codex or Claude run is finished, or when you need to notify on task completion with device name, project name, status, and summary via email.

email-handler

242
from aiskillstore/marketplace

Create and send transactional emails using React Email. Covers templates, layout integration, and sending logic.

email

242
from aiskillstore/marketplace

Email operations skill for sending, fetching, and reading emails via IMAP/SMTP. Uses curl with OpenSSL/LibreSSL for reliable TLS compatibility with Tencent Enterprise Mail and other providers. Credentials are securely stored in macOS Keychain.

azure-quotas

242
from aiskillstore/marketplace

Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".

DevOps & Infrastructure