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 containers through the Portainer API, specifically providing an operation to wait for a container to reach a certain state. The "Container Wait" operation pauses workflow execution until the specified container meets a given condition such as stopping, exiting next time, or being removed.
This is useful in automation scenarios where subsequent steps depend on the lifecycle state of a container. For example, you might want to wait until a container finishes running before collecting logs, performing cleanup, or starting another dependent container.
Practical examples:
- Waiting for a container to stop before archiving its data.
- Pausing workflow until a container exits to trigger notifications.
- Ensuring a container is removed before deploying a new version.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | Select or specify the Portainer endpoint ID used to access the Docker environment. |
| Id | The ID or name of the Docker container to monitor. |
| Condition | The container state to wait for. Options: Not Running (default), Next Exit, Removed. |
Output
The node outputs JSON data representing the result of the wait operation. This typically includes details about the container's final state once the condition is met. The exact structure depends on the Portainer API response but generally contains container metadata and status information.
No binary data output is indicated.
Dependencies
- Requires a Portainer API endpoint accessible via an API key credential configured in n8n.
- The node uses the Portainer API to query endpoints and container states.
- The user must provide valid Portainer credentials and select the appropriate endpoint.
Troubleshooting
Common issues:
- Incorrect or missing endpoint ID can cause connection failures.
- Invalid container ID or name will result in errors indicating the container was not found.
- Network or authentication issues with the Portainer API may cause request failures.
Error messages and resolutions:
- "Container not found": Verify the container ID/name and endpoint are correct.
- "Unauthorized" or "Authentication failed": Check that the API key credential is valid and has sufficient permissions.
- Timeouts or network errors: Ensure the Portainer server is reachable from n8n and the URL is correct.