Resources · n8n integration

Bitbucket n8n integrationAutomate Bitbucket with n8n.

The Bitbucket n8n integration is a trigger and nothing else. The Bitbucket Trigger listens to repository events over a webhook, a URL that Bitbucket calls when something happens, takes a workspace, a repository and the events you pick, then hands the payload to the workflow.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Bitbucket n8n integration actually cover?

The Bitbucket n8n integration runs in one direction, and that matters before you start building. n8n ships a Bitbucket Trigger node, so events coming from a repository can start a workflow. There is no Bitbucket action node in the catalog, so nothing here creates or edits anything inside Bitbucket. Bitbucket speaks, n8n listens, and the real work happens in whatever you connect next.

Start with the notification loop. The trigger fires on the repository events you ticked, and the workflow posts a formatted message into Slack. You decide exactly which payload fields land in the message, which is precisely the part a generic bot never manages to get right.

Second pattern, the audit log. Each event the trigger receives becomes a row in Google Sheets, carrying the workspace, the repository and the moment it arrived. Handy when a team needs a readable record outside Bitbucket and nobody wants to run a log platform for it.

Third pattern, the handoff. The trigger starts the run, a filter step drops the events nobody cares about, and only the rest reaches the next node. That next node can be any tool n8n talks to, which is where the missing action node stops hurting.

Writing back into Bitbucket is the case to plan for. Since no action node exists, that traffic goes through the HTTP Request node, which calls any endpoint of the Bitbucket API and reuses the same credential through predefined authentication. One token, no second setup.

Two limits are worth knowing upfront. The trigger asks for a workspace and a repository, so it watches one repository at a time: a fleet means one workflow per repository, or an expression feeding that field. And the event list is served by Bitbucket, so what you can listen to depends on the account and the scopes behind the token. New to the platform? The n8n review covers what it does well, and the n8n training covers building workflows properly.

Connect

How do you connect Bitbucket to n8n?

  1. 01

    Create an API token in Bitbucket

    Log in to Bitbucket and open your account or personal settings. Look for the section covering API tokens or security settings. Create a new token there, giving it a name you will recognize later and an expiry date that matches the use case: a token that never expires is a token nobody rotates. A Bitbucket account is the only prerequisite.

  2. 02

    Select the six scopes the trigger needs

    Pick Bitbucket as the app, then check the scopes. Three cover reading: read:user:bitbucket, read:workspace:bitbucket and read:repository:bitbucket, which let n8n list your workspaces and repositories in the node dropdowns. Three cover the webhook lifecycle: read:webhook:bitbucket, write:webhook:bitbucket and delete:webhook:bitbucket, so n8n can register and remove its own webhook.

  3. 03

    Add the credential in n8n

    Review and create the token, then copy it straight away. Back in n8n, open the Credentials menu and create a Bitbucket credential with the access token method, pasting the value in. A credential is stored once and reused everywhere: the Bitbucket Trigger then offers it in its own dropdown, and any HTTP Request node pointed at the Bitbucket API can use it too.

Triggers

What starts a workflow from Bitbucket ?

Bitbucket Trigger is the node that starts a workflow each time Bitbucket receives a new submission. Pick the form, activate the workflow: n8n registers the webhook on your Bitbucket account.

What you see in n8n

Configuration notes

01Set Up the Bitbucket TriggerThis node is the entry point of the workflow: it waits for Bitbucket to report something and starts a run with that payload as the first item. Version 1 of the node asks for four fields, all of them required.

This node is the entry point of the workflow: it waits for Bitbucket to report something and starts a run with that payload as the first item. Version 1 of the node asks for four fields, all of them required.

Key parameters

  • Resource: what the trigger watches, which decides whether the following fields target a workspace or a single repository.
  • Workspace Name or ID: the workspace whose events you want. Choose it from the list n8n loads from your credential, or pass an ID through an expression such as {{ $json.workspace }}, which is the n8n syntax for reading a field off the incoming item.
  • Repository Name or ID: the repository to listen to, picked from the same kind of dropdown or set by expression.
Use cases
one team repository wired to a single always-on workflow, where the values are picked once from the dropdowns and never touched again.
02Select the Event Names to Listen ToNothing reaches the workflow until this field is filled. The node keeps its event list empty by default and loads the choices from Bitbucket itself once the credential and the repository are set, so the options reflect that account rather than a hardcoded catalog.

