{
  "schemaVersion": "1.0",
  "item": {
    "slug": "servicenow",
    "name": "ServiceNow",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/onlyflowstech/servicenow",
    "canonicalUrl": "https://clawhub.ai/onlyflowstech/servicenow",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/servicenow",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=servicenow",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/sn.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/servicenow"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/servicenow",
    "agentPageUrl": "https://openagent3.xyz/skills/servicenow/agent",
    "manifestUrl": "https://openagent3.xyz/skills/servicenow/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/servicenow/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "ServiceNow Skill",
        "body": "Query and manage records on any ServiceNow instance via the REST Table API."
      },
      {
        "title": "Setup",
        "body": "Set environment variables for your ServiceNow instance:\n\nexport SN_INSTANCE=\"https://yourinstance.service-now.com\"\nexport SN_USER=\"your_username\"\nexport SN_PASSWORD=\"your_password\"\n\nAll tools below use scripts/sn.sh which reads these env vars."
      },
      {
        "title": "sn_query — Query any table",
        "body": "bash scripts/sn.sh query <table> [options]\n\nOptions:\n\n--query \"<encoded_query>\" — ServiceNow encoded query (e.g. active=true^priority=1)\n--fields \"<field1,field2>\" — Comma-separated fields to return\n--limit <n> — Max records (default 20)\n--offset <n> — Pagination offset\n--orderby \"<field>\" — Sort field (prefix with - for descending)\n--display <true|false|all> — Display values mode\n\nExamples:\n\n# List open P1 incidents\nbash scripts/sn.sh query incident --query \"active=true^priority=1\" --fields \"number,short_description,state,assigned_to\" --limit 10\n\n# All users in IT department\nbash scripts/sn.sh query sys_user --query \"department=IT\" --fields \"user_name,email,name\"\n\n# Recent change requests\nbash scripts/sn.sh query change_request --query \"sys_created_on>=2024-01-01\" --orderby \"-sys_created_on\" --limit 5"
      },
      {
        "title": "sn_get — Get a single record by sys_id",
        "body": "bash scripts/sn.sh get <table> <sys_id> [options]\n\nOptions:\n\n--fields \"<field1,field2>\" — Fields to return\n--display <true|false|all> — Display values mode\n\nExample:\n\nbash scripts/sn.sh get incident abc123def456 --fields \"number,short_description,state,assigned_to\" --display true"
      },
      {
        "title": "sn_create — Create a record",
        "body": "bash scripts/sn.sh create <table> '<json_fields>'\n\nExample:\n\nbash scripts/sn.sh create incident '{\"short_description\":\"Server down\",\"urgency\":\"1\",\"impact\":\"1\",\"assignment_group\":\"Service Desk\"}'"
      },
      {
        "title": "sn_update — Update a record",
        "body": "bash scripts/sn.sh update <table> <sys_id> '<json_fields>'\n\nExample:\n\nbash scripts/sn.sh update incident abc123def456 '{\"state\":\"6\",\"close_code\":\"Solved (Permanently)\",\"close_notes\":\"Restarted service\"}'"
      },
      {
        "title": "sn_delete — Delete a record",
        "body": "bash scripts/sn.sh delete <table> <sys_id> --confirm\n\nThe --confirm flag is required to prevent accidental deletions."
      },
      {
        "title": "sn_aggregate — Aggregate queries",
        "body": "bash scripts/sn.sh aggregate <table> --type <TYPE> [options]\n\nTypes: COUNT, AVG, MIN, MAX, SUM\n\nOptions:\n\n--type <TYPE> — Aggregation type (required)\n--query \"<encoded_query>\" — Filter records\n--field \"<field>\" — Field to aggregate on (required for AVG/MIN/MAX/SUM)\n--group-by \"<field>\" — Group results by field\n--display <true|false|all> — Display values mode\n\nExamples:\n\n# Count open incidents by priority\nbash scripts/sn.sh aggregate incident --type COUNT --query \"active=true\" --group-by \"priority\"\n\n# Average reassignment count\nbash scripts/sn.sh aggregate incident --type AVG --field \"reassignment_count\" --query \"active=true\""
      },
      {
        "title": "sn_schema — Get table schema",
        "body": "bash scripts/sn.sh schema <table> [--fields-only]\n\nReturns field names, types, max lengths, mandatory flags, reference targets, and choice values.\n\nUse --fields-only for a compact field list."
      },
      {
        "title": "sn_batch — Bulk update or delete records",
        "body": "bash scripts/sn.sh batch <table> --query \"<encoded_query>\" --action <update|delete> [--fields '{\"field\":\"value\"}'] [--limit 200] [--confirm]\n\nPerforms bulk update or delete operations on all records matching a query. Runs in dry-run mode by default — shows how many records match without making changes. Pass --confirm to execute.\n\nOptions:\n\n--query \"<encoded_query>\" — Filter records to operate on (required)\n--action <update|delete> — Operation to perform (required)\n--fields '<json>' — JSON fields to set on each record (required for update)\n--limit <n> — Max records to affect per run (default 200, safety cap at 10000)\n--dry-run — Show match count only, no changes (default behavior)\n--confirm — Actually execute the operation (disables dry-run)\n\nExamples:\n\n# Dry run: see how many resolved incidents older than 90 days would be affected\nbash scripts/sn.sh batch incident --query \"state=6^sys_updated_on<javascript:gs.daysAgo(90)\" --action update\n\n# Bulk close resolved incidents (actually execute)\nbash scripts/sn.sh batch incident --query \"state=6^sys_updated_on<javascript:gs.daysAgo(90)\" --action update --fields '{\"state\":\"7\",\"close_code\":\"Solved (Permanently)\",\"close_notes\":\"Auto-closed by batch\"}' --confirm\n\n# Dry run: count orphaned test records\nbash scripts/sn.sh batch u_test_table --query \"u_status=abandoned\" --action delete\n\n# Delete orphaned records (actually execute)\nbash scripts/sn.sh batch u_test_table --query \"u_status=abandoned\" --action delete --limit 50 --confirm\n\nOutput (JSON summary):\n\n{\"action\":\"update\",\"table\":\"incident\",\"matched\":47,\"processed\":47,\"failed\":0}"
      },
      {
        "title": "sn_health — Instance health check",
        "body": "bash scripts/sn.sh health [--check <all|version|nodes|jobs|semaphores|stats>]\n\nChecks ServiceNow instance health across multiple dimensions. Default is --check all which runs every check.\n\nChecks:\n\nversion — Instance build version, date, and tag from sys_properties\nnodes — Cluster node status (online/offline) from sys_cluster_state\njobs — Stuck/overdue scheduled jobs from sys_trigger (state=ready, next_action > 30 min past)\nsemaphores — Active semaphores (potential locks) from sys_semaphore\nstats — Quick dashboard: active incidents, open P1s, active changes, open problems\n\nExamples:\n\n# Full health check\nbash scripts/sn.sh health\n\n# Just check version\nbash scripts/sn.sh health --check version\n\n# Check for stuck jobs\nbash scripts/sn.sh health --check jobs\n\n# Quick incident/change/problem dashboard\nbash scripts/sn.sh health --check stats\n\nOutput (JSON):\n\n{\n  \"instance\": \"https://yourinstance.service-now.com\",\n  \"timestamp\": \"2026-02-16T13:30:00Z\",\n  \"version\": {\"build\": \"...\", \"build_date\": \"...\", \"build_tag\": \"...\"},\n  \"nodes\": [{\"node_id\": \"...\", \"status\": \"online\", \"system_id\": \"...\"}],\n  \"jobs\": {\"stuck\": 0, \"overdue\": []},\n  \"semaphores\": {\"active\": 2, \"list\": []},\n  \"stats\": {\"incidents_active\": 54, \"p1_open\": 3, \"changes_active\": 12, \"problems_open\": 8}\n}"
      },
      {
        "title": "sn_attach — Manage attachments",
        "body": "# List attachments on a record\nbash scripts/sn.sh attach list <table> <sys_id>\n\n# Download an attachment\nbash scripts/sn.sh attach download <attachment_sys_id> <output_path>\n\n# Upload an attachment\nbash scripts/sn.sh attach upload <table> <sys_id> <file_path> [content_type]"
      },
      {
        "title": "Common Tables",
        "body": "TableDescriptionincidentIncidentschange_requestChange RequestsproblemProblemssc_req_itemRequested Items (RITMs)sc_requestRequestssys_userUserssys_user_groupGroupscmdb_ciConfiguration Itemscmdb_ci_serverServerskb_knowledgeKnowledge ArticlestaskTasks (parent of incident/change/problem)sys_choiceChoice list values"
      },
      {
        "title": "Encoded Query Syntax",
        "body": "ServiceNow encoded queries use ^ as AND, ^OR as OR:\n\nactive=true^priority=1 — Active AND P1\nactive=true^ORactive=false — Active OR inactive\nshort_descriptionLIKEserver — Contains \"server\"\nsys_created_on>=2024-01-01 — Created after date\nassigned_toISEMPTY — Unassigned\nstateIN1,2,3 — State is 1, 2, or 3\ncaller_id.name=John Smith — Dot-walk through references"
      },
      {
        "title": "Notes",
        "body": "All API calls use Basic Auth via SN_USER / SN_PASSWORD\nDefault result limit is 20 records; use --limit to adjust\nUse --display true to get human-readable values instead of sys_ids for reference fields\nThe script auto-detects whether SN_INSTANCE includes the protocol prefix"
      }
    ],
    "body": "ServiceNow Skill\n\nQuery and manage records on any ServiceNow instance via the REST Table API.\n\nSetup\n\nSet environment variables for your ServiceNow instance:\n\nexport SN_INSTANCE=\"https://yourinstance.service-now.com\"\nexport SN_USER=\"your_username\"\nexport SN_PASSWORD=\"your_password\"\n\n\nAll tools below use scripts/sn.sh which reads these env vars.\n\nTools\nsn_query — Query any table\nbash scripts/sn.sh query <table> [options]\n\n\nOptions:\n\n--query \"<encoded_query>\" — ServiceNow encoded query (e.g. active=true^priority=1)\n--fields \"<field1,field2>\" — Comma-separated fields to return\n--limit <n> — Max records (default 20)\n--offset <n> — Pagination offset\n--orderby \"<field>\" — Sort field (prefix with - for descending)\n--display <true|false|all> — Display values mode\n\nExamples:\n\n# List open P1 incidents\nbash scripts/sn.sh query incident --query \"active=true^priority=1\" --fields \"number,short_description,state,assigned_to\" --limit 10\n\n# All users in IT department\nbash scripts/sn.sh query sys_user --query \"department=IT\" --fields \"user_name,email,name\"\n\n# Recent change requests\nbash scripts/sn.sh query change_request --query \"sys_created_on>=2024-01-01\" --orderby \"-sys_created_on\" --limit 5\n\nsn_get — Get a single record by sys_id\nbash scripts/sn.sh get <table> <sys_id> [options]\n\n\nOptions:\n\n--fields \"<field1,field2>\" — Fields to return\n--display <true|false|all> — Display values mode\n\nExample:\n\nbash scripts/sn.sh get incident abc123def456 --fields \"number,short_description,state,assigned_to\" --display true\n\nsn_create — Create a record\nbash scripts/sn.sh create <table> '<json_fields>'\n\n\nExample:\n\nbash scripts/sn.sh create incident '{\"short_description\":\"Server down\",\"urgency\":\"1\",\"impact\":\"1\",\"assignment_group\":\"Service Desk\"}'\n\nsn_update — Update a record\nbash scripts/sn.sh update <table> <sys_id> '<json_fields>'\n\n\nExample:\n\nbash scripts/sn.sh update incident abc123def456 '{\"state\":\"6\",\"close_code\":\"Solved (Permanently)\",\"close_notes\":\"Restarted service\"}'\n\nsn_delete — Delete a record\nbash scripts/sn.sh delete <table> <sys_id> --confirm\n\n\nThe --confirm flag is required to prevent accidental deletions.\n\nsn_aggregate — Aggregate queries\nbash scripts/sn.sh aggregate <table> --type <TYPE> [options]\n\n\nTypes: COUNT, AVG, MIN, MAX, SUM\n\nOptions:\n\n--type <TYPE> — Aggregation type (required)\n--query \"<encoded_query>\" — Filter records\n--field \"<field>\" — Field to aggregate on (required for AVG/MIN/MAX/SUM)\n--group-by \"<field>\" — Group results by field\n--display <true|false|all> — Display values mode\n\nExamples:\n\n# Count open incidents by priority\nbash scripts/sn.sh aggregate incident --type COUNT --query \"active=true\" --group-by \"priority\"\n\n# Average reassignment count\nbash scripts/sn.sh aggregate incident --type AVG --field \"reassignment_count\" --query \"active=true\"\n\nsn_schema — Get table schema\nbash scripts/sn.sh schema <table> [--fields-only]\n\n\nReturns field names, types, max lengths, mandatory flags, reference targets, and choice values.\n\nUse --fields-only for a compact field list.\n\nsn_batch — Bulk update or delete records\nbash scripts/sn.sh batch <table> --query \"<encoded_query>\" --action <update|delete> [--fields '{\"field\":\"value\"}'] [--limit 200] [--confirm]\n\n\nPerforms bulk update or delete operations on all records matching a query. Runs in dry-run mode by default — shows how many records match without making changes. Pass --confirm to execute.\n\nOptions:\n\n--query \"<encoded_query>\" — Filter records to operate on (required)\n--action <update|delete> — Operation to perform (required)\n--fields '<json>' — JSON fields to set on each record (required for update)\n--limit <n> — Max records to affect per run (default 200, safety cap at 10000)\n--dry-run — Show match count only, no changes (default behavior)\n--confirm — Actually execute the operation (disables dry-run)\n\nExamples:\n\n# Dry run: see how many resolved incidents older than 90 days would be affected\nbash scripts/sn.sh batch incident --query \"state=6^sys_updated_on<javascript:gs.daysAgo(90)\" --action update\n\n# Bulk close resolved incidents (actually execute)\nbash scripts/sn.sh batch incident --query \"state=6^sys_updated_on<javascript:gs.daysAgo(90)\" --action update --fields '{\"state\":\"7\",\"close_code\":\"Solved (Permanently)\",\"close_notes\":\"Auto-closed by batch\"}' --confirm\n\n# Dry run: count orphaned test records\nbash scripts/sn.sh batch u_test_table --query \"u_status=abandoned\" --action delete\n\n# Delete orphaned records (actually execute)\nbash scripts/sn.sh batch u_test_table --query \"u_status=abandoned\" --action delete --limit 50 --confirm\n\n\nOutput (JSON summary):\n\n{\"action\":\"update\",\"table\":\"incident\",\"matched\":47,\"processed\":47,\"failed\":0}\n\nsn_health — Instance health check\nbash scripts/sn.sh health [--check <all|version|nodes|jobs|semaphores|stats>]\n\n\nChecks ServiceNow instance health across multiple dimensions. Default is --check all which runs every check.\n\nChecks:\n\nversion — Instance build version, date, and tag from sys_properties\nnodes — Cluster node status (online/offline) from sys_cluster_state\njobs — Stuck/overdue scheduled jobs from sys_trigger (state=ready, next_action > 30 min past)\nsemaphores — Active semaphores (potential locks) from sys_semaphore\nstats — Quick dashboard: active incidents, open P1s, active changes, open problems\n\nExamples:\n\n# Full health check\nbash scripts/sn.sh health\n\n# Just check version\nbash scripts/sn.sh health --check version\n\n# Check for stuck jobs\nbash scripts/sn.sh health --check jobs\n\n# Quick incident/change/problem dashboard\nbash scripts/sn.sh health --check stats\n\n\nOutput (JSON):\n\n{\n  \"instance\": \"https://yourinstance.service-now.com\",\n  \"timestamp\": \"2026-02-16T13:30:00Z\",\n  \"version\": {\"build\": \"...\", \"build_date\": \"...\", \"build_tag\": \"...\"},\n  \"nodes\": [{\"node_id\": \"...\", \"status\": \"online\", \"system_id\": \"...\"}],\n  \"jobs\": {\"stuck\": 0, \"overdue\": []},\n  \"semaphores\": {\"active\": 2, \"list\": []},\n  \"stats\": {\"incidents_active\": 54, \"p1_open\": 3, \"changes_active\": 12, \"problems_open\": 8}\n}\n\nsn_attach — Manage attachments\n# List attachments on a record\nbash scripts/sn.sh attach list <table> <sys_id>\n\n# Download an attachment\nbash scripts/sn.sh attach download <attachment_sys_id> <output_path>\n\n# Upload an attachment\nbash scripts/sn.sh attach upload <table> <sys_id> <file_path> [content_type]\n\nCommon Tables\nTable\tDescription\nincident\tIncidents\nchange_request\tChange Requests\nproblem\tProblems\nsc_req_item\tRequested Items (RITMs)\nsc_request\tRequests\nsys_user\tUsers\nsys_user_group\tGroups\ncmdb_ci\tConfiguration Items\ncmdb_ci_server\tServers\nkb_knowledge\tKnowledge Articles\ntask\tTasks (parent of incident/change/problem)\nsys_choice\tChoice list values\nEncoded Query Syntax\n\nServiceNow encoded queries use ^ as AND, ^OR as OR:\n\nactive=true^priority=1 — Active AND P1\nactive=true^ORactive=false — Active OR inactive\nshort_descriptionLIKEserver — Contains \"server\"\nsys_created_on>=2024-01-01 — Created after date\nassigned_toISEMPTY — Unassigned\nstateIN1,2,3 — State is 1, 2, or 3\ncaller_id.name=John Smith — Dot-walk through references\nNotes\nAll API calls use Basic Auth via SN_USER / SN_PASSWORD\nDefault result limit is 20 records; use --limit to adjust\nUse --display true to get human-readable values instead of sys_ids for reference fields\nThe script auto-detects whether SN_INSTANCE includes the protocol prefix"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/onlyflowstech/servicenow",
    "publisherUrl": "https://clawhub.ai/onlyflowstech/servicenow",
    "owner": "onlyflowstech",
    "version": "1.1.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/servicenow",
    "downloadUrl": "https://openagent3.xyz/downloads/servicenow",
    "agentUrl": "https://openagent3.xyz/skills/servicenow/agent",
    "manifestUrl": "https://openagent3.xyz/skills/servicenow/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/servicenow/agent.md"
  }
}