Pull Script from ServiceNow
pull_scriptRetrieve a script from a ServiceNow instance and save it to a local file. Supports Script Includes, Business Rules, UI Scripts, UI Actions, and Client Scripts.
Instructions
Pull a script (Script Include, Business Rule, UI Script, UI Action, Client Script) from a ServiceNow instance and save it to a local file. The script content is read from the appropriate table and written to the specified file path.
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 on the instance (e.g., "MyScriptInclude"). | |
| script_type | Yes | The type of script to pull. | |
| file_path | Yes | Local file path to write the script content to. |