How to incorporate workflows in n8n cloud into my git repo?

I saw this awesome video on the official n8n Youtube channel describing how people can commit their nodes/workflows and create PRs to a Github account. This is amazing! I could be wrong, but it seemed as if it was only really feasible using a self hosted version (given the extensive use of the command line).

We use Github workflows extensively in our company repo and I feel as if the only way I’m going to be able to integrate n8n into the rest of our stack is if there is a way to:

  • checkout a branch on Github
  • make changes to workflows on n8n cloud
  • commit those changes
  • push code/open a PR

I found this example workflow which explains part of the puzzle. But i’m really trying to find out if all of the above steps can be accomplished using n8n cloud specifically.

If it’s not possible via n8n cloud, then i’ll happily self-host. I just want to know what is possible and how. Would love to hear from someone who has managed to get Github & n8n working for them!! :slight_smile:

Thanks in advance

Hey @hdotking,

If you are after backing up workflows I use the workflow below, It runs on a schedule rather than if a workflow is created or updated but should work on cloud to get you started.

If you did want to take the branching route with PRs using the Git node might be better or you could use the Execute Command node (on self hosted) with the git command.

1 Like

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