404 Error when trying to retrieve workflows via n8n API (Self-Hosted n8n Instance)

Hey, I am trying to set up a workflow to back up my workflows from my self-hosted n8n instance to GitHub (using this template).

However, when using the n8n API node to GET ALL workflows, I get a 404 error. I have verified that the base URL for my n8n instance is correct, and my credentials seem to be working fine.

I’m not sure if this is related to permissions, the URL, or something else. Its probably obvious but I’m stuck and difficult to find solutions since this relates to the n8n API itself. Any help would be greatly appreciated!

What is the error message (if any)?

“The resource you are requesting could not be found
Request failed with status code 404”

Please share your workflow

Share the output returned by the last node

json

Copy code

{
  "status": "404",
  "message": "The resource you are requesting could not be found"
}

Information on your n8n setup

  • n8n version: 1.45.1
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Self-hosted via Render
  • Operating system: MacOS 14.6.1

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:

Hi @habit-ai

The credentials are a bit annoying. What URL did you set?
It needs to end with something like this /api/v1

2 Likes

when creating a new credential it shows what you need to do:
image

of course replacing the cloud url by your selfhosted url

1 Like

@BramKn Ok, yes that did it! I just added it to the URL I had entered before. Thank you!! :pray:

1 Like

Had the same issue, worked the same for me. Thanks for your reply.

1 Like

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