Unable to reuse Workflows

Hello team, thank you for the amazing workflow tool.

We are evaluating the tools to have a deeper understanding.

Here is what we are trying to do,

Say User 1 creates workflow locally and publishes it on to a self-hosted repo, so that all the users across the team can execute the workflows.

The expected behavior is not working.

In the environment variable, specific folder is specified via the N8N_USER_FOLDER variable. But every time the project is deployed it creates a new set of .n8n folders instead of using the available resources.

The desired behavior is it should use the already available workflows from N8N_USER_FOLDER. Is it something I have missed or configured wrongly.

Any hints for resolving this would be appreviated.

Version : 0.148.0

Regards,
Onkar

Hi @theonkar10,

What do you mean when you say a new project is deployed? If you are just exporting and importing workflows it shouldn’t impact the local installs of n8n.

@jon yes import & export is working, but I am looking to maintain it via a specific version control tool, so that super-user can only make changes to the workflow instead of each & every user doing it and so as to make workflows “non-editable”

@theonkar10 so what I do is export and post to git then I have a manual import process I do to move them into a production environment.

What I am not sure about though is when you are saying the .n8n folders are recreated that shouldn’t happen. How are you importing the workflows into the other instances?

@jon using env variables, I am able to have them set in a pre-defined file location. It is working as expected across different devices , where I am cloning the repository. But when deployed using Docker it is not working as intended.

Also, the workflows contain sensitive information like login credentials which I would like to hide from wider audience and use them as env variables.

@theonkar10 it sounds like there is more to this, When you are deploying using docker are you setting the same env options then importing the workflows or have you made your own docker image and that is what you are updating and pushing out?

@jon the same env variables as I am using them for testing local scenarios.

Instead of

image

I am getting below message everytime

UserSettings were generated and saved to: workflows\.n8n\config

Also, the workflows contain sensitive information like login credentials which I would like to hide from wider audience and use them as env variables.

@theonkar10 does the folder exist when you set up the docker image? I would also say putting the credentials in env variables it not going to hide them anyone with access to the n8n interface will be able to view them.

This one may need one of the n8n team to take a look.

@jon Thank you for your time and sharing your valuable thoughts. Will look for some response from n8n team.

I just tested. Works perfectly fine:

First start: it does not exist, so it creates it
Second start: it does already exist so it does not create anything and just uses it

So I assume there must be a different issue like that the environment variable does not get set correctly, the folder does not get persisted, …?