Bulk Update Records
servicenow_bulk_updateUpdate multiple ServiceNow records matching a query. Preview changes with dry-run before committing to avoid errors.
Instructions
Update multiple records matching a query. Dry-run by default — always preview before committing.
Args:
table (string): Target table (e.g., incident, change_request)
query (string): Encoded query to select records (e.g., 'state=6^resolved_atRELATIVELT@dayofweek@ago@30')
data (object): Fields to set on all matched records
dry_run (boolean): Preview without applying (default: true). Set false to commit.
limit (number): Safety cap — max records to process (default 20, max 100)
response_format: Output format
Returns: Preview list (dry_run=true) or per-record success/failure results
Examples:
Close all resolved incidents older than 30 days → table="incident", query="state=6^resolved_atRELATIVELT@dayofweek@ago@30", data={"state":"7"}
Reassign open tickets to a new group → table="incident", query="assignment_group=OLD_SYS_ID^state!=7", data={"assignment_group":"NEW_SYS_ID"}
Set category on unclassified incidents → table="incident", query="category=^state=1", data={"category":"software"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Fields to set on all matching records | |
| limit | No | Maximum number of results to return (1–100, default 20) | |
| query | No | Encoded ServiceNow query string (e.g., 'state=1^priority=1^assigned_to=javascript:gs.getUserID()'). Leave empty to return all records. | |
| table | Yes | ServiceNow table name (e.g., incident, change_request, sys_user) | |
| dry_run | No | Preview without applying — set false to commit (default: true) | |
| response_format | No | Output format: 'markdown' (default) for human-readable or 'json' for structured data | markdown |