# "Http In"-Subflow OR "Url must be unique?"

**URL:** <https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357>\
**Category:** General\
**Created:** [2 July 2020 08:14 UTC](https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357 "2020-07-02T08:14:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toastgeraet](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@Toastgeraet](https://discourse.nodered.org/u/Toastgeraet)\
**Post date:** [2 July 2020 08:14 UTC](https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357/1 "2020-07-02T08:14:49Z")

</div>

Hello,

It seems to me, that the url parameter for HttpIn Nodes must be unique, for only the first instance created will be triggered by a request.

So if i have multiple HttpIn Nodes using the same route, only one gets triggered.

Furthermore, i tried to create a HttpIn Node with a parameterized url, which i used in a subflow, thinking that i could filter on the parameter... Again only one instance of my subflow was triggered.

Is this correct and if it is, is there any known workaround?

Kind regards,  
Tobi

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [2 July 2020 09:04 UTC](https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357/2 "2020-07-02T09:04:13Z")

</div>

Yes, that behaviour is indeed correct. If you’re hoping to have the handling changed depending on parameters, your best bet is to add a switch node behind the http-in, and have all different actions behind the different outputs on the switch, then wire it back to an http-response node.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [2 July 2020 09:15 UTC](https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357/3 "2020-07-02T09:15:02Z")

</div>

And you can use named parameters ( :foo ) - in the url - see the node info.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [2 July 2020 09:16 UTC](https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357/4 "2020-07-02T09:16:35Z")

</div>

> [@Toastgeraet](#):
>
> Furthermore, i tried to create a HttpIn Node with a parameterized url, which i used in a subflow, thinking that i could filter on the parameter... Again only one instance of my subflow was triggered.

I believe that has already been tried, but I may have misinterpreted 🙂

The issue here is that when in a subflow, if the instance doesn’t have a way of making it a unique url only one instance will be triggered. So either make sure that the URL is unique, say you use a subflow instance id or something in the address, or handle the different actions in subflows but the http-in on top of it

---

<div class="post-metadata">

**Author:** ![Toastgeraet](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@Toastgeraet](https://discourse.nodered.org/u/Toastgeraet)\
**Post date:** [2 July 2020 10:08 UTC](https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357/5 "2020-07-02T10:08:46Z")

</div>

Thanks for your input.

That sounds similar to what i was trying to achieve. But how am i supposed to get the subflow instance id into the url?

Using parameterized urls (:something) does not work with multiple subflow instance, as stated above. Your interpretation was correct.

---

<div class="post-metadata">

**Author:** ![Toastgeraet](https://avatars.discourse-cdn.com/v4/letter/t/e480ec/32.png) [@Toastgeraet](https://discourse.nodered.org/u/Toastgeraet)\
**Post date:** [2 July 2020 10:14 UTC](https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357/6 "2020-07-02T10:14:51Z")

</div>

Currently i have a "Global Stuff"-Tab where i put the Endpoint. Then i use Link-Nodes to relay the message to of all my subflow instances across different tabs.

Inside the instances, i then handle the message differently, depending on the passed url parameter. At most one of these instances does something by design.

I was hoping to get the Endpoint INSIDE the subflow, so i can make the subflows self-sufficient and eliminate the link-nodes.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 August 2020 10:15 UTC](https://discourse.nodered.org/t/http-in-subflow-or-url-must-be-unique/29357/7 "2020-08-31T10:15:05Z")

</div>

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