Actions88
- Module Actions
- Platform Actions
- Device Actions
- Device Bay Actions
- Device Bay Template Actions
- Device Role Actions
- Device Type Actions
- Interface Actions
- Manufacturer Actions
- Module Bay Actions
- Module Bay Template Actions
- Module Type Actions
- Region Actions
- Site Actions
- Virtual Chassis Actions
- Virtual Device Context Actions
Overview
This node integrates with the NetBox API to create a new device record within the specified domain and resource context. It is particularly useful for network administrators and IT professionals who want to automate the provisioning and management of network devices in their infrastructure using NetBox as a source of truth.
Typical use cases include:
- Automatically adding newly procured devices into NetBox during onboarding workflows.
- Synchronizing device inventories from external systems into NetBox.
- Creating devices programmatically based on dynamic input data in automation pipelines.
For example, you can use this node to create a device by specifying its type, site location, and optionally additional metadata such as status, role, serial number, and tags.
Properties
| Name | Meaning |
|---|---|
| Domain | The domain of the NetBox API to target. Options include: DCIM, IPAM, Tenancy, Extras, Virtualization, Circuits, Core, Users, Plugins, VPN, Wireless, Status. |
| Name | The name of the device to create (optional). |
| Device Type ID | Numeric ID representing the type of the device. This is required to specify what kind of device is being created. |
| Site ID | Numeric ID of the site where the device will be located. Required to associate the device with a physical or logical site. |
| Additional Fields | A collection of optional fields to provide more detailed information about the device. These include: |
| - Status: Current state of the device (Active, Decommissioning, Offline, Planned, Failed, Inventory, Staged). | |
| - Role ID: Numeric ID defining the device's role. | |
| - Tenant ID: Numeric ID of the tenant owning the device. | |
| - Platform ID: Numeric ID of the platform the device runs on. | |
| - Serial Number: Serial number string of the device. | |
| - Asset Tag: Asset tag string for inventory tracking. | |
| - Location ID: Numeric ID of the physical location. | |
| - Rack ID: Numeric ID of the rack where the device is mounted. | |
| - Position: Numeric position within the rack. | |
| - Face: Mounting face of the device in the rack (Front or Rear). | |
| - Primary IPv4 ID: Numeric ID of the primary IPv4 address assigned to the device. | |
| - Primary IPv6 ID: Numeric ID of the primary IPv6 address assigned to the device. | |
| - Cluster ID: Numeric ID of the cluster the device belongs to. | |
| - Virtual Chassis ID: Numeric ID of the virtual chassis grouping. | |
| - VC Position: Numeric position within the virtual chassis. | |
| - VC Priority: Numeric priority within the virtual chassis. | |
| - Comments: Free text comments about the device. | |
| - Tags: Comma-separated list of tags for categorization. | |
| - Custom Fields: JSON object containing any custom fields defined for the device. |
Output
The node outputs an array of items where each item contains a json property representing the response from the NetBox API after creating the device. This JSON typically includes all details of the newly created device record, such as its unique ID, attributes, and any server-generated metadata.
If an error occurs and "Continue on Fail" is enabled, the output will contain an item with an error field describing the failure message.
The node does not output binary data.
Dependencies
- Requires access to a NetBox instance with API enabled.
- Needs an API authentication token credential configured in n8n to authorize requests to the NetBox API.
- The node depends on internal helper functions to execute the API operation but no external npm packages beyond those bundled are indicated.
Troubleshooting
Common Issues:
- Missing or invalid API credentials will cause authentication failures.
- Providing incorrect or non-existent IDs (e.g., device type, site) will result in API errors.
- Omitting required fields like Device Type ID or Site ID will prevent device creation.
- Network connectivity issues to the NetBox server can cause timeouts or connection errors.
Error Messages:
- Authentication errors usually indicate invalid or missing API tokens; verify credentials.
- Validation errors from the API will specify which fields are incorrect or missing; review input properties.
- If the node throws an error but "Continue on Fail" is enabled, the error message will be returned in the output JSON under the
errorkey.