Overview
This node acts as a webhook trigger for Bitbucket Data Center events. It listens to specified repository or pull request events from a selected project and repository within Bitbucket Data Center, triggering workflows when those events occur.
Common scenarios include:
- Automating CI/CD pipelines when code is pushed to a repository.
- Notifying teams when pull requests are opened, merged, or declined.
- Tracking repository lifecycle events such as creation, deletion, or forking.
- Responding to comments added on commits or pull requests.
- Monitoring branch or tag creation and deletion.
For example, you could use this node to start a deployment workflow whenever a pull request is merged or to send Slack notifications when a new branch is created.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authentication to Bitbucket Data Center API: either "Personal Access Token" or "Basic Auth". |
| Project | The key of the project containing the repository to monitor. This is a required field and options are dynamically loaded from Bitbucket Data Center. |
| Repository | The slug of the repository within the selected project to monitor for webhook events. This is required and depends on the selected project. Options are dynamically loaded accordingly. |
| Events | One or more Bitbucket Data Center webhook event types to listen for. Multiple events can be selected. Examples include repository pushes, pull request opened/merged/declined, branch/tag creation/deletion, and comments. |
Output
The node outputs JSON data representing the webhook event payload received from Bitbucket Data Center. The structure varies depending on the event type but generally includes:
event: The event key string identifying the type of event triggered.headers: HTTP headers from the webhook request.body: The full webhook payload.- Additional top-level properties extracted based on event type, for example:
- For repository events (
repo:*):repository,actor,changes. - For pull request events (
pr:*):pullRequest,repository,actor,comment, and previous state fields likepreviousTitle.
- For repository events (
The output is an array with one object per webhook event, suitable for further processing in n8n workflows.
No binary data output is produced by this node.
Dependencies
- Requires access to a Bitbucket Data Center instance with appropriate permissions.
- Needs an API authentication credential configured in n8n, either a personal access token or basic authentication credentials.
- The node dynamically loads projects and repositories via Bitbucket Data Center REST API calls.
- Webhook URL must be accessible by the Bitbucket Data Center server to receive events.
Troubleshooting
- Webhook not triggering: Ensure the webhook URL is correctly set and publicly accessible. Verify that the selected project, repository, and events match those configured in Bitbucket Data Center.
- Authentication errors: Confirm that the provided API credentials have sufficient permissions to create and manage webhooks.
- "Request does not seem to be from Bitbucket Data Center" error: The node checks the
user-agentheader for "Atlassian". If missing or altered, the request will be rejected. - "No event key found in headers" error: Incoming webhook requests must include the
x-event-keyheader; otherwise, the node cannot process the event. - API request failures: Network issues or incorrect server URLs can cause API calls to fail. Check connectivity and credential configuration.