ninjaone-script-variables

Convert NinjaOne script variables from strings to validated typed values.

12|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/matdew/NinjaOne-Scripts --skill ninjaone-script-variables
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ninjaone-script-variables
Source: https://github.com/matdew/NinjaOne-Scripts/tree/main/Claude%20and%20Copilot/.claude/skills/ninjaone-script-variables
Command: npx skills add https://github.com/matdew/NinjaOne-Scripts --skill ninjaone-script-variables

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

NinjaOne scripts receive all variables as strings via the platform. This skill ensures those inputs are converted to proper types, validated, and ready for safe use in automation.

Core Features & Use Cases

  • Type-aware variable conversion for integers, booleans, dates, IP addresses, and more
  • Validation of mandatory and optional script parameters with defaults
  • Handling of dropdowns, checkboxes, and complex input scenarios with deterministic behavior
  • Documentation and best practices to avoid common pitfalls in script variable usage
  • Real-world example: convert user-provided inputs into strongly-typed values before executing a script

Quick Start

Define your NinjaOne script variables in the UI and run a sample script to verify type conversions and validations.

Frequently Asked Questions about ninjaone-script-variables

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert NinjaOne script variables from strings to typed values?

NinjaOne script variables are received as strings and must be explicitly converted to typed values using type-aware validation. This process handles integers, booleans, dates, and IP addresses by applying range checks and safe empty value handling for reliable automation.

Why does my NinjaOne automation script fail when processing dropdown or checkbox inputs?

NinjaOne dropdown and checkbox inputs arrive as strings and fail if not explicitly type-converted. Applying deterministic type validation and conversion to these script variables ensures they are processed correctly as booleans or defined selection values before execution.

What's the best way to handle mandatory and optional script variables in NinjaOne?

Handling mandatory and optional NinjaOne script variables requires explicit type conversion and validation with defined defaults. This approach safely manages empty values and enforces range checks, ensuring parameters meet required criteria before script execution.

How do I validate IP addresses and dates passed as NinjaOne script variables?

Validating IP addresses and dates in NinjaOne scripts requires explicit type conversion from the received string format. This process enforces range checks and applies deterministic validation rules to ensure the inputs are properly typed and safe for automation.

What are common pitfalls when using environment variables in NinjaOne script authoring?

Common pitfalls in NinjaOne script authoring include assuming native types for string variables and neglecting empty value handling. Applying documented best practices for explicit type conversion and validation prevents these deterministic behavior errors during runtime.

Can I set default values for optional NinjaOne script parameters?

Optional NinjaOne script parameters can have default values assigned during the type conversion process. This ensures that if an optional input is empty, the script safely falls back to the defined default value while maintaining strict type validation.