---
title: "Bitbucket Integration"
description: "Manage Bitbucket Cloud repositories, issues, pull requests, source files, branches, and pipelines from your flows over the Bitbucket Cloud REST API 2.0."
url: https://flowrunner.ai/integrations/bitbucket
date_modified: 2026-08-01T02:40:32-07:00
---

# Bitbucket

[Developer Tools](https://flowrunner.ai/integrations/category/developer-infrastructure)

Manage Bitbucket Cloud repositories, issues, pull requests, source files, branches, and pipelines from your flows over the Bitbucket Cloud REST API 2.0.

[Verified](https://flowrunner.ai/integrations/verified "What does verified mean?") · 27 actions · Basic auth · available

[Bitbucket website](https://bitbucket.org/) · [Platform Documentation](https://developer.atlassian.com/cloud/bitbucket/rest/) · Capability data verified 2026-07-14

1.  A change in another system signals a fix is ready to review
2.  Agent reads the change details and the target repository
3.  Agent lists open pull requests to avoid opening a duplicate
4.  Agent calls Create Pull Request from the fix branch into the target branch
5.  Agent posts the pull request link to the review channel with a summary
6.  A reviewer approves the merge before the agent merges and triggers the pipeline

## What This Integration Enables

FlowRunner agents use Bitbucket to keep the review-and-deploy loop moving without a person copying details between tools. An agent can open, comment on, and update issues in response to events elsewhere, create, comment on, approve, or decline pull requests, and commit generated or synced files to a branch. It can trigger, monitor, and stop pipelines and report their status downstream, and browse source files and directories programmatically. What it does not do on its own is merge a pull request into a protected branch or ship the result. Those decisions stay with the reviewer who owns the branch.

### Without FlowRunner

**Manual PR creation**: An engineer opens the pull request and pastes in the context by hand

**Reviewers unaware**: The pull request sits until someone happens to notice it

**Unclear merge sign-off**: A merge to the main branch happens without a recorded approval

### With FlowRunner

**PRs opened for you**: The agent opens the pull request with the summary and the right reviewers

**Reviewers pinged**: The review channel gets the pull request link the moment it opens

**Recorded approval**: The merge waits for an approval the timeline shows

## Use Case Scenarios

### Mirrored pull requests with a merge gate

A change opened in another repository signals that a matching fix should land in a Bitbucket repository. The agent calls List Pull Requests to make sure one is not already open, then calls Create Pull Request from the fix branch with a summary and the right reviewers, and posts the link to the review channel. It does not merge. A reviewer approves, and only then does the agent call Merge Pull Request and Trigger Pipeline to deploy the merged branch.

### Issue intake from other systems

An event in a tracker or a form marks a bug. The agent calls Create Issue in the Bitbucket repository with the details and a link back, then Add Issue Comment as new context arrives. The issue tracker stays current without an engineer retyping anything.

### Pipeline failure into a tracked bug

A scheduled flow calls List Pipelines and finds a failed run. The agent calls Create Issue to file a bug with the pipeline details and posts to the on-call channel with a link to the failing run. A broken build becomes a tracked, assigned issue instead of a red mark nobody claims.

## Human-in-Loop Highlight

The human-in-loop moment in Bitbucket is the protected-branch merge gate. Opening pull requests, commenting, approving, and committing to a feature branch are all reversible, so the agent runs them by rule. Merging into the main branch and deploying are not, so the agent stops. When a pull request is ready and reviewed, the agent posts it to the review channel with its pipeline status and asks: "PR #128 is approved and green. Merge into main and deploy?" A reviewer confirms. Only then does the agent call Merge Pull Request and Trigger Pipeline. The agent keeps the review loop moving. A person owns the merge that ships.

Agent processes routinely

Detects exception requiring judgment

Clear match Continues automatically

Ambiguous Routes to human via preferred channel

Human decides

Agent resumes with decision

## Agent Capabilities

27 actions

### Repositories

2

-   **Get Repository** Retrieve a single repository in the workspace by its slug.
-   **List Repositories** List the repositories in the workspace.

### Issues

5

-   **Add Issue Comment** Add a comment to an issue in the repository tracker.
-   **Create Issue** File a new issue in the repository tracker. Used to open a bug or task from another system.
-   **Get Issue** Retrieve a single issue by ID.
-   **List Issues** List the issues in a repository.
-   **Update Issue** Change an issue's state, assignee, or fields.

### Pull Requests

9

-   **Add Pull Request Comment** Add a comment to a pull request. Used to post automated review notes.
-   **Approve Pull Request** Approve a pull request on behalf of the authenticated user.
-   **Create Pull Request** Open a pull request from a source branch into a target branch.
-   **Decline Pull Request** Decline a pull request without merging it.
-   **Get Pull Request** Retrieve a single pull request by ID.
-   **List Pull Requests** List the pull requests in a repository. Used to check for duplicates.
-   **Merge Pull Request** Merge a pull request into its target branch. Run it behind a human approval on protected branches.
-   **Unapprove Pull Request** Remove the authenticated user's approval from a pull request.
-   **Update Pull Request** Update a pull request's title, description, or reviewers.

### Source

4

-   **Create or Update File** Commit a new or changed file to a branch.
-   **Get File** Read the contents of a file at a path and revision.
-   **List Commits** List the commits on a branch or across the repository.
-   **List Directory** List the files and directories under a path in the source tree.

### Branches

3

-   **Create Branch** Create a branch from a commit or existing branch.
-   **Delete Branch** Delete a branch.
-   **List Branches** List the branches in a repository.

### Pipelines

4

-   **Get Pipeline** Retrieve a single pipeline run and its status.
-   **List Pipelines** List the pipeline runs for a repository.
-   **Stop Pipeline** Stop a running pipeline.
-   **Trigger Pipeline** Start a pipeline on a branch or commit. Used to deploy a merged branch.

## Frequently Asked Questions

### What can FlowRunner do with Bitbucket?

FlowRunner agents can run Get Repository, List Repositories, and Add Issue Comment in Bitbucket, plus 24 more actions.

### Does connecting Bitbucket to FlowRunner require OAuth?

No. Bitbucket connects to FlowRunner with basic authentication (a username and password), no OAuth flow required.

### Can Bitbucket trigger a FlowRunner workflow automatically?

Bitbucket doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.

**Work at Bitbucket?** This integration exposes Bitbucket to AI agents on every FlowRunner plan, including through MCP, at no cost to you. [See what FlowRunner offers integration partners](https://flowrunner.ai/integrations/partners), including how to keep this page current.

---
Markdown version of https://flowrunner.ai/integrations/bitbucket. Site index: https://flowrunner.ai/llms.txt
