Push Script to ServiceNow
push_scriptPush a local script file to a ServiceNow instance by updating the script field on an existing record. Works with Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.
Instructions
Push a local script file to a ServiceNow instance, updating the script field on the matching record. The file is read from the specified path and the record is found by name in the appropriate table.
IMPORTANT: This modifies code on the ServiceNow instance. The record must already exist — this updates an existing script, it does not create new ones.
Supported script types:
sys_script_include (Script Include)
sys_script (Business Rule)
sys_ui_script (UI Script)
sys_ui_action (UI Action)
sys_script_client (Client Script)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| script_name | Yes | The name of the script record to update on the instance. | |
| script_type | Yes | The type of script to push. | |
| file_path | Yes | Local file path to read the script content from. |