Actions107
- Node Actions
- Network Actions
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Volume Actions
- Swarm Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
- Config Actions
- Plugin Actions
- Distribution Actions
- Session Actions
Overview
This node allows users to interact with Docker through the Portainer API, specifically focusing on managing Docker networks. The "Network Delete" operation enables deleting a specified Docker network by its ID or name within a selected Portainer endpoint. This is useful for automating cleanup tasks, managing network resources programmatically, or integrating Docker network management into broader workflows.
Practical examples include:
- Automatically removing unused or temporary Docker networks after a deployment pipeline finishes.
- Cleaning up networks in multiple Docker environments managed via Portainer.
- Integrating network deletion as part of container lifecycle automation.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | Selects the Portainer endpoint where the Docker network exists. You can choose from a list of available endpoints or specify an ID via expression. |
| Id | The ID or name of the Docker network to delete. This identifies which network resource will be removed. |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to delete the specified Docker network. Typically, this will confirm success or provide error details if the deletion failed.
No binary data output is involved.
Dependencies
- Requires access to a Portainer instance with the API enabled.
- Needs an API authentication token credential configured in n8n to authorize requests to the Portainer API.
- The node uses the Portainer API endpoint
/api/endpoints/{endpointId}/dockerto perform Docker operations scoped to the selected endpoint.
Troubleshooting
Common issues:
- Invalid or missing
endpointId: Ensure the endpoint is correctly selected and accessible. - Incorrect network
id: Verify the network ID or name exists on the selected endpoint. - Authentication errors: Confirm that the API key or token credential is valid and has sufficient permissions.
- Network connectivity problems between n8n and the Portainer server.
- Invalid or missing
Error messages:
- HTTP 404 Not Found: The specified network ID does not exist on the chosen endpoint.
- HTTP 401 Unauthorized or 403 Forbidden: Authentication failure or insufficient permissions.
- Timeout or connection refused: Network or server availability issues.
Resolving these typically involves verifying credentials, endpoint selection, and network existence before retrying.