Resources · n8n integration

Jenkins n8n integrationAutomate Jenkins with n8n.

Your Jenkins jobs should start from something other than a cron line. The Jenkins n8n integration exposes 11 operations across 3 resources: list builds, create or copy a job, fire a job with or without parameters, and drive the instance itself. Jenkins ships no trigger node, so the workflow starts elsewhere.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the Jenkins n8n integration give you?

It is the Jenkins node, shipped with n8n, calling the Jenkins Remote Access API on your instance with an API token credential. Three resources are covered: Build, Instance and Job. From a workflow you can list the builds of a job, create a job from its XML config, copy an existing one, start a job with or without build parameters, and put the instance into quiet mode or restart it.

First scenario: a build fired by something that is not Jenkins. A message arrives, a row changes, a form is filled, and the workflow calls job.trigger on the right job. The same path works from a GitHub event when you want a branch to reach Jenkins through logic you control rather than a hook configured inside Jenkins itself.

Second scenario: build history where people actually read it. build.getAll returns the builds of one job, and the next node writes them wherever the team looks, a Postgres table for a weekly report or a channel in Slack for the last failures. Return All matters here: leave it off and n8n stops at Limit instead of walking the whole history.

Third scenario: maintenance without a human in the terminal. Before a planned window, the workflow calls instance.quietDown so no new build can start, waits for running jobs to finish, then uses instance.safeRestart or instance.safeExit. If the window is cancelled, instance.cancelQuietDown puts the instance back to normal.

Job creation is worth a word. job.create takes the XML of a Jenkins config, so the workflow needs that XML from somewhere: a template stored in a previous node, a file read earlier, a string assembled in the flow. job.copy is the shortcut when an existing job is already the template you want.

When an endpoint of the Jenkins API is not among these 11 operations, the HTTP Request node calls it directly and reuses the same Jenkins credential through predefined authentication, so nothing forces you out of n8n. Jenkins has no trigger node either, so plan the entry point: a Schedule Trigger on a fixed interval, an n8n Webhook called by a third party, or the trigger of another tool. The n8n review covers how that choice plays out on longer workflows, and the n8n training goes through credentials and expressions step by step.

Connect

How do you connect n8n to your Jenkins instance?

  1. 01

    Generate a personal API token in Jenkins

    Open the profile of the user the workflow will act as, then go to profile details, Configure, Add new token. Jenkins shows the token once, so copy it straight away. Jenkins rebuilt its token system in 2018, and older instances can still hold legacy tokens: on anything from Jenkins 2.129 onward, make sure the token you create is a non-legacy one, otherwise the calls from n8n fail on authentication.

  2. 02

    Create the Jenkins credential in n8n

    In n8n, open the Credentials menu and add a Jenkins credential. Three values go in. Jenkins Username is the user the token belongs to, not a display name. Personal API Token is the value you just copied. Jenkins Instance URL is the base URL of the instance n8n will call. A credential is created once and reused by every workflow, so a second Jenkins node picks it straight from its dropdown.

  3. 03

    Point the node at a job and run it once

    Add the Jenkins node, pick the resource and the operation, then look at Job Name or ID. The field is a dropdown loaded from your instance, which doubles as a connection test: if the job list fills up, the credential works. You can also leave the list and pass an expression such as {{ $json.job }} when the job name comes from the previous node. Execute the node once before wiring the rest.

Actions

What the Jenkins node can do, operation by operation

The Jenkins node exposes 11 operations across 3 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceCreateGet ManyCancel Quiet DownCopyShutdownQuiet DownRestartSafely ShutdownSafely RestartTriggerTrigger with Parameters
Build✓
Instance✓✓✓✓✓✓
Job✓✓✓✓

Build

1 operation
01

Get many builds

build.getAll

What you see in n8n

Notes & use cases

Returns the build history of one job, each build with the data Jenkins keeps on it. This is the read operation of the node, the one you put in front of a report or a check.

