Send 2 messages to 2 functions

Good morning
I wonder if someone would be kind enough to point me in the right direction please.

I have a flow that uses a function to decide on what action to carry out
After it has run through the logic it creates a message and sends to a insert data into a sql database
and a second message to a UDP device

Many thanks

see the docs re multiple outputs -

Many thanks

In particular a Function node can have multiple outputs, so you can send one message to each.

Thank you

Additionally, if your function would be as simple as an if statement with a condition similar to "msg = x", take a look at the switch node and see if you can use it :slight_smile:

Hi many thanks
I have quite a complex function string a binary string but am struggling with the concept of multiple messages, I have created what i call a bodge where I use a change node, I guess I need to understand the payload part of node-red a little better


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