Automated GitHub PR Creation and JIRA Status Updates via Commit Messages - n8n Workflow

An expert n8n workflow to automatically create GitHub Pull Requests (PRs) and update JIRA task statuses based on special commands embedded in Git commit messages. Use this powerful n8n template for DevOps automation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

• DevOps Engineers and Platform Teams looking to streamline CI/CD.
• Software Development Teams using JIRA for tracking and GitHub for version control.
• Users who need a dynamic, command-line driven automation solution for their development pipeline.
• Those seeking advanced n8n templates for integrating engineering tools.

Overview

Managing development pipelines often requires developers to manually create Pull Requests (PRs) and update corresponding project management tasks, such as JIRA tickets. This expert n8n workflow solves this friction point by transforming structured Git commit messages into executable automation commands. By including specific flags (like [auto-pr, develop] or [taskcompleted]) directly in the commit, this n8n automation engine automatically handles GitHub PR creation, checks for duplicates, retrieves JIRA task details, updates the task status to 'Development Done,' and broadcasts the changes across communication channels like Slack and Notion. This robust n8n workflow significantly reduces context switching and ensures high data synchronization between code repositories and project tracking systems.

How it Works

This n8n workflow is initiated by a Webhook n8n trigger, configured to listen for GitHub 'push' events.


  1. Trigger and Parsing: The Webhook n8n node captures the push event. The subsequent Code n8n node rigorously parses the commit message using a regex to extract the JIRA key, description, and specific commands (e.g., auto-pr, taskcompleted, target branch).

  2. PR Command Check: An If n8n node checks if the auto-pr command was included. If true, the workflow proceeds to fetch existing JIRA task details and checks GitHub using an HTTP Request n8n node to see if a Pull Request already exists for the branch.

  3. PR Creation or Skip: If no PR exists, another HTTP Request n8n node creates the new GitHub PR, setting the title based on the JIRA key and commit description, and targeting the specified base branch.

  4. Task Completion Check: Following the PR path (or directly if auto-pr was skipped), the workflow checks if the taskcompleted command was included and if the JIRA task exists.

  5. JIRA Status Update: If the task is valid and completion is commanded, the Jira n8n node updates the ticket status to 'Development Done' (Status ID 61).

  6. Notification: Finally, the Slack and Notion n8n nodes send real-time notifications summarizing the actions taken (PR creation and JIRA status update). If no PR was requested but taskcompleted was present, the system updates JIRA and notifies the team without touching GitHub PRs, showcasing the flexibility of this n8n template.

Installation Guide

To use this powerful n8n workflow, follow these setup steps:


  1. Import the n8n Workflow JSON: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Set up the n8n Trigger: Activate the Webhook n8n node and copy its unique URL. You must configure this URL as a 'push' event webhook in your target GitHub repositories.

  3. Configure Credentials:

GitHub: Configure the GitHub API credential for the HTTP Request n8n nodes to allow checking for and creating PRs.
Jira: Configure Jira credentials for the Jira n8n node to allow fetching task details and updating statuses.
* Slack/Notion (Optional): Update the Slack and Notion n8n nodes with your desired channel IDs/page URLs and authentication details to enable notifications.

  1. Test the Workflow: Ensure your commit messages adhere to the strict format (TICKET-ID Message [command1,command2,base-branch]) before testing the n8n workflow in a development repository.

Node Details

Webhook (n8n trigger): Serves as the starting point, listening for POST requests from GitHub push events on the path /github-push.
Code (Commit Message Breakdown): This critical n8n node uses JavaScript and regex to parse the Git commit message. It extracts the Jira ticket key, the commit description, the base branch, and boolean flags (autoPR, taskCompleted) for flow control.
If (Check for PR commands / Check for task completed command): These n8n nodes control the flow path, checking the boolean flags generated by the Code node to decide whether to attempt PR creation or status updates.
Jira (Get task details / Update task status): Used to retrieve existing task metadata necessary for PR titles and descriptions, and to update the task status to 'Development Done' (status ID 61) upon successful automation.
HTTP Request (Check if PR exists / Request to create PR): These n8n nodes interact directly with the GitHub API using GitHub credentials to prevent duplicate PRs and to create new Pull Requests automatically.
Code (Code - PR Existence): Processes the response from the 'Check if PR exists' HTTP Request n8n node, setting a prExists boolean flag to inform the subsequent flow control nodes.


  • Slack / Notion: These final n8n nodes handle post-completion notifications, ensuring stakeholders are informed about the automated PR creation and the JIRA status change, completing the n8n workflow's communication loop.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Workflow automation can help automate your routine activities and help saves $$$, as well as hours of time. As a boutique tech consulting company, Intuz help businesses with custom AI/ML, AI Workflow Automations, and software development. Automate your business workflow for: Sales Marketing Accounting Finance Operations E-Commerce Customer Support Admin & Backoffice Logistics & Supply Chain

Featured*