Can I provision workflows using code (git ops)?


I maintain my workflows in a git repo as a set of JSONs but right now I need to manually import all changes from the repo to the n8n deployment. Is there a way to provision these updates automatically? Is there a terraform like integration available or even a way for n8n to pick workflows from the filesystem (a locally cloned git repo)?


Hi @nch21, welcome to the community :tada:

I am not familiar with Terraform but you could import workflows from the filesystem through the CLI (and also run them through the CLI if needed).

You can also run workflows from the filesystem (or even a remote URL if you like) through the Execute Workflow node.

Is this what you had in mind?

Thanks @MutedJam, yes thats helpful.

Its not as robust as a solution like say Terraform, (see how ChecklyHQ etc uses it) or inbuilt like in Grafana. Perhaps a possible feature to consider to allow GitOps like provisioning for n8n workflows and to facilitate better use of git for managing workflows.

But, for now, I think I can repurpose the CLI or even the Execute Workflow node to pickup the workflows from a Git repo.