# Cannot display flow.set/flow.get message

**URL:** https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239
**Category:** General
**Created:** [16 June 2023 06:48 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239 "2023-06-16T06:48:21Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 06:48 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/1 "2023-06-16T06:48:21Z")

</div>

Hi everyone,

I have an email input node and I want to save the value stored in flow.set and then display it with flow.get

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/c/0ceb421099e49f36b0b6d4cde715ce3800225aff.png)

> Function 1  
> var email1 = msg.payload;  
> flow.set('email1',msg.payload);  
> return msg;

> Function 2  
> var email = flow.get('email1');  
> msg.payload = email;  
> return msg;

In the debug node I get nothing.

Thank you very much!

Best regards!

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [16 June 2023 07:11 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/2 "2023-06-16T07:11:46Z")

</div>

**If that is a true copy of your flow, then you are not triggering 'function 2'.**

What happens if you connect an 'inject' node to the input of 'function 2' ?  
Do you get an output on the 'debug' node ?

Try this...

 ![a_email](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/0/b0dd48adc37f7b4f56faa208231ea5d68d1f8f3e.png)

```auto
[{"id":"f7434e0fe255a944","type":"tab","label":"Flow 40","disabled":false,"info":"","env":[]},{"id":"0ef24cb1879073c4","type":"inject","z":"f7434e0fe255a944","name":"Hello world","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello world","payloadType":"str","x":140,"y":200,"wires":[["4e473167bd41c73b"]]},{"id":"4e473167bd41c73b","type":"function","z":"f7434e0fe255a944","name":"","func":"var email1 = msg.payload;\nflow.set('email1',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":200,"wires":[[]]},{"id":"b384a8d14ca8cb1d","type":"function","z":"f7434e0fe255a944","name":"","func":"var email = flow.get('email1');\nmsg.payload = email;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":200,"wires":[["5fd0b731ab3f2068"]]},{"id":"9824b5929c569b24","type":"inject","z":"f7434e0fe255a944","name":"Trigger","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":370,"y":300,"wires":[["b384a8d14ca8cb1d"]]},{"id":"5fd0b731ab3f2068","type":"debug","z":"f7434e0fe255a944","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":750,"y":200,"wires":[]},{"id":"712de50c1794b28e","type":"comment","z":"f7434e0fe255a944","name":"This simulates an email msg","info":"","x":180,"y":160,"wires":[]}]

```

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 07:17 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/3 "2023-06-16T07:17:49Z")

</div>

> What happens if you connect and 'inject' node to the input of 'function 2' ?

Does not collect the information

> Do you get an output on the 'debug' node ?

It does not show anything at the exit either

I think I've got it right but it doesn't work....

Thank you very much!

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [16 June 2023 07:19 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/4 "2023-06-16T07:19:02Z")

</div>

Try my small demo flow and see if that works for you.  
It works for me.

You could simplify 'function 1' to this...

```auto
flow.set('email1',msg.payload);
return msg;

```

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 07:21 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/5 "2023-06-16T07:21:14Z")

</div>

It works perfectly your flow!

Why can't it work for me? (input email address)

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [16 June 2023 07:28 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/6 "2023-06-16T07:28:56Z")

</div>

Can you post your flow so I can check how you have configured your 'ui-text button' ?

Not that it will affect your flow, but a 'change' node could have been used instead of the function nodes.

![a_email4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/9/e93eed6355f5d4d824f9ac5993810cd3fdebfd4c.png)

```auto
[{"id":"f7434e0fe255a944","type":"tab","label":"Flow 40","disabled":false,"info":"","env":[]},{"id":"0ef24cb1879073c4","type":"inject","z":"f7434e0fe255a944","name":"Hello world","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Hello world","payloadType":"str","x":140,"y":200,"wires":[["7f755a7cc0db0ec1"]]},{"id":"9824b5929c569b24","type":"inject","z":"f7434e0fe255a944","name":"Trigger","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":130,"y":280,"wires":[["346df4e3ea83ad40"]]},{"id":"5fd0b731ab3f2068","type":"debug","z":"f7434e0fe255a944","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":510,"y":280,"wires":[]},{"id":"712de50c1794b28e","type":"comment","z":"f7434e0fe255a944","name":"This simulates an email msg","info":"","x":180,"y":160,"wires":[]},{"id":"7f755a7cc0db0ec1","type":"change","z":"f7434e0fe255a944","name":"","rules":[{"t":"set","p":"email1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":200,"wires":[[]]},{"id":"346df4e3ea83ad40","type":"change","z":"f7434e0fe255a944","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"email1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":280,"wires":[["5fd0b731ab3f2068"]]}]

```

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 08:14 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/7 "2023-06-16T08:14:29Z")

</div>

> flow.set('email1',msg.payload);  
> return msg;

That's what I did at first, I tried to do it

here is the configuration of the node

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/25cfeff16e091f996a1b5697ed9f737f40e420dc.png)

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 08:18 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/8 "2023-06-16T08:18:28Z")

</div>

How do I save set msg.payload to take it to a function?

Thank you very much!

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [16 June 2023 08:31 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/9 "2023-06-16T08:31:50Z")

</div>

