Actions158
- System Actions
- Organization Actions
- Devices Actions
- Get Device
- Get Device Active Jobs
- Get Device Activities
- Get Device Alerts
- Get Device Disk Drives
- Get Device Installed OS Patches
- Get Device Installed Software Patches
- Get Device Last Logged On User
- Get Device Network Interfaces
- Get Device Pending Failed Rejected OS Patches
- Get Device Pending Failed Rejected Software Patches
- Get Device Processors
- Get Device Services
- Get Device Software
- Get Device Volumes
- Get Node Custom Fields
- Update Node Attribute Values
- Get Policy Overrides
- Groups Actions
- Queries Actions
- Get Antivirus Status Report
- Get Antivirus Threats
- Get Computer Systems
- Get Custom Fields Detailed Report
- Get Custom Fields Report
- Get Device Health Report
- Get Device Usage
- Get Disk Drives
- Get Installed OS Patches
- Get Installed Software Patches
- Get Last Logged On Users Report
- Get Network Interfaces
- Get Operating Systems
- Get Pending Failed Rejected OS Patches
- Get Pending Failed Rejected Software Patches
- Get Policy Overrides 1
- Get Processors
- Get RAID Controller Report
- Get RAID Drive Report
- Get Scoped Custom Fields Detailed Report
- Get Scoped Custom Fields Report
- Get Software
- Get Volumes
- Get Windows Services Report
- Management Actions
- Get Custom Fields Policy Conditions
- Create Custom Fields Policy Condition
- Get Windows Event Policy Conditions
- Create Windows Event Policy Condition
- Delete Policy Condition
- Get Custom Fields Policy Condition
- Get Windows Event Policy Condition
- Create Organization
- Node Approval Operation
- Reset Alert
- Reset Alert Set Activity Data
- Update Device Maintenance
- Cancel Device Maintenance
- Control Windows Service
- Update Device
- Get Device Link
- Reset Policy Overrides
- Reboot Devices
- Remove Device Owner
- Request Scripting Options
- Run Script On Device
- Set Device Owner
- Set Windows Service Configuration
- Submit OS Patch Apply
- Submit OS Patch Scan
- Submit Software Patch Apply
- Submit Software Patch Scan
- Create Location For Organization
- Get Installer
- Get Installer For Location
- Update Organization
- Update Location
- Update Node Role Policy Assignment For Organization
- Create Policy
- Ticketing Actions
- Webhooks Actions
- Related Items Actions
- Location Actions
- Backup Actions
- Knowledge Base Articles Actions
- Upload Temp Attachments
- Download Knowledge Base Article
- Get Client Knowledge Base Articles
- Get Global Knowledge Base Articles
- Get Knowledge Base Article Signed Urls
- Get Knowledge Base Folder Content
- Get Knowledge Base Folder Path Content
- Download Related Item Attachment
- Get Related Item Attachments Signed Urls
- Organization Documents Actions
- Document Templates Actions
- Checklist Templates Actions
- Custom Fields Actions
- Organization Checklists Actions
Management → Create Windows Event Policy Condition
AI-generatedOverview
This node enables creating a Windows Event Policy Condition within the Management resource of the NinjaOne API. It is designed to help automate the configuration of monitoring policies based on Windows event logs. Users can define specific event sources, event IDs, severity levels, notification channels, scripts to run, and other parameters that determine when and how alerts or actions should be triggered.
Practical scenarios include:
- Automatically triggering alerts or remediation scripts when certain critical Windows events occur.
- Defining granular conditions for event-based monitoring in IT infrastructure management.
- Integrating with notification systems to inform teams about important system events.
Properties
| Name | Meaning |
|---|---|
| Policy Id | Numeric identifier of the policy to which this condition will be added (required). |
| Enabled | Boolean flag indicating if the policy condition is active. |
| Display Name | Human-readable name for the policy condition. |
| Severity | Severity level of the condition; options: NONE, MINOR, MODERATE, MAJOR, CRITICAL. |
| Priority | Priority level of the condition; options: NONE, LOW, MEDIUM, HIGH. |
| Channels | JSON array specifying notification channels for the condition. |
| Scripts | JSON array defining scripts to run when the condition triggers, including runAs user and variables. |
| Notification Action | Action to take for notifications; options: NONE, SEND. |
| Notify On Reset | Boolean indicating whether to notify when the condition resets. |
| Reset Threshold | Number of seconds defining the reset threshold for the condition. |
| Source | String specifying the Windows event source (required). |
| Event Ids | JSON array of event IDs to match (required). |
| Text | JSON object defining text matching criteria with fields: values (array), condition (e.g., CONTAINS), include (e.g., ALL). |
| Occurrence | JSON object defining occurrence settings with fields: enabled (boolean), threshold (number), duration (number). |
Output
The node outputs an array of items where each item contains a json field representing the response from the NinjaOne API after creating the Windows Event Policy Condition. The structure of the JSON corresponds to the created policy condition details as returned by the API.
No binary data output is indicated for this operation.
Dependencies
- Requires an API authentication token credential configured in n8n for the NinjaOne API.
- The node uses the NinjaOne REST API endpoints under
/v2/policies/{policyId}/condition/windows-event. - Proper permissions on the NinjaOne account to create or modify policy conditions are necessary.
Troubleshooting
- Missing Required Fields: Errors may occur if required properties like
Policy Id,Source, orEvent Idsare not provided or invalid. Ensure these are correctly set. - Invalid JSON Format: Properties such as
Channels,Scripts,Event Ids,Text, andOccurrenceexpect valid JSON strings. Malformed JSON will cause parsing errors. - API Authentication Failures: If the API key or OAuth2 credentials are missing or expired, requests will fail. Verify credential setup in n8n.
- Permission Denied: Insufficient permissions on the NinjaOne account to create policy conditions will result in authorization errors.
- Binary Data Errors: Not applicable here since this operation does not handle binary data.
Links and References
- NinjaOne API Documentation (general reference for API endpoints)
- Windows Event Log Monitoring Concepts (for understanding event sources and IDs)
- n8n Documentation on Creating Custom Nodes