Actions159
- Related Items Actions
- Backup Actions
- Queries Actions
- Get Disk Drives
- Get Operating Systems
- Get RAID Controller Report
- Get Volumes
- Get Computer Systems
- Get Antivirus Status Report
- Get Device Health Report
- Get Custom Fields Report
- Get Installed Software Patches
- Get Custom Fields Detailed Report
- Get Installed OS Patches
- Get Pending Failed Rejected OS Patches
- Get RAID Drive Report
- Get Windows Services Report
- Get Antivirus Threats
- Get Device Usage
- Get Network Interfaces
- Get Processors
- Get Software
- Get Last Logged On Users Report
- Get Policy Overrides 1
- Get Scoped Custom Fields Report
- Get Pending Failed Rejected Software Patches
- Get Scoped Custom Fields Detailed Report
- System Actions
- Knowledge Base Articles Actions
- Get Knowledge Base Article Signed Urls
- Get Related Item Attachments Signed Urls
- Download Knowledge Base Article
- Get Knowledge Base Folder Path Content
- Upload Temp Attachments
- Get Knowledge Base Folder Content
- Get Client Knowledge Base Articles
- Upload Knowledge Base Articles
- Get Global Knowledge Base Articles
- Download Related Item Attachment
- Organization Documents Actions
- Document Templates Actions
- Checklist Templates Actions
- Organization Checklists Actions
- Location Actions
- Management Actions
- Get Custom Fields Policy Condition
- Delete Policy Condition
- Reset Alert
- Update Device
- Request Scripting Options
- Submit OS Patch Scan
- Get Installer For Location
- Get Windows Event Policy Conditions
- Create Organization
- Cancel Device Maintenance
- Reboot Devices
- Set Windows Service Configuration
- Create Location For Organization
- Update Node Role Policy Assignment For Organization
- Create Windows Event Policy Condition
- Node Approval Operation
- Control Windows Service
- Remove Device Owner
- Submit OS Patch Apply
- Get Installer
- Create Policy
- Get Windows Event Policy Condition
- Update Device Maintenance
- Reset Policy Overrides
- Set Device Owner
- Submit Software Patch Scan
- Update Location
- Reset Alert Set Activity Data
- Get Device Link
- Run Script On Device
- Submit Software Patch Apply
- Update Organization
- Create Custom Fields Policy Condition
- Get Custom Fields Policy Conditions
- Custom Fields Actions
- Ticketing Actions
- Organization Actions
- Devices Actions
- Get Device Active Jobs
- Get Device Installed Software Patches
- Get Device Processors
- Update Node Attribute Values
- Get Device Disk Drives
- Get Device Pending Failed Rejected OS Patches
- Get Device Volumes
- Get Device Alerts
- Get Device Network Interfaces
- Get Device Software
- Get Device Activities
- Get Device Last Logged On User
- Get Device Services
- Get Policy Overrides
- Get Device
- Get Device Installed OS Patches
- Get Device Pending Failed Rejected Software Patches
- Get Node Custom Fields
- Groups Actions
- Webhooks Actions
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-nodepackage 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.