# Newsletter monitor Human Guide

## What This Is For
Scan an AgentMail inbox for newsletter signals using configurable keyword campaigns. It gives the agent a clearer input/output frame for email marketing: what context to ask for, what decisions to make, and what usable artifact to return.

Use this as a human-readable version of the Newsletter monitor agent skill. It is meant for marketers, operators, founders, and other non-coders who want the workflow without reading agent-specific implementation instructions.

## When To Use This
- Use this when you need a repeatable process for newsletter monitor.
- Use this when the task needs judgment, examples, constraints, or a clear output format rather than a one-off prompt.
- Use this when you want to hand an AI assistant enough context to produce a usable marketing artifact.

## When Not To Use This
- Do not use this when you only need a quick factual answer.
- Do not use this when the work depends on private data you cannot share with the assistant.
- Do not use this as a replacement for legal, compliance, financial, or medical review.

## What You Need Before Starting
- The goal or business outcome you want.
- The audience, customer segment, or market context.
- Any source material the assistant should respect, such as notes, briefs, examples, URLs, or brand guidance.
- Constraints such as tone, length, channel, deadline, region, or approval requirements.
- A clear definition of what a good final answer should look like.

## Step-By-Step Workflow
1. State the job clearly: "Use the Newsletter monitor guide to help me with..."
2. Add context: audience, goal, offer, channel, source material, and constraints.
3. Ask the assistant to identify missing inputs before producing the final output.
4. Have the assistant follow the skill-specific guidance below.
5. Review the result against the final checklist and ask for revisions where needed.

## Skill-Specific Guidance
- **acquisitions** - CPA firm M&A activity
- **sage_intacct** - Sage Intacct migration and implementation signals
- **staffing** - Accounting talent and staffing challenges
- **technology** - Accounting technology adoption
- `message_id`, `from`, `subject`, `date`
- `matched_campaigns` - which campaigns triggered
- `matched_keywords` - specific keywords found
- `context_snippets` - 200-char window around each match
- `companies_mentioned` - capitalized multi-word phrases near matches
- **company-contact-finder** - look up contacts at mentioned companies
- **accounting-news-monitor** - combine with direct news monitoring for fuller signal coverage

## Decision Points And Nuance
The original skill emphasizes: Quick Start, Dependencies, Configuration, CLI Options, Output, JSON mode (default), Summary mode, Downstream Skills.

Use these questions to steer the work:
- What is the intended audience or buyer?
- What source material must be preserved?
- What should the assistant optimize for: clarity, persuasion, accuracy, speed, creativity, or conversion?
- What examples represent the desired quality bar?
- What should the assistant avoid?

## Common Mistakes
- Starting without a clear audience or goal.
- Asking for a final artifact before sharing examples or constraints.
- Accepting a generic first draft without checking it against the intended use.

## Copy-And-Paste Prompt
```text
Use the Newsletter monitor human guide.

My goal:
[Describe the business outcome]

Audience:
[Describe who this is for]

Context and source material:
[Paste notes, examples, links, or existing copy]

Constraints:
[Tone, length, channel, timeline, must-include items, must-avoid items]

Before producing the final output, ask me for any missing information that would materially improve the result.
```

## Final Checklist
- [ ] The output matches the original goal.
- [ ] The audience and context are reflected in the answer.
- [ ] Important constraints and source material were preserved.
- [ ] The assistant made the relevant decisions explicit.
- [ ] The final artifact is ready to use, review, or hand to the next person.

## Source
This guide was generated from the gooseworks-ai/goose-skills skill entry for `newsletter-monitor`.

## Source Skill Notes
These notes preserve the nuance from the original skill. Use them as supporting reference when the workflow above feels too generic.

# Newsletter Monitor

Scan an AgentMail inbox for newsletter signals using configurable keyword campaigns. Designed for monitoring accounting industry newsletters for buying signals like acquisitions, Sage Intacct migrations, staffing challenges, and technology adoption.

## Quick Start

```bash
# Set your API key
export AGENTMAIL_API_KEY="your_key_here"

# Scan inbox with all campaigns (summary view)
python3 skills/newsletter-monitor/scripts/scan_newsletters.py --output summary

# Scan specific campaign, last 7 days
python3 skills/newsletter-monitor/scripts/scan_newsletters.py --campaign acquisitions --days 7 --output summary

# JSON output for downstream processing
python3 skills/newsletter-monitor/scripts/scan_newsletters.py --output json --limit 50
```

## Dependencies

```
pip3 install agentmail python-dotenv
```

## Configuration

Keyword campaigns are defined in `config/campaigns.json`. Each campaign has a description and a list of keywords for case-insensitive substring matching.

Built-in campaigns:
- **acquisitions** - CPA firm M&A activity
- **sage_intacct** - Sage Intacct migration and implementation signals
- **staffing** - Accounting talent and staffing challenges
- **technology** - Accounting technology adoption

## CLI Options

| Flag | Description | Default |
|------|-------------|---------|
| `--campaign NAME` | Run only a specific campaign | All campaigns |
| `--days N` | Only scan emails from last N days | No limit |
| `--keywords "a,b,c"` | Custom keywords (overrides campaigns) | Use campaigns.json |
| `--output json\|summary` | Output format | `json` |
| `--inbox ADDRESS` | Override inbox address | `AGENTMAIL_INBOX` env or `supergoose@agentmail.to` |
| `--limit N` | Max messages to fetch | `100` |

## Output

### JSON mode (default)

Returns an array of matched messages with:
- `message_id`, `from`, `subject`, `date`
- `matched_campaigns` - which campaigns triggered
- `matched_keywords` - specific keywords found
- `context_snippets` - 200-char window around each match
- `companies_mentioned` - capitalized multi-word phrases near matches

### Summary mode

Human-readable report showing matched emails grouped by campaign with snippets and detected companies.

## Downstream Skills

When newsletter signals are found, chain to:
- **company-contact-finder** - look up contacts at mentioned companies
- **accounting-news-monitor** - combine with direct news monitoring for fuller signal coverage
