Skip to main content

Overview

Legal and compliance teams need to monitor third-party terms of service, license agreements, and regulatory dashboards for changes. Missing a policy update can mean compliance violations or unexpected contract terms. Refrain automates these checks by periodically visiting target pages, extracting key content, and alerting your team via Slack when changes are detected. Approval gates ensure that flagged changes are reviewed by a human before any follow-up action.

Example runbook

name: tos-change-monitor
url: https://vendor.example.com/terms
steps:
  - action: wait
    selector: ".terms-content"
  - action: extract
    selector: ".terms-content"
    capture: current_terms
  - action: extract
    selector: ".last-updated"
    capture: updated_date
    requiresConfirmation: true
    confirmationMessage: "Terms last updated: {{ updated_date }}. Review and approve to continue."
  - action: export
    format: csv
    fields:
      - name: url
        value: "https://vendor.example.com/terms"
      - name: updated_date
        value: "{{ updated_date }}"
      - name: content_snippet
        value: "{{ current_terms }}"

Generate and execute

1

Generate the runbook

npx @refrainai/cli generate -- \
  --url https://vendor.example.com/terms \
  --goal "Extract the terms of service content and last updated date" \
  --context ./context.md \
  --output ./tos-monitor.yaml
2

Execute with Slack approval

npx @refrainai/cli execute -- \
  --runbook ./tos-monitor.yaml \
  --approval-mode slack \
  --notify slack
3

Schedule weekly checks

Use the Web Console scheduler to run the compliance check weekly.

Why this works well

  • Change detection — Extract and compare page content on every run.
  • Approval gates — Require human review before proceeding when changes are detected.
  • Audit trail — Every run produces an exportable report with timestamps.
  • Self-healing — Page layout changes don’t break the monitoring flow.

What’s next