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-related resources. Specifically, for the Webhook - Create operation, it allows users to create a new webhook in Portainer. Webhooks are useful for triggering automated workflows or notifications when certain events occur in Docker environments managed by Portainer.
Typical use cases include:
- Automatically triggering CI/CD pipelines when a service or stack changes.
- Notifying external systems about Docker resource updates.
- Integrating Portainer-managed Docker events with other automation tools.
For example, you can create a webhook that triggers whenever a specific Docker service is updated, enabling seamless integration between your container management and deployment processes.
Properties
| Name | Meaning |
|---|---|
| Resource ID | The identifier of the resource for which the webhook is being created. |
| Webhook Type | The type of webhook to create. Options: Service (value 1) or Stack (value 2). |
Output
The node outputs the JSON response from the Portainer API after creating the webhook. This typically includes details about the newly created webhook such as its ID, associated resource, webhook type, and other metadata returned by the API.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to a Portainer instance via its API.
- Needs an API key credential configured in n8n to authenticate requests to Portainer.
- The base URL of the Portainer API must be set in the credentials.
Troubleshooting
- Invalid Resource ID: If the provided Resource ID does not exist or is incorrect, the API will return an error. Verify the Resource ID corresponds to an existing resource in Portainer.
- Authentication Errors: Ensure the API key credential is valid and has sufficient permissions to create webhooks.
- Webhook Type Mismatch: Use only the allowed webhook types (
ServiceorStack). Providing invalid values may cause request failures. - Network Issues: Confirm that n8n can reach the Portainer API endpoint and that there are no firewall or connectivity issues.
Common error messages usually come directly from the Portainer API and relate to authentication, authorization, or invalid parameters. Checking the API documentation and verifying input values helps resolve these errors.