March 4, 2020 By Kazuki Nobutani 3 min read

Part 4 of a four-part series. In this post, we are going to register a bot in Slack and connect to the endpoint in Node-RED.

Step 1. Create an app (bot) on Slack

  1. Go to https://api.slack.com/apps.
  2. Click Create New App, and set the name and workspace to install.

    Note: It requires an approval from the workspace admin.

Step 2. Add Slash command

  1. Once the app is created, go to Features > Slash Commands.
  2. Click Create New Command.
  3. Define the command detail and Save. Make sure your command does not overlap with an existing command. Then, Request URL is going to be: https://<your_node_red>/talk. This time, I’ve named the commands as follows:
    • /talktest for starting the conversation
    • /cleartest for clearing the current conversation
  4. Go to Basic Information and click Request to Install. Then, Save Changes. The request will go to the admin of the workspace and they need to approve it. 

Step 3. Test the integration

Once the request is approved, we are all set. Let’s initiate the conversation by entering the command. The slash command can be executed anywhere on the workspace, and the responses are only visible to you. 

  1. Enter the slash command and hit enter.
  2. In order to continue the conversation, enter the command before your input.
  3. In order to reset the conversation, execute the clear command.

What’s next?

Now, you know how we can create a chatbot using watsonx Assistant and Node-RED. This time we integrated with Slack, but you can connect to your own apps or any other service that can access the endpoint we created on Node-RED. We hope you got the idea and apply what we’ve done in this series. Here are some “next steps” you can consider.

  • Node-RED visualizes the flow, but it is not suitable for production use. Switch to Node.js for better load balancing and precise controls.
  • Integrate with other services, such as text-to-speech, tone analyzer and any other nodes you can import to your Node-RED.

If you encounter any technical difficulties with services on IBM Cloud, feel free to contact at the Support Center

Disclaimer

IBM is not liable for any damages arising in contract, tort or otherwise from the use of or inability to use this post or any material contained within. All sample code is provided as-is and IBM does not support customization. Do not use the code in production. 

Was this article helpful?
YesNo

More from Cloud

IBM Cloud Virtual Servers and Intel launch new custom cloud sandbox

4 min read - A new sandbox that use IBM Cloud Virtual Servers for VPC invites customers into a nonproduction environment to test the performance of 2nd Gen and 4th Gen Intel® Xeon® processors across various applications. Addressing performance concerns in a test environment Performance testing is crucial to understanding the efficiency of complex applications inside your cloud hosting environment. Yes, even in managed enterprise environments like IBM Cloud®. Although we can deliver the latest hardware and software across global data centers designed for…

10 industries that use distributed computing

6 min read - Distributed computing is a process that uses numerous computing resources in different operating locations to mimic the processes of a single computer. Distributed computing assembles different computers, servers and computer networks to accomplish computing tasks of widely varying sizes and purposes. Distributed computing even works in the cloud. And while it’s true that distributed cloud computing and cloud computing are essentially the same in theory, in practice, they differ in their global reach, with distributed cloud computing able to extend…

How a US bank modernized its mainframe applications with IBM Consulting and Microsoft Azure

9 min read - As organizations strive to stay ahead of the curve in today's fast-paced digital landscape, mainframe application modernization has emerged as a critical component of any digital transformation strategy. In this blog, we'll discuss the example of a US bank which embarked on a journey to modernize its mainframe applications. This strategic project has helped it to transform into a more modern, flexible and agile business. In looking at the ways in which it approached the problem, you’ll gain insights into…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters