Back to Blog
n8nBitbucketDevOpsautomationtutorial

n8n + Bitbucket Integration: 5 Powerful Workflows for DevOps Teams

n8nautomation TeamApril 14, 2026
TL;DR: This guide shows you how to connect n8n and Bitbucket to automate your development pipeline. We'll walk through five practical workflows, including sending commit notifications to Slack, creating issues from form submissions, and syncing pull requests with project management tools like Trello.
An effective n8n Bitbucket integration is key to automating your software development lifecycle and eliminating manual DevOps tasks. By connecting Bitbucket's powerful version control capabilities with n8n's flexible workflow automation, you can build robust pipelines that notify your team of code changes, manage issues more effectively, and sync development progress across your favorite tools. This guide provides five powerful, step-by-step examples to get you started on building a fully automated development workflow.

Understanding the n8n Bitbucket Node

Before diving into the workflows, let's get familiar with the core component: the Bitbucket node in n8n. This node acts as both a trigger and an operation node, giving you a wide range of possibilities. To get started, you'll first need to connect your Bitbucket account.
  1. In your n8n workflow, add a Bitbucket node.
  2. In the 'Credentials' dropdown, select 'Create New'.
  3. You'll need an 'OAuth2 App Password' from your Bitbucket account settings. Navigate to your Bitbucket profile > Settings > App passwords and create a new one with the necessary permissions (e.g., `repositories:read`, `issues:write`, `pullrequests:read`).
  4. Enter your Bitbucket Username and the App Password into the n8n credential modal and save.
The Bitbucket node can:
  • Trigger workflows based on events like `Push`, `Pull Request Created`, `Issue Updated`, and more.
  • Perform actions like `Get`, `Create`, `Update`, or `Delete` repositories, issues, comments, and pull requests.
This dual functionality allows you to build workflows that react to events in Bitbucket and also workflows that manage your Bitbucket projects from external triggers.

Workflow 1: Send New Commit Notifications to Slack

Keeping your team updated on code changes is crucial for collaboration. This workflow automatically sends a formatted message to a Slack channel every time a new commit is pushed to a specific branch in your Bitbucket repository. Nodes You'll Need:
  • Bitbucket Trigger: — start the workflow on a new commit.
  • Slack: — send the notification message.
Step-by-Step Guide:
  1. Set up the Bitbucket Trigger: Add a Bitbucket Trigger node to your canvas. Select your credentials. In the 'Events' field, choose `Push`. Specify the 'Workspace' and 'Repository' you want to monitor. You can optionally specify a branch (e.g., `main` or `develop`) to avoid noise from feature branches.
  2. Configure the Slack Node: Add a Slack node and connect it to the Bitbucket Trigger. Select your Slack credentials. Choose the 'Channel' where you want to post the notification.
  3. Craft the Message: In the 'Text' field of the Slack node, use expressions to pull data from the trigger. This creates a dynamic and informative message. For example:
New commit in `{{$json["body"]["repository"]["name"]}}` on branch `{{$json["body"]["push"]["changes"][0]["new"]["name"]}}` by {{$json["body"]["actor"]["display_name"]}}.

Commit message: "*{{$json["body"]["push"]["changes"][0]["new"]["target"]["message"]}}*"

View changes: {{$json["body"]["push"]["changes"][0]["links"]["html"]["href"]}}
  1. Activate the Workflow: Save and activate your workflow. Now, every new push to the specified branch will trigger an instant Slack notification, keeping your team in the loop without any manual effort.

Tip: You can add an IF node after the trigger to filter notifications. For instance, you could check if the commit message contains `[skip-ci]` or if the commit author is a specific bot user, and stop the workflow to prevent unnecessary alerts.

Workflow 2: Create Bitbucket Issues from Google Form Responses

Streamline your bug reporting and feature request process by automatically creating a Bitbucket issue whenever someone submits a Google Form. This eliminates the need to manually copy-paste details from form responses into your issue tracker. Nodes You'll Need:
  • Google Form Trigger: — start the workflow on a new submission.
  • Bitbucket: — create the new issue.
Step-by-Step Guide:
  1. Create Your Google Form: Design a Google Form with fields like 'Report Title', 'Description', 'Reporter Email', and 'Priority'.
  2. Configure the Google Form Trigger: Add a Google Form Trigger node in n8n. Authenticate your Google account. Select your form from the dropdown. When you first activate it, n8n will provide a webhook URL to add to your form's script editor.
  3. Set up the Bitbucket Node: Add a Bitbucket node. Set 'Resource' to `Issue` and 'Operation' to `Create`. Select the correct 'Workspace' and 'Repository'.
  4. Map Form Data to the Issue: Use expressions to map the data from the Google Form to the fields in the Bitbucket node.
    • Title: Drag the `Report Title` field from the trigger node's output.
    • Content: Combine multiple form fields to build a detailed issue description. For example: `
      **Reporter:** {{$json["body"]["Reporter Email"]}}\n\n**Description:**\n{{$json["body"]["Description"]}}\n\n**Priority:** {{$json["body"]["Priority"]}}
      `
  5. Activate and Test: Activate the workflow, submit a test response to your Google Form, and watch as a new, perfectly formatted issue appears in your Bitbucket repository instantly.