What happens if you change the Delay to 0 (zero) ??

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

**Note:** You will need to press 'Enter' or 'Tab' key to send the email address from the Dashboard.

I suggest you put a Debug node on the output of the Text-Button node to see what is happening.

It might speed things up if you could publish your flow.

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 09:09 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/10 "2023-06-16T09:09:11Z")

</div>

The node to store in a function does not work...

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 09:11 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/11 "2023-06-16T09:11:29Z")

</div>

Can I do it differently?

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [16 June 2023 09:13 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/12 "2023-06-16T09:13:40Z")

</div>

@Loveflowersx one thing to note is that the `text-input` node is going to send what ever is in the input every 300ms (the default value. This means if you. have a slow typer, you will see bits the text sent as time goes on.

In this case, you might want to use the `ui-form` node and set an entry as type 'E-mail', then the address will not be sent until the user presses 'SUBMIT'

Please export your flow and post it to a response.

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 09:44 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/13 "2023-06-16T09:44:39Z")

</div>

That's it, let's hope it works

```auto
[{"id":"a5eee90555714331","type":"ui_text_input","z":"af10894d6d33f212","name":"","label":"","tooltip":"","group":"67130af5b364f54e","order":1,"width":"13","height":"1","passthru":true,"mode":"email","delay":"0","topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":150,"y":240,"wires":[["581da0ca3c17659b"]]},{"id":"d1968963fb7a6232","type":"function","z":"af10894d6d33f212","name":"","func":"flow.set('email1',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":240,"wires":[[]]},{"id":"39c43c54aa86e524","type":"function","z":"af10894d6d33f212","name":"","func":"var email = flow.get('email1');\nmsg.payload = email;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":340,"wires":[["69107c7747380e68"]]},{"id":"69107c7747380e68","type":"debug","z":"af10894d6d33f212","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":750,"y":340,"wires":[]},{"id":"581da0ca3c17659b","type":"rbe","z":"af10894d6d33f212","name":"","func":"rbei","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":290,"y":240,"wires":[["d1968963fb7a6232"]]},{"id":"67130af5b364f54e","type":"ui_group","name":"input_alarmas","tab":"704425028e49e41f","order":1,"disp":false,"width":"25","collapse":false,"className":""},{"id":"704425028e49e41f","type":"ui_tab","name":"ALARMS","icon":"dashboard","order":2,"disabled":false,"hidden":true}]

```

Thank you very much!

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [16 June 2023 09:59 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/15 "2023-06-16T09:59:22Z")

</div>

a couple of things

1. why do you have a filter node in your flow
2. you might want to use the `ui-form` node and set an entry as type 'E-mail', then the address will not be sent until the user presses 'SUBMIT'
3. the second part of your flow will never run since there is no input sent to it.

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 10:03 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/16 "2023-06-16T10:03:50Z")

</div>

1. I was simply testing it.

2. I want to create several flow.get to take them to a function with a to: here I would insert several variables to send several mails. From the dashboard several input address nodes and put the ones you want.

3. I think you say the debug node, it is to see if it is sent.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [16 June 2023 10:17 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/17 "2023-06-16T10:17:25Z")

</div>

When trying to solve an issue, it is a good idea to add `debug` nodes in your flow. With the flow you provided, if you add a `debug` node to the output of the `filter` node, you will see that nothing is returned the first time.

The second flow will NEVER work without you sending something to the input of that `function` node. Add an `inject` node and connect it to the input of the `function` node, deploy and press the `inject` button and see what happens.

> [@Loveflowersx](#):
>
> I want to create several flow.get to take them to a function with a to: here I would insert several variables to send several mails. From the dashboard several input address nodes and put the ones you want.

I'm not sure what you mean by this.

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [16 June 2023 10:29 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/18 "2023-06-16T10:29:10Z")

</div>

So the flow you have just posted is NOT the same as the original one in this thread.

 ![a_email5](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/4/a448c1b6d8d10ccb955335ea666c0aa03418b692.png)

**It would have saved a lot of time if you had posted the correct flow!!**

As @zenofmud said, the 'filter' node is causing the problem at the moment, as well as no input to trigger 'function 2' node.

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 11:52 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/19 "2023-06-16T11:52:19Z")

</div>

My request:

From dashboard put 2/3 text input nodes (mode: email addres), enter the email or emails and immediately save them in a flow.set and then take them to a function with a flow.get and those that have been set send several mails the same.

What I don't understand is why it doesn't save the value in the flow.set.

Thank you very much for everything

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 11:59 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/20 "2023-06-16T11:59:46Z")

</div>

It was just a one-off thing, I don't think it will affect anything. I already made a node with a filter and it worked perfectly.

**Sorry if it was too much trouble**

Best regards

---

<div class="post-metadata">

### Author: ![Loveflowersx](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@Loveflowersx](https://discourse.nodered.org/u/Loveflowersx)
#### Post date: [16 June 2023 12:01 UTC](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239/21 "2023-06-16T12:01:05Z")

</div>

The text input node doesn't work, I think, I try it and nothing...

[Next page](https://discourse.nodered.org/t/cannot-display-flow-set-flow-get-message/79239.md?page=2)
