{
  "title": "n8n Workflow Opportunities – Templates, Nodes & View Changes",
  "type": "object",
  "schemaVersion": 1,
  "properties": {
    "mode": {
      "title": "Collection mode",
      "type": "string",
      "description": "Search a bounded first-page window or monitor exact public template IDs.",
      "enum": [
        "search",
        "watchlist"
      ],
      "enumTitles": [
        "Discover templates",
        "Watch exact template IDs"
      ],
      "default": "search",
      "prefill": "search"
    },
    "search": {
      "title": "Search phrase",
      "type": "string",
      "description": "Used in search mode by the official template search. Search order belongs to n8n, not a guaranteed popularity ranking.",
      "default": "ai",
      "prefill": "ai",
      "minLength": 1,
      "maxLength": 120,
      "editor": "textfield"
    },
    "templateIds": {
      "title": "Public template IDs",
      "type": "array",
      "description": "Required in watchlist mode, for example 6270. IDs from the public template library; no private workflow IDs.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "default": [],
      "prefill": [],
      "maxItems": 20
    },
    "searchLimit": {
      "title": "Search window size",
      "type": "integer",
      "description": "Ask for this many first-page results. Completion covers this selected window, not the full catalog. Filters apply after retrieval.",
      "default": 3,
      "prefill": 3,
      "minimum": 1,
      "maximum": 100
    },
    "requiredNodeTypes": {
      "title": "Required integrations (all must match)",
      "type": "array",
      "description": "Complete public node type names, for example @n8n/n8n-nodes-langchain.agent or n8n-nodes-base.slack.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "default": [],
      "prefill": [],
      "maxItems": 10
    },
    "excludedNodeTypes": {
      "title": "Excluded integrations",
      "type": "array",
      "description": "Exclude templates containing any listed complete node type name.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "default": [],
      "prefill": [],
      "maxItems": 10
    },
    "keywords": {
      "title": "Title/description keywords (any match)",
      "type": "array",
      "description": "Optional case-insensitive literal terms; matching terms are included in each output row.",
      "editor": "stringList",
      "items": {
        "type": "string"
      },
      "default": [],
      "prefill": [],
      "maxItems": 10
    },
    "minViews": {
      "title": "Minimum public views",
      "type": "integer",
      "description": "Filter using the published cumulative view counter. Views are not unique users, purchases or successful workflow runs.",
      "default": 0,
      "prefill": 0,
      "minimum": 0,
      "maximum": 1000000000
    },
    "maxResults": {
      "title": "Maximum saved observations",
      "type": "integer",
      "description": "Cap real output rows. A smaller cap than the matching selected window marks coverage incomplete and preserves the previous baseline.",
      "default": 3,
      "prefill": 3,
      "minimum": 1,
      "maximum": 100
    },
    "comparePrevious": {
      "title": "Compare saved observations",
      "type": "boolean",
      "description": "First complete run establishes history. Later complete runs add exact changes; incomplete source/output/spending-limited runs do not advance it.",
      "default": false,
      "prefill": false
    },
    "onlyChanges": {
      "title": "Return only new or changed observations",
      "type": "boolean",
      "description": "Enables comparison. A valid unchanged run can return zero rows. No missing-item removal inference.",
      "default": false,
      "prefill": false
    },
    "snapshotName": {
      "title": "Watchlist history name",
      "type": "string",
      "description": "Use a stable name for the same scope. Letters, numbers, underscore or hyphen; 1–80 characters.",
      "default": "default",
      "prefill": "default",
      "pattern": "^[-\\w]{1,80}$",
      "editor": "textfield"
    },
    "maxRunSeconds": {
      "title": "Run time budget (seconds)",
      "type": "integer",
      "description": "Requests and pacing honor the remaining time. Time-limited runs preserve prior history.",
      "default": 120,
      "prefill": 120,
      "minimum": 30,
      "maximum": 120
    }
  },
  "required": []
}
