AvantGuard - NinjaOne icon

AvantGuard - NinjaOne

AvantGuard - NinjaOne

Actions159

Overview

This node integrates with the AvantGuard NinjaOne API to create a new policy within the Management resource. It allows users to define detailed policy attributes such as name, description, node class, and enablement status, as well as specify relationships like parent or template policies. This node is useful in IT management workflows where automated creation and configuration of device or system policies are required, for example, when onboarding new devices or standardizing configurations across an organization.

Practical examples:

  • Automatically creating security policies for newly added Windows servers.
  • Cloning existing policies using a template policy ID to maintain consistency.
  • Creating child policies under a parent policy to organize hierarchical policy structures.

Properties

Name Meaning
Additional Query Parameters Optional query parameters to customize policy creation:
- Mode: Policy creation mode, options: NEW, CHILD, COPY
- Template Policy Id: Identifier of a template policy to base the new policy on
Additional Body Fields Optional body fields to define the policy details:
- Parent Policy Id: Identifier of the parent policy
- Name: Name of the new policy
- Description: Description text for the policy
- Node Class: Classification of the node/device, options include WINDOWS SERVER, LINUX WORKSTATION, MAC, ANDROID, various NMS types, etc.
- Enabled: Boolean flag indicating if the policy is enabled

Output

The node outputs JSON data representing the created policy object returned by the API. This typically includes all relevant details of the newly created policy such as its unique identifier, name, description, node class, status, and any hierarchical relationships (parent or template references). The output does not include binary data.

Dependencies

  • Requires an API key credential for authenticating with the AvantGuard NinjaOne API.
  • Needs the base URL of the NinjaOne API configured in the node credentials.
  • Depends on the @avantguardllc/n8n-openapi-node package and the corresponding OpenAPI specification (openapi.json) bundled with the node.

Troubleshooting

  • Common issues:

    • Missing or invalid API credentials will cause authentication failures.
    • Providing invalid or missing required fields (e.g., name or node class) may result in API validation errors.
    • Using incorrect mode values or referencing non-existent template or parent policy IDs can cause request failures.
  • Error messages and resolutions:

    • 401 Unauthorized: Check that the API key credential is correctly set and has necessary permissions.
    • 400 Bad Request: Verify that all required properties are provided and valid; ensure numeric IDs are correct.
    • 404 Not Found: Confirm that referenced templatePolicyId or parentPolicyId exist in the system.
    • 500 Internal Server Error: Retry later or contact support if persistent.

Links and References

Discussion