Webhook url path altered when using variables

Hi, hope someone can help with this, I am about to go insane :upside_down_face:

Describe the issue/error/question

When I add a webhook and specify the path “api” the full url will be
http://ip:port/webhook-test/api

But if I add a variable to the path like api/:version the webhook url created be like
http://ip:port/webhook-test/5f5040e5-463c-43fa-bbd0-64b1364e9a07/api/:version
So n8n automatically add the webhook id to the url. I see no way of changing this in the UI.

What is the error message (if any)?

No error but webhook url not like I would expect.

Please share the workflow

Information on your n8n setup

  • **n8n version: 0.190.0
  • **Database you’re using (default: SQLite):Postgres
  • **Running n8n with the execution process [own(default), main]:queues
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]:docker

Hi @Micke, welcome to the community!

That’s a good find. I wasn’t aware of this, but will make sure to add it to our internal bug tracker. Sorry for the trouble, we’ll make sure to let you know once this is fixed.

Perhaps you can consider using query parameters until this is fixed. As in using a path of api and then opening a URL like .../api?foo=bar to send a foo parameter with a value of bar?

Hi @MutedJam
Thank you for response. I ended up accepting the webhook id in the url (partly).
If i create a webhook with a paramter i get a long url with the ID in the URL.
If I copy this one and add a second paramter the base part of the URL persist.
So now I get:
ip:port/webhookId1/:path1/
ip:port/webhookId1/:path2

And if I end up exposing this online I can hide the webhookId1 part with the loadbalancer.

Also Webhook - Enhanced with dynamic elements in path RESTful API approach [GOT CREATED] - #8 by jan seems to suggest this is the expected behaviour.

Best regards
Mikael

1 Like