# Possible to trigger flow from Template Node?

**URL:** <https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304>\
**Category:** General\
**Created:** [5 July 2024 20:51 UTC](https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304 "2024-07-05T20:51:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![number005](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/number005/32/7430_2.png) [@number005](https://discourse.nodered.org/u/number005)\
**Post date:** [5 July 2024 20:51 UTC](https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304/1 "2024-07-05T20:51:13Z")

</div>

I have an input field with a phone number. Is it possible to use this number and trigger a flow with it?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 July 2024 21:18 UTC](https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304/2 "2024-07-05T21:18:30Z")

</div>

A template node or a ui\_template node?

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [6 July 2024 03:30 UTC](https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304/3 "2024-07-06T03:30:22Z")

</div>

assuming old dashboard and ui-template, i have a flow sample from forum, which gets input from the user and displays the result. this works after entering the details and on clicking the **submit** button. hope this is what you are expecting.

```auto
[{"id":"bf69ec07f90714eb","type":"ui_template","z":"f892482e98c74480","group":"feabd600.f71b28","name":"INPUT","order":2,"width":"24","height":"6","format":"<!DOCTYPE html>\n <html>\n<h1>Input Screen</h1>\n<form ng-submit=\"send({payload: mymodel})\">\n <TABLE BORDER=\"1\">\n <TR>\n <TD>Name</TD>\n <TD ALIGN=\"left\"><INPUT ng-model=\"mymodel.fname\" TYPE=\"text\" SIZE=\"25\" NAME=\"fname\">\n </TD>\n </TR>\n <TR>\n <TD>Phone Number</TD>\n <TD ALIGN=\"left\"><INPUT ng-model=\"mymodel.number\" TYPE=\"text\" SIZE=\"25\" NAME=\"phnnum\">\n </TD>\n </TR>\n <TR>\n <TD class=\"select\">Chose Vehicle\n </TD>\n <TD ALIGN=\"center\">\n <select ng-model=\"mymodel.select\" >\n <option value=\"volvo\">Volvo</option>\n <option value=\"MG\">MG</option>\n <option value=\"Mercedes\">Mercedes</option>\n <option value=\"Audi\">Audi</option>\n <option value=\"BMW\">BMW</option>\n </select>\n </TD>\n </TR>\n <TR>\n <TD><INPUT TYPE=\"submit\" VALUE=\"Submit\"></TD>\n <TD><INPUT TYPE=\"reset\" VALUE=\"Clear\"></TD>\n </TR>\n </TABLE>\n</form>\n</html>\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":325,"y":525,"wires":[["34b9365899b8d35c","b326049bc36baf27"]]},{"id":"34b9365899b8d35c","type":"change","z":"f892482e98c74480","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"'Mr. '&payload.fname&' has a '&payload.select&' and his Phone Number is '&payload.number","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Hi","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":485,"y":525,"wires":[["9bf6820ec2ef4839","ab89fb3781edefb1"]]},{"id":"9bf6820ec2ef4839","type":"ui_toast","z":"f892482e98c74480","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"","x":670,"y":525,"wires":[[]]},{"id":"b326049bc36baf27","type":"debug","z":"f892482e98c74480","name":"debug 2614","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":495,"y":425,"wires":[]},{"id":"ab89fb3781edefb1","type":"ui_text","z":"f892482e98c74480","group":"feabd600.f71b28","order":4,"width":0,"height":0,"name":"","label":"Output:","format":"{{msg.payload}}","layout":"row-left","className":"","style":true,"font":"Copperplate,Copperplate Gothic Light,fantasy","fontSize":"20","color":"#000000","x":585,"y":625,"wires":[]},{"id":"feabd600.f71b28","type":"ui_group","name":"Default","tab":"fb98fdb9.b193a","order":1,"disp":false,"width":"24","collapse":false},{"id":"fb98fdb9.b193a","type":"ui_tab","name":"Home","icon":"dashboard","order":14}]

```

---

<div class="post-metadata">

**Author:** ![number005](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/number005/32/7430_2.png) [@number005](https://discourse.nodered.org/u/number005)\
**Post date:** [9 July 2024 17:04 UTC](https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304/4 "2024-07-09T17:04:11Z")

</div>

Mustache Template: [The Core Nodes : Node-RED](https://nodered.org/docs/user-guide/nodes#template)

---

<div class="post-metadata">

**Author:** ![number005](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/number005/32/7430_2.png) [@number005](https://discourse.nodered.org/u/number005)\
**Post date:** [9 July 2024 17:07 UTC](https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304/5 "2024-07-09T17:07:09Z")

</div>

Thank you! I will try it out, but I think the problem is that I am on a CloudFoundry Environment, and I cant access the Filesystem. The normal template node uses the REDIS Storage Module ([The Core Nodes : Node-RED](https://nodered.org/docs/user-guide/nodes#template)), so I am save to use it.

EDIT: I just tried your example, and it works perfectly. Thank you 🙂 I will test tomorrow if it is save to restart the environment!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 July 2024 18:53 UTC](https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304/6 "2024-07-09T18:53:19Z")

</div>

> [@number005](#):
>
> CloudFoundry

Not used them but their web site does not fill me with confidence. I get a LOAD of errors when trying to load 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:** [7 October 2024 18:53 UTC](https://discourse.nodered.org/t/possible-to-trigger-flow-from-template-node/89304/7 "2024-10-07T18:53:30Z")

</div>

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