Actions72
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Stack Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
Overview
This node integrates with the Portainer API to manage Docker volumes. Specifically, the Delete Volume operation allows users to delete a Docker volume by specifying its name and the environment (endpoint) where it resides. This is useful for cleaning up unused or obsolete volumes in Docker environments managed via Portainer.
Typical use cases include:
- Automating cleanup of Docker volumes that are no longer needed.
- Managing storage resources programmatically in CI/CD pipelines.
- Integrating volume management into broader container orchestration workflows.
For example, you might use this node to delete a volume named my_volume from a specific Docker environment identified by its environment ID.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Portainer environment/endpoint where the volume exists. |
| Volume Name | The name of the Docker volume to be deleted. |
| Force Delete | Whether to force deletion even if the volume is currently in use (boolean: true or false). |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to delete the specified volume. Typically, this will confirm successful deletion or provide error details if the operation failed.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to a Portainer instance with API access.
- Needs an API key credential configured in n8n to authenticate requests to the Portainer API.
- The base URL of the Portainer API must be set in the credentials.
Troubleshooting
Common Issues:
- Incorrect
Environment IDorVolume Namemay cause the API to return errors indicating the resource was not found. - Attempting to delete a volume that is currently in use without setting
Force Deleteto true may result in failure. - Network connectivity issues or invalid API keys will prevent successful communication with the Portainer API.
- Incorrect
Error Messages:
- 404 Not Found: The specified volume or environment does not exist. Verify IDs and names.
- 409 Conflict: The volume is in use and cannot be deleted unless forced. Enable
Force Deleteto override. - 401 Unauthorized: Authentication failed due to missing or invalid API key. Check credentials configuration.