Nothing reaches the workflow until this field is filled. The node keeps its event list empty by default and loads the choices from Bitbucket itself once the credential and the repository are set, so the options reflect that account rather than a hardcoded catalog.

Key parameters

  • Event Names or IDs: a multi-select, so several events can feed the same workflow. Tick them in the list, or supply the identifiers through an expression when the selection has to change per environment.
When to use it
keep the selection tight. Every ticked event becomes an execution, and a workflow subscribed to everything spends its time filtering noise it asked for. Start with the one event the automation actually reacts to, then widen once the logic holds.
Use cases
a release checklist that listens to a couple of events on the production repository and stays quiet the rest of the day.
03Activate the Workflow to Register the WebhookConfiguration alone changes nothing on the Bitbucket side. n8n registers its webhook URL with Bitbucket when the workflow is activated, which is why the token carries the write permission for webhooks, and removes it again when the workflow is deactivated.

Configuration alone changes nothing on the Bitbucket side. n8n registers its webhook URL with Bitbucket when the workflow is activated, which is why the token carries the write permission for webhooks, and removes it again when the workflow is deactivated.

When to use it
activate as soon as the four fields are set, then produce the event in Bitbucket to see the first execution. Delivery is push based, so each event lands in n8n within seconds and no polling interval sits between the two systems.
Use cases
a workflow that has to react while the developer is still looking at the screen, such as a review reminder or a status message. Deactivating the workflow is also the clean way to pause a noisy integration, since the webhook disappears from the repository instead of piling up executions you then have to delete.
Need help

Need help automating Bitbucket with n8n?

A person reads every message.

FAQ

Bitbucket and n8n: common questions

01Is the Bitbucket n8n integration free?
Yes on the n8n side. The Bitbucket Trigger ships with n8n, so there is nothing to install and nothing extra to pay for the node itself. That holds both on n8n Cloud, the hosted offer run by n8n, and on a self-hosted instance installed with Docker or npm under the Community Edition and its Sustainable Use licence. A workflow built in one place behaves the same in the other. What a Bitbucket account costs is a separate question and depends on your plan there, which this page does not cover.
02What credentials and permissions does the Bitbucket Trigger need?
One access token. Bitbucket is authenticated in n8n with an API token created from your account or personal settings, with Bitbucket selected as the app and six scopes ticked: read:user:bitbucket, read:workspace:bitbucket and read:repository:bitbucket for reading, plus read:webhook:bitbucket, write:webhook:bitbucket and delete:webhook:bitbucket so n8n can create and clean up its own webhook. Drop the write scope and the workflow activates without ever receiving anything. The token is displayed once at creation, so paste it into the n8n credential right away. That credential is then reusable across every workflow.
03What are the limits of Bitbucket in n8n?
The main one is scope. n8n provides a trigger for Bitbucket and no action node, so workflows can react to repository events but cannot create, update or delete anything in Bitbucket through a dedicated node. Anything you need to write back goes through the HTTP Request node, which reaches any endpoint of the Bitbucket API and reuses the same credential through predefined authentication. The trigger also targets one workspace and one repository per node, so covering several repositories means several workflows, or an expression that supplies the value. The available events come from Bitbucket, not from a fixed list inside n8n.
04Does the Bitbucket Trigger react in real time?
Yes. It works over a webhook, meaning Bitbucket calls an n8n URL as soon as an event happens instead of n8n asking repeatedly whether something changed. n8n registers that URL with Bitbucket when you activate the workflow and removes it when you deactivate, so there is no interval to tune and no delay to budget for: events arrive within seconds of happening. The practical consequence is that nothing is delivered while the workflow is off, so a deactivated workflow does not catch up on what it missed once you switch it back on.
05n8n or Make for Bitbucket?
It depends on where you want the data to sit and how you want to pay. Make is a hosted platform with no self-hosting option, billed per operation, which suits teams who would rather not run anything. n8n runs on its own Cloud or on your servers, so repository payloads can stay inside your infrastructure, and the cost model follows the hosting rather than the volume of events. Both use a visual canvas, so the choice rarely comes down to the editor. For a Bitbucket workflow that fires on every commit-level event, the per-operation meter is usually the deciding factor.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.