Newsletter monitor
Scan an AgentMail inbox for newsletter signals using configurable keyword campaigns.
How to use it
- Hit Copy SKILL.md — or use the Claude Code line below to get every file.
- Claude: ⋯ → Download .md, then Customize → Skills → Add → Upload skill.
ChatGPT: make a Project and paste it into Instructions.
Neither? Paste it at the top of a new chat — it works for that chat. - Describe your job in plain words. The AI follows the skill from there.
npx degit gooseworks-ai/goose-skills/skills/monitoring/composites/newsletter-monitor#main ~/.claude/skills/newsletter-monitorFor one project only, change the path to .claude/skills/newsletter-monitor. This skill also uses campaigns.json — copying SKILL.md alone won't be enough. See the folder on GitHub.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Show the full text77 lines
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
# 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 [email protected] |
--limit N |
Max messages to fetch | 100 |
Output
JSON mode (default)
Returns an array of matched messages with:
message_id,from,subject,datematched_campaigns- which campaigns triggeredmatched_keywords- specific keywords foundcontext_snippets- 200-char window around each matchcompanies_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
| 1 | |
| 2 | name newsletter-monitor |
| 3 | description > |
| 4 | Scan an AgentMail inbox for newsletter signals using configurable keyword |
| 5 | campaigns. Extracts matched keywords, context snippets, and company mentions |
| 6 | from incoming emails. Use for monitoring accounting industry newsletters |
| 7 | for buying signals like acquisitions, migrations, and staffing news. |
| 8 | |
| 9 | |
| 10 | # Newsletter Monitor |
| 11 | |
| 12 | 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. |
| 13 | |
| 14 | ## Quick Start |
| 15 | |
| 16 | |
| 17 | # Set your API key |
| 18 | export AGENTMAIL_API_KEY="your_key_here" |
| 19 | |
| 20 | # Scan inbox with all campaigns (summary view) |
| 21 | python3 skills/newsletter-monitor/scripts/scan_newsletters.py --output summary |
| 22 | |
| 23 | # Scan specific campaign, last 7 days |
| 24 | python3 skills/newsletter-monitor/scripts/scan_newsletters.py --campaign acquisitions --days 7 --output summary |
| 25 | |
| 26 | # JSON output for downstream processing |
| 27 | python3 skills/newsletter-monitor/scripts/scan_newsletters.py --output json --limit 50 |
| 28 | |
| 29 | |
| 30 | ## Dependencies |
| 31 | |
| 32 | |
| 33 | pip3 install agentmail python-dotenv |
| 34 | |
| 35 | |
| 36 | ## Configuration |
| 37 | |
| 38 | Keyword campaigns are defined in `config/campaigns.json`. Each campaign has a description and a list of keywords for case-insensitive substring matching. |
| 39 | |
| 40 | Built-in campaigns: |
| 41 | **acquisitions** - CPA firm M&A activity |
| 42 | **sage_intacct** - Sage Intacct migration and implementation signals |
| 43 | **staffing** - Accounting talent and staffing challenges |
| 44 | **technology** - Accounting technology adoption |
| 45 | |
| 46 | ## CLI Options |
| 47 | |
| 48 | | Flag | Description | Default | |
| 49 | |------|-------------|---------| |
| 50 | | `--campaign NAME` | Run only a specific campaign | All campaigns | |
| 51 | | `--days N` | Only scan emails from last N days | No limit | |
| 52 | | `--keywords "a,b,c"` | Custom keywords (overrides campaigns) | Use campaigns.json | |
| 53 | | `--output json\|summary` | Output format | `json` | |
| 54 | | `--inbox ADDRESS` | Override inbox address | `AGENTMAIL_INBOX` env or `[email protected]` | |
| 55 | | `--limit N` | Max messages to fetch | `100` | |
| 56 | |
| 57 | ## Output |
| 58 | |
| 59 | ### JSON mode (default) |
| 60 | |
| 61 | Returns an array of matched messages with: |
| 62 | `message_id`, `from`, `subject`, `date` |
| 63 | `matched_campaigns` - which campaigns triggered |
| 64 | `matched_keywords` - specific keywords found |
| 65 | `context_snippets` - 200-char window around each match |
| 66 | `companies_mentioned` - capitalized multi-word phrases near matches |
| 67 | |
| 68 | ### Summary mode |
| 69 | |
| 70 | Human-readable report showing matched emails grouped by campaign with snippets and detected companies. |
| 71 | |
| 72 | ## Downstream Skills |
| 73 | |
| 74 | When newsletter signals are found, chain to: |
| 75 | **company-contact-finder** - look up contacts at mentioned companies |
| 76 | **accounting-news-monitor** - combine with direct news monitoring for fuller signal coverage |
| 77 |