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 network interface associated with a specific device within the DCIM domain. It is useful for network administrators and engineers who want to automate the management of network infrastructure by programmatically adding interfaces to devices in their NetBox inventory.
Typical use cases include:
- Automating the provisioning of new network devices by creating their interfaces as part of deployment workflows.
- Synchronizing network inventory data from external systems into NetBox.
- Managing large-scale network changes where interfaces need to be created in bulk or via automation.
For example, you can use this node to add a virtual interface named "eth0" to a device with ID 123, specifying its type and additional properties like MAC address and MTU.
Properties
| Name | Meaning |
|---|---|
| Domain | The domain of the NetBox API to interact with. For this operation, it must be set to DCIM. |
| Device ID | The unique identifier of the device to which the new interface will be attached. This is required. |
| Name | The name of the interface to create (e.g., "eth0"). Optional but recommended for clarity. |
| Type | The type of the interface. Options include various physical and virtual interface types such as: Virtual, 1000BASE-T (1GE), 10GBASE-T (10GE), SFP (1GE), IEEE 802.11a/b/g/n/ac/ad/ax, Other, etc. This is required. |
| Additional Fields | A collection of optional fields to further define the interface: |
| - Enabled | Boolean indicating if the interface is enabled. Defaults to true. |
| - LAG Interface ID | Numeric ID of the parent Link Aggregation Group (LAG) interface, if applicable. |
| - MTU | Maximum Transmission Unit size for the interface. |
| - MAC Address | MAC address assigned to the interface. |
| - Management Only | Boolean indicating if the interface is used only for management purposes. Defaults to false. |
| - Description | Text description of the interface. |
| - Mode | Mode of the interface for Layer 2 interfaces. Options: Access, Tagged, Tagged (All). |
| - Untagged VLAN ID | Numeric ID of the untagged VLAN associated with the interface. |
| - Tagged VLANs | Comma-separated list of tagged VLAN IDs associated with the interface. |
| - Mark Connected | Boolean to treat the interface as if a cable is connected. Defaults to false. |
| - Tags | Comma-separated list of tags to assign to the interface. |
| - Custom Fields | JSON object containing any custom fields defined for the interface in NetBox. |
Output
The node outputs an array of items, each containing a json property with the response data from the NetBox API after creating the interface. This typically includes all details of the newly created interface such as its ID, name, type, device association, and any other properties set.
If an error occurs and "Continue on Fail" is enabled, the output will contain an item with a json field holding an error message describing what went wrong.
The node does not output binary data.
Dependencies
- Requires access to a NetBox instance with the API enabled.
- Requires an API authentication token credential configured in n8n to authenticate requests to NetBox.
- The node depends on internal helper functions to execute the API operation but no external npm packages beyond those bundled.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing an incorrect device ID or interface parameters may result in API errors.
- Network connectivity issues to the NetBox server will prevent execution.
Error messages:
- Authentication errors usually indicate invalid or missing API tokens; verify credentials.
- Validation errors from NetBox (e.g., invalid VLAN IDs, duplicate interface names) should be corrected based on the message returned.
- If the node throws an error and "Continue on Fail" is disabled, the workflow will stop; enabling it allows capturing errors as output for handling downstream.