← All runbooks
gooseworks-ai / composites-newsletter-signal-scanner

Newsletter Signal Scanner

Subscribe to and scan industry newsletters for buying signals, competitor mentions, ICP pain-language, brand mentions, and market shifts. This runbook uses an AgentMail inbox as the collection point, applies keyword campaigns to incoming newsletter emails, extracts concise signal

agent codexmodel gpt-5.5snapshot python312-uveval programmatic10 stepsv1.0.0

Deploy Newsletter Signal Scanner to your jetty.io

One-click installs this runbook into a collection on your Jetty account. You can run it from the Spot dashboard, schedule it, or pipe inputs in via the API.

The shape of the run

10 steps · start to finish.

  1. 1
    Step 1

    Environment Setup

    Verify the results directory, required secret, and Python dependencies before scanning.

    mkdir -p /app/results
    
    if [ -z "${AGENTMAIL_API_KEY:-}" ]; then
      echo "ERROR: AGENTMAIL_API_KEY is not set"
      exit 1
    fi
    
    python3 - <<'PY'
    import importlib.util
    missing = [pkg for pkg in ["agentmail"] if importlib.util.find_spec(pkg) is None]
    if missing:
        raise SystemExit("Missing packages: " + ", ".join(missing) + ". Install with: pip3 install agentmail")
    print("Environment ready")
    PY
    

    If setup fails, write /app/results/validation_report.json with the setup stage marked passed=false and stop.

  2. 2
    Step 2

    Intake and Campaign Configuration

    Collect the monitoring inputs before scanning:

  3. 3
    Step 3

    Subscribe and Accumulate Newsletter Mail

    For first-time setup, subscribe the AgentMail address to the selected newsletters:

  4. 4
    Step 4

    Fetch Newsletter Emails

    Fetch emails from the configured inbox since the last scan date. Filter to known newsletter senders using configured sender domains or names.

  5. 5
    Step 5

    Apply Keyword Campaigns

    For each newsletter email, scan every configured keyword campaign. Keep only emails with at least one keyword match.

  6. 6
    Step 6

    Extract Signal Snippets

    Normalize each match into a concise snippet with source context:

  7. 7
    Step 7

    Write Digest

    Write the digest to `/app/results/newsletter-signals-[YYYY-MM-DD].md` using this structure:

  8. 8
    Step 8

    Scheduling

    For weekly operation, schedule the scanner before the team's recurring planning meeting.

  9. 9
    Step 9

    Iterate on Errors (max 3 rounds)

    If setup, inbox fetch, parsing, matching, or digest validation fails, run at most 3 rounds of targeted correction:

  10. 10
    Step 10

    Final Checklist

    Run this verification script before completing the run: