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 Secret resource with the Get Many operation, it retrieves a list of all Docker Swarm secrets available in a specified Portainer environment (endpoint). This is useful for users who want to automate the retrieval and management of secrets used in their Docker Swarm clusters via Portainer.
Typical use cases include:
- Auditing or listing all secrets stored in a Docker Swarm environment.
- Feeding secret data into other automation workflows.
- Monitoring or synchronizing secrets across environments.
Example: You can use this node to fetch all secrets from your production Docker Swarm environment managed by Portainer, then process or log them as part of a CI/CD pipeline.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Portainer environment/endpoint where the secrets are managed. |
The Environment ID is required and specifies which Portainer endpoint's secrets to retrieve.
Output
The node outputs JSON data containing an array of secret objects retrieved from the Portainer API. Each object represents a Docker Swarm secret with its associated metadata as provided by Portainer.
The output structure corresponds directly to the API response from the /docker/secrets endpoint on the specified environment, typically including fields such as secret ID, name, creation date, labels, and other relevant details.
No binary data is output by this operation.
Dependencies
Requires a configured Portainer API credential with:
- Base URL of the Portainer instance.
- An API key token for authentication.
The node makes HTTP GET requests to the Portainer API endpoint
/endpoints/{environmentId}/docker/secrets.Ensure that the Portainer instance is accessible from the n8n environment and that the API key has sufficient permissions to list secrets.
Troubleshooting
Common issues:
- Invalid or missing API key credential will cause authentication failures.
- Incorrect or non-existent Environment ID may result in "Not Found" or empty results.
- Network connectivity issues between n8n and Portainer server.
- Insufficient permissions on the API key to access secrets.
Error messages:
401 Unauthorized: Check that the API key is valid and has proper permissions.404 Not Found: Verify the Environment ID exists in Portainer.500 Internal Server Error: Could indicate server-side issues; retry later or check Portainer logs.
Resolution tips:
- Confirm credentials and environment ID correctness.
- Test API access outside n8n using tools like curl or Postman.
- Review Portainer user roles and API key scopes.