# Link call flow embed another link call

**URL:** https://discourse.nodered.org/t/link-call-flow-embed-another-link-call/85017
**Category:** General
**Created:** [29 January 2024 11:49 UTC](https://discourse.nodered.org/t/link-call-flow-embed-another-link-call/85017 "2024-01-29T11:49:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![JeromeVISUALS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jeromevisuals/32/40103_2.png) [@JeromeVISUALS](https://discourse.nodered.org/u/JeromeVISUALS)
#### Post date: [29 January 2024 11:49 UTC](https://discourse.nodered.org/t/link-call-flow-embed-another-link-call/85017/1 "2024-01-29T11:49:29Z")

</div>

Hi there,

I wonder if it's possible to have a flow used with link call node, which would also make use of a link call, like in this example :

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/b/9bfc0a78c9b17d9d552f03fa8b9c6851d66602b4.png)

If I remember correctly, link call feature makes use of a msg.\_linkSource property, and I suspect there might be some conflict, ie \_linkSource from the first link In node would be replaced later in the flow, which would create trouble in the end.....

Maybe there is an easier way to handle that, don't know. Subflows might help, but it make things a bit more difficult to handle flow context variables....

Thanks !

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [29 January 2024 12:45 UTC](https://discourse.nodered.org/t/link-call-flow-embed-another-link-call/85017/2 "2024-01-29T12:45:31Z")

</div>

The `_linkSource` property uses an array as call stack. So nested link calls should work. 🤔

This simple example is working as expected. Note the debug output for the link `_linkSource` property.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/4/d40fd8894eb4aea1359830910c87df9e7f2bd35d.png)

```auto
[{"id":"9a44a5a0f02e8367","type":"link call","z":"b98b8381ac8cf03a","name":"","links":["6be9c8272325b570"],"linkType":"static","timeout":"5","x":540,"y":740,"wires":[["12485504424e94db"]]},{"id":"9b3c35829746608d","type":"inject","z":"b98b8381ac8cf03a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":300,"y":740,"wires":[["9a44a5a0f02e8367"]]},{"id":"12485504424e94db","type":"debug","z":"b98b8381ac8cf03a","name":"outer result","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":770,"y":740,"wires":[]},{"id":"6be9c8272325b570","type":"link in","z":"b98b8381ac8cf03a","name":"link call: outer","links":[],"x":385,"y":820,"wires":[["dc7a660518b9c737","5a0dee3f55cc7f37"]]},{"id":"401cedd6c227245f","type":"link out","z":"b98b8381ac8cf03a","name":"link out 2","mode":"return","links":[],"x":715,"y":820,"wires":[]},{"id":"dc7a660518b9c737","type":"link call","z":"b98b8381ac8cf03a","name":"","links":["f0da196ec33d4d41"],"linkType":"static","timeout":"30","x":570,"y":820,"wires":[["401cedd6c227245f"]]},{"id":"5a0dee3f55cc7f37","type":"debug","z":"b98b8381ac8cf03a","name":"outer link call","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":550,"y":860,"wires":[]},{"id":"f0da196ec33d4d41","type":"link in","z":"b98b8381ac8cf03a","name":"link call: nested 1","links":[],"x":385,"y":940,"wires":[["ce08e1e0eb50a8ba","4ed55527f2be36e9"]]},{"id":"4ed55527f2be36e9","type":"link out","z":"b98b8381ac8cf03a","name":"link out 3","mode":"return","links":[],"x":715,"y":940,"wires":[]},{"id":"ce08e1e0eb50a8ba","type":"debug","z":"b98b8381ac8cf03a","name":"nested link call 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":570,"y":980,"wires":[]}]

```

---

<div class="post-metadata">

### Author: ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)
#### Post date: [29 January 2024 13:27 UTC](https://discourse.nodered.org/t/link-call-flow-embed-another-link-call/85017/3 "2024-01-29T13:27:00Z")

</div>

> [@JeromeVISUALS](#):
>
> I wonder if it's possible to have a flow used with link call node

Have you tried it?

Spoiler: It's possible, I've tried it! 🙂

I even implemented it in the [serverless version of Node-RED](https://cdn.flowhub.org/), the working [example](https://cdn.flowhub.org/?t=0#group/bc5f4ca03544bb30).

![embedlinkedcalls](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/8/68cb961099f194ff77f3be250bdf778487149a30.gif)

---

<div class="post-metadata">

### Author: ![JeromeVISUALS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jeromevisuals/32/40103_2.png) [@JeromeVISUALS](https://discourse.nodered.org/u/JeromeVISUALS)
#### Post date: [29 January 2024 19:57 UTC](https://discourse.nodered.org/t/link-call-flow-embed-another-link-call/85017/4 "2024-01-29T19:57:54Z")

</div>

Great ! thank to you guys, I'll try that !

Cheers

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [30 January 2024 05:13 UTC](https://discourse.nodered.org/t/link-call-flow-embed-another-link-call/85017/5 "2024-01-30T05:13:50Z")

</div>

> [@gregorius](#):
>
> Spoiler: It's possible, I've tried it! 🙂

You always need to top it! 🤣 🙈

---

<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: [13 February 2024 05:13 UTC](https://discourse.nodered.org/t/link-call-flow-embed-another-link-call/85017/6 "2024-02-13T05:13:55Z")

</div>

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