Workflow 3: Sync Pull Request Updates to Trello

Bridge the gap between your code repository and your project management board. This workflow finds a Trello card related to a Bitbucket pull request and moves it to a "In Review" list, adding a link to the PR for easy access. Nodes You'll Need:
  • Bitbucket Trigger: — trigger on new Pull Requests.
  • Trello: a two nodes - one to find a card, one to update it.
Step-by-Step Guide:
  1. Set up the Bitbucket Trigger: Start with a Bitbucket Trigger node configured for the `Pull Request Created` event.
  2. Parse the PR Title: Often, branch names or PR titles contain an issue ID (e.g., "PROJ-123"). Use a Code node or simple expression to extract this ID from the PR title: `{{$json["body"]["pullrequest"]["title"].split(' ')[0]}}`.
  3. Find the Trello Card: Add a Trello node. Set 'Resource' to `Card` and 'Operation' to `Search`. In the 'Query' field, use the issue ID extracted in the previous step. This will find the card with that ID in its title or description.
  4. Update the Trello Card: Add another Trello node. Set 'Resource' to `Card` and 'Operation' to `Update`.
    • For 'Card ID', use an expression to get the ID of the card found in the previous step: `{{$node["Trello"].json["id"]}}`.
    • Select the target 'List', such as "In Review".
    • In the 'Description' or 'Content' field, you can append the PR link: `{{$node["Trello"].json["desc"]}}\n\n**PR Link:** {{$json["body"]["pullrequest"]["links"]["html"]["href"]}}`.
  5. Launch: Activate the workflow. Now, when a developer opens a pull request with the correct ID in the title, your Trello board will update automatically, keeping project managers and other stakeholders informed. Running your automations on a reliable platform like n8nautomation.cloud ensures these critical updates are never missed.

Workflow 4: Auto-Create a Repository from a Notion Database

For teams that plan projects in Notion, this workflow automates the first step of the development process. When a new project is marked as "Ready for Dev" in a Notion database, n8n automatically creates a new, corresponding Bitbucket repository. Nodes You'll Need:
  • Notion Trigger: — start when a database item is updated.
  • IF: — check if the project is ready.
  • Bitbucket: — create the repository.
Step-by-Step Guide:
  1. Configure the Notion Trigger: Add a Notion Trigger node. Authenticate your account and select your 'Projects' database. Choose the 'Database Updated' event so it runs whenever a page changes.
  2. Filter for Status: Connect an IF node. Set a condition to check if the 'Status' property of the Notion page is now "Ready for Dev". This ensures the workflow only proceeds for projects that have been approved.
  3. Set up the Bitbucket Node: On the 'true' branch of the IF node, add a Bitbucket node.
    • Set 'Resource' to `Repository` and 'Operation' to `Create`.
    • Select your 'Workspace'.
    • For 'Repository Name', use the 'Project Name' property from the Notion trigger output. It's best to format this to be URL-friendly, e.g., `{{$json["body"]["properties"]["Project Name"]["title"][0]["plain_text"].toLowerCase().replace(/ /g, '-')}}`.
    • You can also set the 'Description' from a Notion property and decide whether the repository should be private.
This workflow standardizes your project kickoff process, ensuring that every new development effort gets a properly named repository without any manual intervention.

Workflow 5: Email a Weekly Repository Activity Summary

Keep stakeholders informed without manual report generation. This workflow runs on a schedule, gathers key statistics about a repository's activity for the past week, and emails a summary to a predefined list. Nodes You'll Need:
  • Schedule Trigger (Cron): — run the workflow weekly.
  • Date & Time: — calculate the date for one week ago.
  • Bitbucket: a multiple nodes to get commit and PR data.
  • Code: — format the summary.
  • Send Email: — send the final report.
Step-by-Step Guide:
  1. Schedule the Workflow: Start with a Schedule Trigger node. Set it to run every Friday at 5 PM, for example.
  2. Get Last Week's Date: Use a Date & Time node to get the date from 7 days ago. You will use this to filter the data from Bitbucket.
  3. Fetch Commits: Add a Bitbucket node. Set 'Resource' to `Commit` and 'Operation' to `Get Many`. In the 'Additional Fields', add an 'Include' parameter to only fetch commits after the date calculated in the previous step.
  4. Fetch Pull Requests: Add another Bitbucket node to fetch recently created or merged pull requests, filtering by date as well.
  5. Format the Summary: Use a Code node to process the data. You can count the number of commits, list the authors, and summarize the open/merged pull requests into a clean HTML or Markdown string.
  6. Send the Email: Connect a Send Email node (or a service like SendGrid). In the body, use the formatted string from the Code node. Set your recipients and a clear subject like "Weekly Bitbucket Activity Report for [Repo Name]".
Automating this report saves your team leads hours each month and provides consistent, data-driven updates to project stakeholders. With a managed service like n8nautomation.cloud, you can be confident your scheduled workflows run reliably without worrying about server uptime or maintenance.

Ready to automate with n8n?

Get affordable managed n8n hosting with 24/7 support.