Intermediate~20 min setupDeveloper Tools & Project ManagementVerified April 2026
GitHub logo
Jira logo

How to Link Commits to Jira Tickets with N8n

Automatically add commit details to Jira tickets when developers include ticket keys in their commit messages.

Steps and UI details are based on platform versions at time of writing — check each platform for the latest interface.

Best for

Development teams that need custom commit parsing logic or non-standard Jira ticket formats.

Not ideal for

Teams wanting plug-and-play setup without writing any code or regex patterns.

Sync type

real-time

Use case type

notification

Real-World Example

💡

A 12-person SaaS development team uses this to automatically document code changes on Jira tickets. Before automation, developers manually copied commit links into ticket comments, which happened inconsistently and wasted 15 minutes per ticket. Now every commit with a ticket key creates an instant comment with the exact changes and GitHub link.

What Will This Cost?

Drag the slider to your expected monthly volume.

/mo
505005K50K

Each platform counts differently — Zapier: 1 task per trigger. Make: 1 operation per module per record. n8n: 1 execution per run.

Prices shown for annual billing. Based on published pricing as of April 2026.

Estimated ROI

1000

min saved/mo

$583

labor value/mo

Free

no platform cost

Based on ~2 min manual effort per operation at $35/hr fully loaded labor cost.

Implementation

Skip the setup

Import this workflow directly into n8n

Copy the pre-built n8n blueprint and paste it straight into n8n. All modules, filters, and field mappings are already configured — you just need to connect your accounts.

Before You Start

Make sure you have everything ready.

GitHub repository with admin access to configure webhooks
Jira Cloud instance with API token for your account
N8n instance (cloud or self-hosted) with webhook access
Basic understanding of Jira ticket key format (PROJECT-123)

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Ticket KeyticketKey
Commit SHAsha
Commit Messagemessage
Author Nameauthor.name
Repository Namerepository.name
1 optional field▸ show
Commit URLhtml_url

Step-by-Step Setup

1

Workflows > + New workflow

Create new N8n workflow

Start with a blank workflow to handle GitHub webhook events. This workflow will listen for push events and parse commit messages for Jira ticket keys.

  1. 1Click the purple '+ New workflow' button on N8n dashboard
  2. 2Delete the default 'When clicking 'Test workflow'' node
  3. 3Click the gray '+' button to add your first node
What you should see: Empty workflow canvas with a single '+' button ready for your first node.
2

Trigger Nodes > Webhook

Add GitHub webhook trigger

Configure the webhook node to receive push events from GitHub. This creates an endpoint URL that GitHub will call whenever someone pushes commits.

  1. 1Search for 'Webhook' and select the 'Webhook' trigger node
  2. 2Set HTTP Method to 'POST'
  3. 3Set Path to '/github-commits'
  4. 4Leave Authentication as 'None'
  5. 5Click 'Execute Node' to generate the webhook URL
What you should see: Webhook node shows a URL like 'https://your-n8n.com/webhook/github-commits' in green text.
Common mistake — Copy the webhook URL now — you'll need it for GitHub setup and it only shows after execution.
n8n
+
click +
search apps
GitHub
GI
GitHub
Add GitHub webhook trigger
GitHub
GI
module added
3

GitHub > Repository > Settings > Webhooks

Configure GitHub repository webhook

Tell GitHub to send push events to your N8n webhook. This happens in your repository settings, not in N8n.

  1. 1Go to your GitHub repository and click Settings tab
  2. 2Click 'Webhooks' in the left sidebar
  3. 3Click 'Add webhook' button
  4. 4Paste your N8n webhook URL into 'Payload URL'
  5. 5Set Content type to 'application/json'
  6. 6Select 'Just the push event'
  7. 7Check 'Active' and click 'Add webhook'
What you should see: Green checkmark appears next to your webhook URL showing successful delivery test.
Common mistake — GitHub sends a test ping immediately — check N8n executions to verify it received the ping event.
4

Data Transformation > Code

Add code node for commit parsing

