NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

System → Get Automation Scripts

AI-generated

Overview

This node interacts with the NinjaOne API to retrieve automation scripts from the system. It is designed to fetch available automation scripts, optionally filtered by language. This functionality is useful for users who want to integrate or automate tasks using predefined scripts managed within NinjaOne.

Practical examples include:

  • Fetching all automation scripts in a specific language to display or process them further.
  • Integrating automation scripts into workflows that require dynamic retrieval of script data based on language preferences.

Properties

Name Meaning
Lang Language filter for the automation scripts. When specified, only scripts matching this language are retrieved.

Output

The node outputs an array of JSON objects representing the automation scripts retrieved from the NinjaOne system. Each item in the output contains the full details of an automation script as returned by the NinjaOne API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token configured via OAuth2 credentials for NinjaOne.
  • The node uses the NinjaOne API endpoint /v2/automation/scripts with an optional query parameter lang to filter scripts by language.
  • Proper configuration of the NinjaOne OAuth2 credential in n8n is necessary for successful API requests.

Troubleshooting

  • Common issues:

    • Missing or invalid API credentials will cause authentication failures.
    • Specifying an unsupported or incorrect language code may result in empty results.
    • Network connectivity problems can prevent the node from reaching the NinjaOne API.
  • Error messages:

    • Errors related to missing binary data do not apply here since this operation does not handle binary inputs.
    • API errors will typically return messages from the NinjaOne service; ensure the OAuth2 token is valid and has sufficient permissions.
    • If the node throws an error about failing to get input parameters, verify that the "Lang" property is correctly set or left empty if no filtering is desired.

Links and References

Discussion