I am trying to write the text to send to the email from the ui dashboard, I get to do it with an static text, but now I need to write te text from the ui.
How can I do it? This are nodes for the email notification.
Try feeding a ui-text node to a change node that sets flow.emailText (i.e. store the text input in a flow variable - just like you did for email address)
Then in your function, use
var emailText = flow.get("emailText");
msg.payload = emailText + " : counter = " + counter;
and the change node I don´t need to connect it??
I send you here how does it looks now, is it okey?
In your Function node you appear to have:
var emailText = flow.get
That is not right. It should be:
var emailText = flow.get("emailText");
Almost.
You didn't finish the code in the function node.
Write the full line...
var emailText = flow.get("emailText")
I get the feeling you need to learn JavaScript. It will help you immensely.
Good luck
I have it this way but it doesn´t work
Hi - what doesn't work about it?
What does the Debug node you have next to the Email node tell you about the message you are trying to send?
Thy changing the line to this...
var emailText = flow.get("emailText") || " INFO: email text not set!";
See what happens
okey now it working thank you two, and I am sending this email per day and I want to send the email with the value could I do it?
You're welcome.
As for your new requirement, the answer is "of course you can" however please use what you have learned and try for your self first. When you get stuck, ask for help.
Good luck.
yes sure thank you I am trying it already i will let you know about any news
Thank you for your help I think I learn more about Node-Red, and I get it without problems now it is working perfectly
Excellent.
As we say in UK, "the penny has dropped"
Hi, I have a problem. When I just have an IF to send an alarm to announce for Email. But when I observe my email, I see email announce continuity for me (include if condition and no if).
How I do overcome it?. Please.
Impossible to tell without any detail but it is most likely your if
test is not doing what you think it is doing!
As this thread is unrelated and over 3 years old, I am going to close it and ask that you start a new thread with all the relevant details (like your flow, debug values etc)