email-outreach-run
Automatic email outreach agent run
What this skill does
# Email Outreach Agent - Run Skill > Send mass email campaigns with personalization and approval workflow ## When to use - User wants to send email outreach campaign - "send emails to [segment]" - "email outreach to new leads" - "send training reminder to participants" ## Prerequisites 1. Gmail API authenticated (`google-auth` skill if needed) 2. CRM data available (`sales/crm/`) 3. Template or AI mode ## How to execute ### Step 1: Determine campaign type **CRM Segment Mode**: ```bash cd $AGENTS_PATH/email-outreach python3 email-outreach_agent.py \ --segment "stage=new AND product_id=prod-labeling" \ --template templates/cold_outreach.txt ``` **Manual CSV Mode**: ```bash python3 email-outreach_agent.py \ --recipients /path/to/recipients.csv \ --template templates/training_reminder.txt ``` **AI-Generated Mode**: ```bash python3 email-outreach_agent.py \ --segment "stage=qualified" \ --ai-mode \ --subject "Following up on our conversation" ``` ### Step 2: Always dry-run first ```bash python3 email-outreach_agent.py \ --segment "..." \ --template templates/cold_outreach.txt \ --dry-run ``` ### Step 3: Review approval prompt Agent shows: - Number of recipients - Subject line - First 3 sample emails Options: - `[A]` - Approve and send - `[T]` - Send test to [email protected] - `[C]` - Cancel (save draft) ### Step 4: Check results ```bash # Summary ls -lh $GOOGLE_TOOLS_PATH/data/email_outreach_summaries/ # Agent log cat $GOOGLE_TOOLS_PATH/data/email_outreach_log.json | jq '.[-1]' # CRM activities tail -10 $CRM_PATH/activities.csv ``` ## Templates Available templates in `agents/email-outreach/templates/`: - `cold_outreach.txt` - For new leads - `follow_up.txt` - Follow-up to previous contact - `training_reminder.txt` - Event/training reminders **Placeholders**: - `{name}` - Full name - `{first_name}` - First name - `{last_name}` - Last name - `{company}` / `{company_name}` - Company name - `{role}` - Job role ## Segment Queries Filter CRM leads: ```bash # New leads for specific product --segment "stage=new AND product_id=prod-labeling" # Qualified leads --segment "stage=qualified" # Custom filters --segment "stage=new AND product_id=prod-training" ``` ## Rate Limits (OWNER DECISIONS) - **Max**: 50 emails/day - **Rate**: 1-2 sec between emails - **Cooldown**: 7 days (same person+product) ## Error Handling | Error | Action | |-------|--------| | "Gmail credentials not found" | Run `google-auth` skill | | "Daily limit reached" | Wait until tomorrow | | "No recipients match" | Check segment query, verify CRM data | | "Invalid email" | Check CSV, emails will be skipped | ## Manual CSV Format ```csv email,first_name,last_name,company_name [email protected],John,Doe,Example Corp [email protected],Jane,Smith,Test Inc ``` Required: `email` Optional: `first_name`, `last_name`, `company_name`, `person_id`, `product_id` ## Common Use Cases ### Use Case 1: Cold outreach to new leads ```bash python3 email-outreach_agent.py \ --segment "stage=new AND product_id=prod-labeling" \ --template templates/cold_outreach.txt \ --campaign-name "Q1 Cold Outreach - Labeling" ``` ### Use Case 2: Training reminder (manual list) ```bash # Create CSV with participants cat > participants.csv << 'EOF' email,first_name [email protected],John [email protected],Jane EOF python3 email-outreach_agent.py \ --recipients participants.csv \ --template templates/training_reminder.txt ``` ### Use Case 3: AI-generated follow-up ```bash python3 email-outreach_agent.py \ --segment "stage=qualified" \ --ai-mode \ --subject "Following up on data labeling project" ``` ## Testing ```bash # Run unit tests cd $AGENTS_PATH/email-outreach python3 test_email_outreach.py # Dry-run test python3 email-outreach_agent.py \ --recipients test_data/test_recipients.csv \ --template test_data/test_template.txt \ --dry-run ``` ## Output - **Summary**: `google-tools/data/email_outreach_summaries/YYYY-MM-DD.md` - **Log**: `google-tools/data/email_outreach_log.json` - **Activities**: `sales/crm/activities.csv` (appended) - **Drafts** (on cancel): `google-tools/data/email_outreach_drafts/` ## Integration with other skills - **Before**: `google-auth` (if Gmail auth needed) - **After**: Monitor responses via email-agent - **Future**: `change-review` for CRM updates ## Troubleshooting ### Test send not arriving ```bash # Check Gmail API python3 -c "from google.oauth2.credentials import Credentials; print(Credentials.from_authorized_user_file('$GOOGLE_TOOLS_PATH/token.json'))" # Re-auth if needed # Run google-auth skill ``` ### Template placeholders not being filled ```bash # Check CSV has the required columns head -1 recipients.csv # Placeholders case-sensitive: {name} not {Name} ``` ### Daily limit reached ```bash # Check send log cat $GOOGLE_TOOLS_PATH/data/email_send_log.json | jq '[.[] | select(.date == "2026-02-12")] | length' # Wait until tomorrow or increase limit in config.json ``` ## Owner Decisions Applied ✅ Human approval required for ALL outreach ✅ Rate limit: 50/day max ✅ Logs to CRM activities ✅ Dry-run flag mandatory for testing ✅ Uses `claude -p --model haiku` (not API key) ✅ Idempotent (re-run safe) ## Related Files - Agent: `$AGENTS_PATH/email-outreach/email-outreach_agent.py` - Config: `$AGENTS_PATH/email-outreach/config.json` - Templates: `$AGENTS_PATH/email-outreach/templates/` - Spec: `$AGENTS_PATH/specs/email-outreach.spec.md` ## Related skills - `google-auth` - Gmail API auth - `telegram-send` - Parallel outreach channel - `add-lead` - Add new contacts - `log-activity` - Manual activity logging
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.