Monitor promotional emails from agentmail.to inbox, learn user purchase preferences from order confirmations, and deliver daily personalized deal summaries to Slack. Also supports manual preference tuning. Use when asked about deals, promotions, coupons, discounts, sale alerts, deal summary, deal digest, shopping preferences, or "what deals do I have". Triggers on "deals", "promotions", "coupons", "digest", "sale alerts", "shopping preferences", "tune my preferences", "what's on sale".
Monitor promo emails, learn shopping preferences, deliver daily personalized deal summaries.
Requires agentmail.to config from the account-creator skill. Read ../account-creator/references/config.md for API key and email.
Config file: references/config.json
{
"agentmail_api_key": "<from account-creator>",
"inbox_email": "[email protected]",
"digest_frequency": "daily",
"digest_time": "09:00",
"digest_channel": "slack",
"timezone": "America/Los_Angeles"
}
If references/config.json doesn't exist or is incomplete, read the agentmail config from ../account-creator/references/config.md and create it.
Run every 6 hours via cron or heartbeat:
python3 scripts/ingest_emails.py <api_key> <inbox_email> --state references/ingest-state.json
This script:
references/deals-active.jsonreferences/ingest-state.json with last-seen message IDWhen order confirmation emails are detected during ingestion:
python3 scripts/update_preferences.py references/user-preferences.json --order '<order_json>'
Extracts: brand, product category, price, item details. Updates weighted preference scores in references/user-preferences.json.
When user says things like "I like running shoes", "ignore apparel", "I prefer Nike":
python3 scripts/update_preferences.py references/user-preferences.json --boost "category:running-shoes" --weight 10
python3 scripts/update_preferences.py references/user-preferences.json --suppress "category:apparel"
python3 scripts/update_preferences.py references/user-preferences.json --boost "brand:nike" --weight 8
Supported commands:
--boost "type:value" with --weight N — increase preference score--suppress "type:value" — add to suppressed list (will be filtered out)--unsuppress "type:value" — remove from suppressed list--show — display current preferencespython3 scripts/score_deals.py references/deals-active.json references/user-preferences.json
Scores each active deal by:
Output: ranked JSON list of deals with relevance scores.
python3 scripts/format_digest.py references/deals-active.json references/user-preferences.json
Generates a formatted summary. Send via Slack using the message tool:
🛍️ Deal Digest — March 28
🔥 Top Picks for You:
• HOKA: 15% off Clifton styles (code: MEMBER15) — expires Apr 2
• Nike: 30% off running shoes — ends this weekend
📬 Other Deals:
• Allbirds: Free shipping $100+
• Victoria's Secret: BOGO 50% off
🧠 Based on: running shoes, HOKA, Nike preferences
Set up two cron jobs:
Email ingestion — every 6 hours:
schedule: { kind: "cron", expr: "0 */6 * * *", tz: "America/Los_Angeles" }ingest_emails.py, then update_preferences.py for any orders foundDaily digest — every day at 9 AM:
schedule: { kind: "cron", expr: "0 9 * * *", tz: "America/Los_Angeles" }score_deals.py, then format_digest.py, send result to Slackreferences/config.json — skill configurationreferences/deals-active.json — currently active deals (auto-managed, expire old ones)references/user-preferences.json — learned + manually tuned preferencesreferences/ingest-state.json — last poll timestamp/message IDDeals older than 30 days or past their expiration date are automatically pruned during ingestion.