I am new to n8n and would like to know if there is a way to create workflow with Jenkins, chat trigger and AI agent to trigger pipeline based on chat inputs like the Job name, and parameters input if needed by the pipeline to run.
What is the error message (if any)? NA
Please share your workflow NA
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Yes, it’s possible in n8n. You can create a workflow with a chat trigger, connect it to an AI Agent node and trigger Jenkins jobs.
The AI Agent can use Tools – each Tool should clearly describe when, how, and with which parameters it should be called. Depending on the model and its strictness, this works quite well.
If you have multiple Jenkins jobs with different parameters, I suggest creating one Tool per job, with very clear instructions. This improves accuracy and control.
Thanks for your response but that would be tedious task to add jenkins tool for every pipeline job provided if there are multiple pipelines in Jenkins. Is there any way to pick up the job name from the chat trigger?
Here is an example of how to use an AI Agent node to call a custom workflow. This workflow triggers a Jenkins job.
To use a workflow as a tool, you need to define the parameters—the Accept all data option will not work here.
If you only want to pass a job name, that works well.
However, it becomes more complicated when you have different parameters. Dynamic parameters are not supported. You would need to define all possible parameters and pass null values where necessary.
It is also important to instruct the AI Agent on which value to use for each parameter.
@Franz
Thanks for the workflow but the call n8n workflow tool is not getting triggered as a result the sub-workflow is also not working. How do I pass jobName from the chat? Does it needs to be in specific format?