Github Repo for Function Node

Hi, I’m trying to work out how you would set up a development environment for your n8n workflows…specifically for the function node but actually thinking about it, the question is really:

How best to set up development environment for javascript and python data processing? I could use the function node for simple javascript but maybe I’d want to just execute code scripts from the execute command node and then just keep the scripts in a github repo…?

What are best practices for that? I haven’t been able to find anything yet in docs but it’s probably there…

Thanks again, Joel.

Sadly not sure I fully understand your question but maybe the following helps:

It is the documentation for the CLI option to export/import workflows as JSON. That would make it possible to then version control them easier via GitHub.

If it is not helpful please simply say so and please clarify your question a little bit more. We will then do our best to answer it. Thanks!

Hey I’m finally looking back into this. Sorry for not replying…

So this might work…one question I have is how to do this for an n8n instance running in Docker…

I’m haven’t worked with Docker much…I can see by searching online that I should be able to run a bash shell inside Docker and from there I should be able to run n8n but maybe I need to update my docker-compose?

Do you have any documentation on that?

Thanks! Joel.

Ok…running this command I’m getting closer…

docker exec -it n8n export:workflow --all --output=/home/workflows

I get the error: Error: No workflows found with specified filters.

Is it something to do with volumes in the docker-compose? Or…other?

Thanks!

The problem is that you did not mount any folders. For that reason will n8n not be able to find the data in the database (as it is totally missing) and can so not find any workflows. So you have to add a mount to where the n8n data is stored via -v.

Best to check out this discussion: