Webhook - Enhanced with dynamic elements in path RESTful API approach

I find myself using some 3rd party APIs that require to include dynamic elements into the URL. (i.e. /api/customer/{{id}}/update)

The same way, I really need to be able to create a webhook that can receive dynamic elements in the URL or even additional paths than the one set in the webhook. (defined by other systems in this way). (i.e this setup in n8n as the path: /webhook/invoice) and be able to receive posts to /webhook/invoice/{{id}}/delete or /webhook/invoice/{{id}}/update.

Maybe even a wildcard such as the ? works for query params that receives the post and brings the query param into the response. i.e /webhook/invoice?account=apj results in including this into the response: query: {“account”: “apl”}. This way anything after an ending “/” of the webhook could come to the response as additionalPath: “{{id}}/delete” or whatever comes after the defined webhook.

I really need this to go forward with a project, any ideas for a way around this would be awesome!

I think this can be a gamechanger in terms of the power of webhooks!
If you think this can help your projects please help me upvote this FR :wink:

@jan @maxT @RicardoE105

Hey @pradilla!

Definitely see the value in a wildcard that then makes the rest of the URL available to the workflow. I imagine there are some complexities under the hood but would also allow to build out workflows that look and feel much more like RESTful endpoints (and so more usable with other systems). Have upvoted this.

Quick loom video on queries with Webhook - does that help for this immediate usecase? https://www.loom.com/share/8b9bc642e384412c9f712242dc8c23c7

Thanks!

Excellent!!! Thanks for the UpVote! :wink:
Regarding the query. I actually am receiving parameters and even without them being configures in the webhook url n8n processes these correctly! :+1:

Wilcard URL Paths Rocks :metal:

1 Like