2022.2

Table Of Contents
FortheuserdocumentationofNode-RED,pleaserefertoNode-RED'swebsite:nodered.org.
Seealso:"OLConnectStartupflow"onpage189
Tip: Addadebugnodeafteranodetoverifythatthecontentsofapropertyofthemsgobjectare
changedasexpected.
Nodes used in OL Connect flows
Inadditiontothe"OLConnectnodes"onpage182,thesestandardnodeswilloftenbeusedinOLCon-
nectapplications:
l
Theinjectnodetriggerstheflow.Itcanbesetupinawaythatittriggerstheflowwheneveritis
deployedorwhenNode-REDisstarted(see"OLConnectStartupflow"onpage189).Itcanalso
beusedtoinjectthefullpathtoa(sample)datafileintoaflow.
l
TheHTTP innodecreatesanHTTPend-pointforcreatingwebservices.
l
AnyflowthatstartswithanHTTPinnodemusthaveapathtoanHTTP responsenodeoth-
erwiserequestswilleventuallytimeout.
l
Theread filenodeloadsafile.IfthefileisaJSONfile,theresultisaJSONstring.
l
Thewrite filewritesthecontentofmsg.payloadtoafile.
l
TheJSONnodeparsesaJSONstringandaddsthekeyswiththeirvaluesaspropertiesto
msg.payload.
l
Thechangenodecaninitializevariablesandchangetheirvalue.
l
ThefunctionnodeexecutesJavaScriptcode.Seehttps://nodered.org/docs/user-guide/writing-
functions.
l
Thedebugnodedisplaysthecontentofthemsgobject,whichispassedbetweennodesina
flow,inthedebugmessageconsole.Addadebugnode-oneforeachpropertyofthemsgobject
-afteranothernodetoverifythatthepropertiesarechangedasexpected.
l
Thesplitnodeturnsasinglemsg.payloadconsistingofanarrayintoaseriesofmessages,
eachofwhichhasapayloadcontainingoneofthearray'selements.NotethattheSplitnodeonly
worksonmsg.payloadandnotonitschildobjects.
l
theabilitytohavemultipleoutputchannelsinaSwitchnodeandthefactthatthesechannelscan
belinkedbacktoanodeontheprimary/mainbranchdownstream.
Thesearesomeusefulnodescreatedbythirdparties:
Page 185