Introduction into NodeRED
More than just IoT
swissel@salesforce.com, @notessensei
Stephan H. Wissel, Program Architect Director
Agenda
What we will talk about
1. What is NodeRED
2. Use cases
3. Running it on Heroku
About me
Stephan H. Wissel
Program Architect Director
swissel@salesforce.com
@notessensei
https://www.wissel.net/
2+ years Salesforce
11 years IBM
20 years in Singapore
NodeRED
IBM Hursley Lab escapee
● Linux, Win, Mac
● Cloud, Desktop, Pi
● NodeJS & Express
● Flow based
NodeRED
Messages flow from sources to sinks
NodeRED
IBM Hursley Lab escapee
Meet some of the Nodes (1/3)
Debug Node
● Output option
○ Log
○ Debug Window
● Output scope
○ msg
○ payload
○ custom
Inject Node
● Insert various messages
○ time stamp
○ object
○ String
● Trigger options
○ on startup
○ on schedule
○ on click
Just the basics
Meet some of the Nodes (2/3)
HTTP Response Node
● Partner to Endpoint Node
● Set Header Values
● Set Status Code
● Set cookies from msg.cookies
HTTP Endpoint Node
● All HTTP methods
● supports file upload
● Translates form data to JSON
● Access to
○ parameters
○ headers
○ cookies
○ body
Basic HTTP
Meet some of the Nodes (3/3)
Condition Node
● Graphical “Select Case”
● Flexible output count
● Pattern matching
● Any variable
Template Node
● Transform content
● Multiple templates
○ Mustache
○ Markdown
○ html
Function Node
● JavaScript
● alter msg object
● access to
○ msg
○ node variables
○ flow variables
○ global variables
Manipulate data
NodeRED
Gui driven flows
Demo
… and 2000 of their friends
Runs everywhere with everything
Almost
• Windows
• Linux
• Mac
• Heroku
• AWS
• GCE
• Azure
• Raspberry Pi
• QNap
• Synology
• Mainframe
2034 Nodes*
1281 example flows
* as of 1 June 2019
Use cases
Limited only by your imagination
• Mock API Endpoints
• Connect to Salesforce
• Save to database
• Transform and forward
• Connect (both ways) to IoT
• Prototype custom actions
• Quick Dashboards
NodeRED on Heroku
Caveats and Advantages
Advantaged
• https works out of the box
• custom domain available
• multiple instances
• Rich selection for databases etc
Caveats
• No hardware access
• Runtime is epidermal -> save your flows.js file local/github
node-red --settings ./.node-red/settings.js --userDir ./.node-red
There is much more
Topics not covered:
• Roll you own Nodes
• Headless operation
• GitHub integration
Online resources:
● NodeRED.org
● flows.nodered.org
● https://www.wissel.net/blog/2018/02/running-nodered-on-heroku-with-salesforce.html
Got another hour or two or three ...
Is that the YETI?
Call to action
● Go and play with it
● Feedback / Tickets
● What functions next?
● Pull requests welcome!
Salesforce Apex Hours : Node red for salesforce

Salesforce Apex Hours : Node red for salesforce

  • 1.
    Introduction into NodeRED Morethan just IoT swissel@salesforce.com, @notessensei Stephan H. Wissel, Program Architect Director
  • 2.
    Agenda What we willtalk about 1. What is NodeRED 2. Use cases 3. Running it on Heroku
  • 3.
    About me Stephan H.Wissel Program Architect Director swissel@salesforce.com @notessensei https://www.wissel.net/ 2+ years Salesforce 11 years IBM 20 years in Singapore
  • 4.
    NodeRED IBM Hursley Labescapee ● Linux, Win, Mac ● Cloud, Desktop, Pi ● NodeJS & Express ● Flow based
  • 5.
  • 6.
  • 7.
    Meet some ofthe Nodes (1/3) Debug Node ● Output option ○ Log ○ Debug Window ● Output scope ○ msg ○ payload ○ custom Inject Node ● Insert various messages ○ time stamp ○ object ○ String ● Trigger options ○ on startup ○ on schedule ○ on click Just the basics
  • 8.
    Meet some ofthe Nodes (2/3) HTTP Response Node ● Partner to Endpoint Node ● Set Header Values ● Set Status Code ● Set cookies from msg.cookies HTTP Endpoint Node ● All HTTP methods ● supports file upload ● Translates form data to JSON ● Access to ○ parameters ○ headers ○ cookies ○ body Basic HTTP
  • 9.
    Meet some ofthe Nodes (3/3) Condition Node ● Graphical “Select Case” ● Flexible output count ● Pattern matching ● Any variable Template Node ● Transform content ● Multiple templates ○ Mustache ○ Markdown ○ html Function Node ● JavaScript ● alter msg object ● access to ○ msg ○ node variables ○ flow variables ○ global variables Manipulate data
  • 10.
  • 11.
    Demo … and 2000of their friends
  • 12.
    Runs everywhere witheverything Almost • Windows • Linux • Mac • Heroku • AWS • GCE • Azure • Raspberry Pi • QNap • Synology • Mainframe 2034 Nodes* 1281 example flows * as of 1 June 2019
  • 13.
    Use cases Limited onlyby your imagination • Mock API Endpoints • Connect to Salesforce • Save to database • Transform and forward • Connect (both ways) to IoT • Prototype custom actions • Quick Dashboards
  • 14.
    NodeRED on Heroku Caveatsand Advantages Advantaged • https works out of the box • custom domain available • multiple instances • Rich selection for databases etc Caveats • No hardware access • Runtime is epidermal -> save your flows.js file local/github node-red --settings ./.node-red/settings.js --userDir ./.node-red
  • 15.
    There is muchmore Topics not covered: • Roll you own Nodes • Headless operation • GitHub integration Online resources: ● NodeRED.org ● flows.nodered.org ● https://www.wissel.net/blog/2018/02/running-nodered-on-heroku-with-salesforce.html Got another hour or two or three ...
  • 16.
  • 17.
    Call to action ●Go and play with it ● Feedback / Tickets ● What functions next? ● Pull requests welcome!