How to Create or Replace Files Using GitHub Node in n8n?

Greetings,

I am using the GitHub Node in n8n (as described here: GitHub Node Docs).

I need to upload files to a GitHub repo. If the file already exists, I want to replace it; if it doesn’t, I want to create it.

However, the GitHub node currently throws an error if the file already exists. My current workaround is to check if the file exists, delete it, and then upload it, but this adds extra nodes to my workflow.

Is there a way to create or replace a file in a single step without errors?

Thanks!

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

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