Extract individual commits and scan messages for Jira ticket patterns. GitHub sends all commits in a single webhook, so you need to loop through them.

  1. 1Click the '+' button after the webhook node
  2. 2Search for 'Code' and select 'Code' node
  3. 3Rename it to 'Parse Commits'
  4. 4Set Mode to 'Run Once for All Items'
What you should see: Code node appears connected to webhook with 'Parse Commits' label.

Drop this into an n8n Code node.

JavaScript — Code Node// Enhanced regex for multiple ticket formats
▸ Show code
// Enhanced regex for multiple ticket formats
const ticketRegex = /(?:^|\s)([A-Z]{2,10}-\d+)(?:\s|$|:)/gi;
const tickets = [];

... expand to see full code

// Enhanced regex for multiple ticket formats
const ticketRegex = /(?:^|\s)([A-Z]{2,10}-\d+)(?:\s|$|:)/gi;
const tickets = [];
let match;
while ((match = ticketRegex.exec(message)) !== null) {
  tickets.push(match[1]);
}
return [...new Set(tickets)]; // Remove duplicates
5

Parse Commits node > JavaScript Code

Write commit parsing logic

Add JavaScript code to extract commit data and find Jira ticket keys using regex. This handles the core logic of matching commit messages to tickets.

  1. 1Paste the parsing code into the JavaScript Code field
  2. 2Click 'Execute Node' to test with sample data
  3. 3Verify the output shows parsed commits with ticket keys
What you should see: Output shows array of commits with extracted ticket keys, commit SHAs, and author info.
Common mistake — The regex pattern [A-Z]+-\d+ matches most Jira keys, but adjust if your project uses different formats.
6

Credentials > + Create Credential > Jira

Add Jira credentials

Connect N8n to your Jira instance using API tokens. You'll need this connection before adding Jira nodes to the workflow.

  1. 1Click 'Credentials' in the left sidebar
  2. 2Click 'Create Credential' and search for 'Jira'
  3. 3Select 'Jira Software Cloud API'
  4. 4Enter your Jira domain (company.atlassian.net)
  5. 5Enter your email and Jira API token
  6. 6Click 'Save' and test connection
What you should see: Green 'Connection successful' message appears after testing Jira credentials.
Common mistake — Use an API token, not your password — generate one at id.atlassian.com/manage-profile/security/api-tokens.
7

Apps > Jira Software > Issue Comment > Add

Add Jira node for comments

Configure the Jira node to add comments to tickets. This node will run once for each commit that contains a valid ticket key.

  1. 1Click '+' after the Parse Commits node
  2. 2Search for 'Jira' and select 'Jira Software'
  3. 3Set Resource to 'Issue Comment'
  4. 4Set Operation to 'Add'
  5. 5Select your Jira credentials from dropdown
What you should see: Jira node appears with comment configuration fields ready for mapping.
8

Jira node > Issue Comment fields

Map Jira comment fields

Connect commit data to Jira comment fields using N8n expressions. This creates the actual comment content with commit details.

  1. 1Set Issue Key to {{ $json.ticketKey }}
  2. 2Click in Comment Body field and select 'Expression'
  3. 3Enter the comment template with commit details
  4. 4Test the expression to verify formatting
What you should see: Comment preview shows formatted text with commit SHA, author, and message.
Common mistake — Jira comment body expects plain text or Wiki markup — HTML tags will show as literal text.
GitHub fields
title
body
state
html_url
user.login
available as variables:
1.props.title
1.props.body
1.props.state
1.props.html_url
1.props.user.login
9

Jira node > Settings > Error handling

Add error handling

Configure what happens when Jira API calls fail. Without this, one invalid ticket key will stop the entire workflow.

  1. 1Click the Jira node settings (three dots)
  2. 2Select 'Settings' from dropdown
  3. 3Set 'Continue On Fail' to true
  4. 4Choose 'Add item to output' for error handling
What you should see: Jira node shows a small warning icon indicating error handling is configured.
Common mistake — Don't set this to 'Ignore' — you want to log failed ticket keys for debugging.
10

