- Home
- Resources
- Integrations
- Jenkins
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
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.
How do you connect n8n to your Jenkins instance?
- 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.
- 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.
- 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.
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.
| Resource | Create | Get Many | Cancel Quiet Down | Copy | Shutdown | Quiet Down | Restart | Safely Shutdown | Safely Restart | Trigger | Trigger with Parameters |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Build | ✓ | ||||||||||
| Instance | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||||
| Job | ✓ | ✓ | ✓ | ✓ |
Operations index
Build
1 operationGet many builds
build.getAllWhat 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.
Instance
6 operationsCancel Quiet Down an instance
instance.cancelQuietDownWhat 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.
Quiet Down an instance
instance.quietDownWhat 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.
Restart an instance
instance.restartWhat 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.
Safely Restart an instance
instance.safeRestartWhat 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.
Safely Shutdown an instance
instance.safeExitWhat 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.
Shutdown an instance
instance.exitWhat 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.
Job
4 operationsCopy a job
job.copyWhat 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.
Create a job
job.createWhat 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.
Trigger a job
job.triggerWhat 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.
Trigger a job with parameters
job.triggerParamsWhat 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.
Need help automating Jenkins with n8n?
A person reads every message.