Key parameters

  • Job Name or ID: the job whose builds you want, picked from the dropdown loaded from your instance, or passed as an expression like {{ $json.job }} when it comes from a previous node.
  • Return All: on, n8n pages through the whole history; off, it stops at Limit, which caps the number of builds returned.
Use cases
a Monday summary of the builds on the release job, or a check that reads the latest builds before firing another one.

Instance

6 operations
02

Cancel Quiet Down an instance

instance.cancelQuietDown

What you see in n8n

Notes & use cases

Lifts the quiet mode on the instance and lets Jenkins accept new builds again. It is the counterpart of the quiet down operation and takes no parameter: the node acts on the instance behind the credential you selected, nothing else to fill.

Use cases
a maintenance window that ends earlier than planned, or gets cancelled. The workflow calls this operation and the build queue starts moving again, without anyone opening the Jenkins interface. Pair it with a Schedule Trigger so the instance never stays quiet longer than the window you booked.
03

Quiet Down an instance

instance.quietDown

What you see in n8n

Notes & use cases

Puts Jenkins into quiet mode: no new build can start, running jobs finish, and the instance is ready for shutdown. Nothing is required, which makes it a one click step inside a longer workflow.

Key parameters

  • Reason: free text explaining why the instance is going quiet. Jenkins shows it to whoever looks at the instance, so a line like the change ticket number saves a round of questions.
Use cases
the opening move of a maintenance sequence, run a few minutes before a plugin upgrade or a host reboot.
04

Restart an instance

instance.restart

What you see in n8n

Notes & use cases

Restarts Jenkins immediately, on environments where that is possible. Immediately is the word that matters: whatever is building at that moment does not get to finish. No parameter, the operation applies to the instance behind the credential.

Use cases
an instance that has stopped responding properly and needs to come back fast, or the last step of a recovery workflow that has already checked nothing important is running. When builds must be allowed to finish first, the safe variant is the one to reach for.
05

Safely Restart an instance

instance.safeRestart

What you see in n8n

Notes & use cases

Asks Jenkins to restart once no job is running. Jenkins stops taking the restart as an interruption and waits for the queue to drain, which is the difference with the immediate version. Nothing to configure here either.

Use cases
the restart you schedule at the end of the day and forget about. The workflow calls the operation, Jenkins waits for the last build to finish, and the instance comes back up on its own. Works on environments where restarting is possible at all.
06

Safely Shutdown an instance

instance.safeExit

What you see in n8n

Notes & use cases

Shuts Jenkins down once no job is running. Same patience as the safe restart, except the instance does not come back by itself: something outside Jenkins has to start it again. The operation takes no parameter.

Use cases
freeing a build machine at the end of a sprint, or stopping an instance before the host it runs on is moved. Put it after a quiet down step so nothing new enters the queue while the last builds are finishing.
07

Shutdown an instance

instance.exit

What you see in n8n

Notes & use cases

Stops Jenkins immediately, without waiting for running jobs. Builds in progress are cut where they are, which is sometimes exactly what you want and sometimes a bad surprise. No field to fill, the credential decides which instance is targeted.

Use cases
an emergency stop driven from an alert, for example a workflow that receives a monitoring signal and takes the instance down before it does more damage. For anything planned, the safe variant costs a few minutes and saves the current builds.

Job

4 operations
08

Copy a job

job.copy

What you see in n8n

Notes & use cases

Duplicates an existing job under a new name, keeping the configuration of the original. Faster than rebuilding a config by hand when the source job is already close to what you need.

Key parameters

  • Job Name or ID: the job being copied, chosen from the list loaded from your instance or given as an expression.
  • New Job Name: the name of the job Jenkins creates. It has to be free on the instance, so build it from data in the flow, for example the branch name carried by the item.
Use cases
spinning up a per branch pipeline from a reference job each time a new branch appears.
09