Executions > Latest run

Test with real commit

Push a commit with a Jira ticket key to verify end-to-end functionality. This tests both GitHub webhook delivery and Jira comment creation.

  1. 1Make a test commit with format 'PROJ-123: fix login bug'
  2. 2Push to your connected GitHub repository
  3. 3Check N8n executions log for webhook trigger
  4. 4Verify comment appears on Jira ticket PROJ-123
What you should see: New comment appears on Jira ticket with commit SHA, author name, and link to GitHub commit.
Common mistake — Use a real ticket key that exists in your Jira project — the API will fail silently on invalid keys.
n8n
▶ Run once
executed
GitHub
Jira
Jira
🔔 notification
received
11

Workflow > Save > Active toggle

Save and activate workflow

Enable the workflow to run automatically on future commits. Once active, it will process all pushes to your repository.

  1. 1Click 'Save' button in top right
  2. 2Name your workflow 'GitHub Commit to Jira'
  3. 3Toggle the 'Active' switch to On
  4. 4Verify webhook node shows 'Listening' status
What you should see: Workflow shows 'Active' badge and webhook displays green 'Listening for webhooks' message.
Common mistake — Inactive workflows won't receive webhooks — the toggle must be On for GitHub to trigger executions.

Scaling Beyond 100+ commits/day+ Records

If your volume exceeds 100+ commits/day records, apply these adjustments.

1

Add API rate limiting

Insert a Wait node with 200ms delay between Jira API calls to stay under their 10 req/sec limit. Without this, bulk commits will hit 429 rate limit errors.

2

Batch comment creation

Modify the code node to group multiple commits per ticket into single comments. This reduces API calls and creates cleaner ticket history for tickets with many commits.

Going live

Production Checklist

Before you turn this on for real, confirm each item.

Troubleshooting

Common errors and how to fix them.

Frequently Asked Questions

Common questions about this workflow.

Analysis

VerdictWhy n8n for this workflow

Use N8n for this if you want full control over the commit parsing logic and comment formatting. The code node lets you handle complex regex patterns and custom Jira ticket formats that Zapier's built-in text parsing can't match. You can also add conditional logic for different project keys or author-based filtering. Skip N8n if your team needs a quick setup — Zapier's GitHub-Jira integration works in 3 clicks but only handles basic ticket key formats.

Cost

This workflow uses 1 execution per push event, regardless of commit count. At 50 pushes per month (typical for a 5-person dev team), that's 50 executions monthly. N8n's Starter plan includes 5,000 executions for $20/month, so you're well under the limit. Zapier charges per task — each commit comment counts separately, so the same 50 pushes with 3 commits each costs 150 tasks monthly. Their Professional plan at $49/month handles this volume, making N8n 60% cheaper.

Tradeoffs

Zapier wins on setup speed — their GitHub trigger includes built-in commit parsing and Jira integration templates. Make offers better error handling with automatic retries and dead letter queues for failed API calls. But N8n gives you the most flexibility for custom commit message patterns and complex conditional logic. If your team uses non-standard ticket formats or needs custom filtering, N8n's code node handles edge cases that trip up the other platforms.

GitHub's push webhook includes all commits in a single payload, not individual events per commit. Your parsing code needs to loop through the commits array and extract each message separately. Jira's API rate limit is 10 requests per second — if developers push large commit batches, add a delay node between iterations. The webhook fires immediately on push, but Jira comments can take 10-30 seconds to appear in the UI due to their caching layer.

Ideas for what to build next

  • Add Slack notifications for high-priority ticketsSend a Slack message when commits are made to tickets labeled 'urgent' or 'production'. Use an IF node to check ticket labels via Jira API before posting to Slack.
  • Create commit activity dashboardLog all commit-to-ticket links in a Google Sheet or Airtable to track developer activity and code review metrics. Add timestamp and project data for reporting.

Related guides

Was this guide helpful?
GitHub + Jira overviewn8n profile →