IoTFlows
  • Welcome to IoTFlows Docs
  • IoTFlows
  • Console
  • REST API
  • Device Management & Secure Remote Access
    • 1. Connect a device to the cloud or create a virtual device
    • 2. SSH to your device over the internet
    • 3. Transfer files to your device over the internet
    • 4. Remotely access Node-RED on your device
    • 5. Create public links for local web-apps
  • Real-Time Data Streams, Alerts, and Actions
    • Create a Device API Key
    • Publish and subscribe to real-time messages with Node-RED
    • Creating an Alert Channel
    • Publish an Alert with Node-RED
    • Define and execute an Action in Node-RED
    • Python real-time SDK
    • Javascript real-time SDK
  • Cloud Node-RED Servers
    • Create a secure Cloud Node-RED Server in five minutes
    • Subscribe to data streams with a Cloud Node-RED Server
    • Integrate data streams to Node-RED dashboard
    • Integrate data streams to Slack
  • IOTFLOWS OVERVIEW
    • IoTFlows Roles and Permissions
    • Adding Team Members
  • Example Projects
    • Raspberry Pi as Gateway
      • Arduino to Raspberry Pi Serial Communication for Ultrasonic Sensor
    • Getting Started with Node-Red Dashboard
      • Installing Node-Red Dashboard
      • Accessing Node-Red Dashboard
      • 1. Creating a Page
      • 2. Adding Gauge Nodes
      • 3. Changing Dashboard Themes
      • 4. Adding Data to Gauge Nodes
      • 5. Adding a Chart Node
      • 6. Adding Data to Chart Node
      • 7. Adding a Template Node
      • 8. Adding Data to Template Node
      • 9. Adding Switch Node
      • 10. Adding Logic to Switch Node
      • 11. Adding a Slider Node
      • 12. Adding a Color Picker Node
      • 13. Adding a Numeric Node
      • 14. Adding a Button Node
      • 15. Adding Logic to a Button Node
      • Node-Red Dashboard Code
    • Publishing Data Streams from Python
    • Ultrasonic Sensor on Raspberry Pi Node-Red
  • General
    • Downloading IoTFlows Node-Red Nodes
    • Publishing Alert from Node-Red Manual
    • Publishing Data Stream from Node-Red Manual
Powered by GitBook
On this page
  • Prerequisites
  • Install Node-RED Slack Nodes
  • Integrate Data Streams

Was this helpful?

  1. Cloud Node-RED Servers

Integrate data streams to Slack

Integrate the real-time data published by your devices and clients to Slack

PreviousIntegrate data streams to Node-RED dashboardNextIoTFlows Roles and Permissions

Last updated 3 years ago

Was this helpful?

Prerequisites

If you currently don't have a device or client publishing data to a data stream, learn , , or .

You also need to have a Cloud Node-RED server that subscribes to your real-time data streams. If you don't have one, learn , and .

Install Node-RED Slack Nodes

Navigate to the Node-RED of your cloud server. From the top right menu, click on Manage palette and select the Install tab.

Integrate Data Streams

From the social nodes on the left palette, drag and drop a slack-web-out node. Connect the desired data stream to a function and ultimately to the slack node.

Double click on the slack node to configure the Slack Client by giving it the proper slack app OAuth Token with write permission to the desired channel.

A Slack OAuth Token starts with "xoxb-"

After configuring the Slack node, double click on the function node and write the following javascript code to write the data streams to the desired slack channel. Here, you can also define custom rules, such as a threshold, to filter your data. In this tutorial, we simply concatenate each message with a string to form a sentence,

msg.topic = "chat.postMessage"
msg.payload = {
    channel: "alerts-demo",
    text: `This is the temperature value: ${msg.payload}`
}
return msg;

Hit Deploy to apply the changes. You should see the data stream messages are populated to your slack channel.

Congratulations! You successfully integrated a real-time data stream to Slack.

In the search bar, search for slack and install the .

If you don't have a data stream, learn and how to .

To create a Slack App for this purpose, you can navigate to , click on Create New App and follow the instruction. Next, you would need to select the app, and navigate to OAuth & Permissions page to find the token. In the same page, make sure you have given the proper write permission to this app.

node-red-contrib-slack
how to publish real-time data streams
subscribe to them in the cloud
https://api.slack.com/apps
how to publish real-time messages to the cloud with Node-RED
Javascript
Python
how to spin up a secure Cloud Node-RED server
subscribe to data streams