Create a job

job.create

What you see in n8n

Notes & use cases

Creates a job from scratch on the instance, from the XML config Jenkins expects. The workflow has to carry that XML, so plan where it comes from before wiring the node.

Key parameters

  • New Job Name: the name of the job to create on the instance.
  • XML: the Jenkins config XML defining the job. Most often an expression pointing at a template held by a previous node, with the variable parts replaced in the flow.
Use cases
provisioning the CI job of a new service at the same moment its repository is created, so nobody has to remember to do it later.
10

Trigger a job

job.trigger

What you see in n8n

Notes & use cases

Starts a build of the chosen job, the plain version with no build parameters. The one you reach for when the job knows what to do on its own.

Key parameters

  • Job Name or ID: the job to start, picked from the dropdown that n8n fills from your instance, or set through an expression such as {{ $json.jobName }} when the name travels with the item.
Use cases
a nightly job started by a Schedule Trigger, or a deployment job fired after an approval step, with the workflow holding the conditions instead of Jenkins.
11

Trigger a job with parameters

job.triggerParams

What you see in n8n

Notes & use cases

Starts a build and passes build parameters to it, which is how one job serves several cases instead of being cloned.

Key parameters

  • Job Name or ID: the parameterized job to start, from the list or from an expression.
  • Parameters: the parameters sent to the job, added one by one with Add Parameter. Names have to match what the job declares, and values can come from the flow.
Use cases
one deploy job driven by an environment and a version number, both read from the item that started the workflow.
Need help

Need help automating Jenkins with n8n?

A person reads every message.

FAQ

Jenkins and n8n, the questions that come next

01Is the Jenkins n8n integration free?
Yes on the n8n side. The Jenkins node ships with n8n, so there is nothing to install and no extra cost to unlock it, whether you run n8n Cloud or self host the Community Edition under the Sustainable Use licence. The same 11 operations and the same 3 resources are available in both cases, and a workflow built on one runs on the other without changes. What your Jenkins instance costs to run is a separate question and depends on how you host it, which this page does not cover.
02What credentials do you need for Jenkins in n8n?
An API token. The Jenkins credential in n8n takes three values: the Jenkins Username the token belongs to, a Personal API Token generated from that user's profile details, Configure, Add new token, and the Jenkins Instance URL n8n should call. Since the token is tied to a user, the node can do exactly what that user can do in Jenkins, so pick the account accordingly. Jenkins reworked its token system in 2018, and on an older instance you want a non-legacy token rather than one inherited from the previous system.
03What are the limits of the Jenkins node in n8n?
Two worth knowing. Reading builds is paginated: Get many builds returns the whole history only when Return All is on, otherwise it stops at Limit, so an export that looks short usually means Return All was left off rather than Jenkins running out of builds. And the node covers a defined set, 11 operations across the Build, Instance and Job resources. For an endpoint of the Jenkins Remote Access API outside that set, the HTTP Request node calls it directly and reuses the same Jenkins credential through predefined authentication, so you stay inside the same workflow.
04Can n8n react to a Jenkins build in real time?
Not through Jenkins itself, because Jenkins has no trigger node in n8n. Any workflow touching Jenkins starts somewhere else. Three usual entry points: a Schedule Trigger that runs at a fixed interval and checks builds with Get many builds, an n8n Webhook, which is a URL n8n exposes and a third party service calls when something happens, or the trigger of another tool already in the flow. The Jenkins node then acts inside that workflow, firing jobs or driving the instance.
05n8n or Make for Jenkins?
It depends on where the automation has to live. Make is hosted by Make, with no self hosting option, and is billed per operation, so a workflow that polls build history often has a cost that grows with the checks. n8n runs on Cloud or on your own machine, which matters when the Jenkins instance sits on a private network the outside world cannot reach. Both build workflows visually. Look at hosting, data control, the cost model and how comfortable your team is with expressions before picking one.