Continuous Integration on n8n

Describe the problem/error/question

Hello everyone,

I’m currently building a new n8n environment for a client and since we have a lot of workflows, we want to have a process that would let us do the development as secured as possible. That mean using different environment - dev, preprod, prod - just like any tech project. I already have configured scenario autosave on github but now I’d like to go further with CI/CD. Basically, I want to work on let’s say a dev environment hosted on our servers. And when everything is working :

  • run my autosave to github workflow that will push the changes to my preprod branch (done)
  • this launch another workflow with github trigger and a deployment tool such as Jenkins (50% done)
  • deployment update scenarios for my preprod env (?)

My question is the following : is there any way possibility of updating a n8n db with this process, especially the scenarios directly on the server ?

I hope i’m making myself clear with what I want to do. FYI i’m not a devops guy so some terms are still pretty new to me, especially on the CI side.

Thanks !
Mathias

Information on your n8n setup

  • n8n version: [email protected]
  • **Database (default: SQLite):SQLite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):Docker
  • **Operating system:Mac OS
1 Like

It sounds like you just want to programmatically import new workflows into your prod server, correct?
Have you checked out the API? It allows for import of workflow via POST:

2 Likes

Hello @KHarv

Pretty straight forward, I haven’t thought about that actually but yeah, that should do it. For each of my workflows on preprod, i just have to check if they are running on prod and create or update.

Thank you !

1 Like

Neat thing is this is built into the enterprise version, but of course that isn’t accessible for everyone.

A custom built solution using the n8n API would work well too like @KHarv suggested

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.