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 resources programmatically. Specifically, for the Volume resource with the Get Many operation, it retrieves a list of Docker volumes from a specified Docker environment managed by Portainer.
Common scenarios where this node is beneficial include:
- Automating inventory or auditing of Docker volumes across multiple environments.
- Integrating volume data into workflows for backup, cleanup, or monitoring purposes.
- Fetching volume information to trigger conditional logic based on volume states or attributes.
Practical example:
- A user wants to periodically fetch all Docker volumes in a specific environment to check which volumes are unused and schedule their removal.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Docker environment/endpoint in Portainer from which to retrieve volumes. |
Output
The node outputs JSON data representing the list of Docker volumes retrieved from the specified environment. The structure corresponds to the Portainer API response for volumes, typically including details such as volume names, driver types, mount points, labels, usage data, and other metadata.
No binary data output is involved in this operation.
Example output snippet (conceptual):
{
"Volumes": [
{
"Name": "my_volume",
"Driver": "local",
"Mountpoint": "/var/lib/docker/volumes/my_volume/_data",
"Labels": {},
"Scope": "local"
},
...
],
"Warnings": null
}
Dependencies
- Requires an active Portainer instance accessible via its API.
- Needs an API key credential configured in n8n to authenticate requests to the Portainer API.
- The node uses the base URL and API key from the credentials to make HTTP GET requests to the endpoint
/endpoints/{environmentId}/docker/volumes.
Troubleshooting
Common issues:
- Invalid or missing Environment ID: Ensure the environment ID corresponds to a valid Portainer endpoint.
- Authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
- Network connectivity problems: Confirm that n8n can reach the Portainer API URL.
- Empty results: If no volumes are returned, verify that the environment actually contains volumes.
Error messages:
401 Unauthorizedor403 Forbidden: Indicates invalid or insufficient API credentials.404 Not Found: The specified environment ID does not exist.500 Internal Server Error: Possible server-side issue; retry later or check Portainer logs.
Resolving these usually involves checking credentials, environment IDs, and network access.