← All runbooks
gooseworks-ai / composites-newsletter-monitor

Newsletter Monitor

Convert the newsletter-monitor skill into a repeatable AgentMail newsletter signal scan. Scan an AgentMail inbox for newsletter signals using configurable keyword campaigns. Extracts matched keywords, context snippets, and company mentions from incoming…

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

Deploy Newsletter Monitor 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

6 steps · start to finish.

  1. 1
    Step 1

    Environment Setup

    set -euo pipefail
    
    RESULTS_DIR="${RESULTS_DIR:-/app/results}"
    mkdir -p "$RESULTS_DIR" "$RESULTS_DIR/work"
    
    if [ -z "${{AGENTMAIL_API_KEY:-}}" ]; then
      echo "ERROR: AGENTMAIL_API_KEY is not set"
      exit 1
    fi
    
    command -v python3 >/dev/null || {{ echo "ERROR: python3 not installed"; exit 1; }}
    command -v pip3 >/dev/null || {{ echo "ERROR: pip3 not installed"; exit 1; }}
    
    pip3 install agentmail python-dotenv
    
  2. 2
    Step 2

    Resolve Scan Parameters

    Resolve orchestration inputs into CLI arguments. Only include optional flags when values are provided so defaults from the source skill remain intact.

  3. 3
    Step 3

    Run Newsletter Scan

    Run both JSON and summary modes. The JSON output is used for downstream processing and validation; the summary output is kept for human review.

  4. 4
    Step 4

    Validate Outputs

    Validate that the scan produced parseable JSON and that the required summary artifacts exist.

  5. 5
    Step 5

    Iterate on Errors (max 3 rounds)

    If setup, scanning, or output validation fails, retry up to max 3 rounds after applying the relevant correction.

  6. 6
    Step 6

    Write Reports

    set -euo pipefail