Actions88
- 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
- Network Actions
- Volume Actions
- Swarm Actions
- Node Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
Overview
This node interacts with Docker through the Portainer API, specifically allowing users to list Docker secrets associated with a given endpoint. It is useful in scenarios where you need to manage or audit Docker secrets programmatically within n8n workflows, such as retrieving all secrets for deployment automation, compliance checks, or secret rotation processes.
For example, you might use this node to fetch all secrets from a specific Docker endpoint before deploying an application that requires those secrets, ensuring your workflow dynamically adapts to the current secret set.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | The identifier of the Docker endpoint to access. You can select from a list of available endpoints or specify an ID using an expression. This determines which Docker environment the secrets will be listed from. |
| Additional Fields | Optional extra parameters to refine the secret listing. Currently supports: - Filters: A JSON-encoded string to filter secrets by criteria such as secret ID, labels (key or key=value), secret name(s). |
Filters options explanation:
id=<secret id>— Filter secrets by their unique ID.label=<key>orlabel=<key>=value— Filter secrets by label key or key-value pair.name=<secret name>— Filter secrets by exact secret name.names=<secret name>— Filter secrets by multiple names.
Output
The node outputs a JSON array under the json field containing the list of Docker secrets retrieved from the specified endpoint. Each item in the array represents a secret object with its properties as returned by the Portainer API.
No binary data output is produced by this node.
Dependencies
- Requires access to a Portainer API instance.
- Needs an API authentication token configured in n8n credentials to authorize requests to the Portainer API.
- The node dynamically loads available Docker endpoints via the Portainer API to populate the "EndpointID" property.
Troubleshooting
Common issues:
- Invalid or missing endpoint ID: Ensure the selected endpoint exists and is accessible.
- Authentication errors: Verify that the API key or token credential is correctly configured and has sufficient permissions.
- Malformed filters JSON: When using filters, ensure the JSON string is valid and properly formatted according to the expected map structure.
Error messages:
- 401 Unauthorized or 403 Forbidden: Check API credentials and permissions.
- 404 Not Found when fetching endpoints or secrets: Confirm the endpoint ID is correct and the Portainer API URL is reachable.
- 400 Bad Request due to filters: Validate the filters JSON syntax and supported keys.