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

Attention new clients: exciting financial incentives for VMware Cloud Foundation on IBM Cloud

4 min read - New client specials: Get up to 50% off when you commit to a 1- or 3-year term contract on new VCF-as-a-Service offerings, plus an additional value of up to USD 200K in credits through 30 June 2025 when you migrate your VMware workloads to IBM Cloud®.1 Low starting prices: On-demand VCF-as-a-Service deployments begin under USD 200 per month.2 The IBM Cloud benefit: See the potential for a 201%3 return on investment (ROI) over 3 years with reduced downtime, cost and…

24 IBM offerings winning TrustRadius 2024 Top Rated Awards

2 min read - TrustRadius is a buyer intelligence platform for business technology. Comprehensive product information, in-depth customer insights and peer conversations enable buyers to make confident decisions. “Earning a Top Rated Award means the vendor has excellent customer satisfaction and proven credibility. It’s based entirely on reviews and customer sentiment,” said Becky Susko, TrustRadius, Marketing Program Manager of Awards. Top Rated Awards have to be earned: Gain 10+ new reviews in the past 12 months Earn a trScore of 7.5 or higher from…

IBM Tech Now: April 8, 2024

< 1 min read - ​Welcome IBM Tech Now, our video web series featuring the latest and greatest news and announcements in the world of technology. Make sure you subscribe to our YouTube channel to be notified every time a new IBM Tech Now video is published. IBM Tech Now: Episode 96 On this episode, we're covering the following topics: IBM Cloud Logs A collaboration with IBM watsonx.ai and Anaconda IBM offerings in the G2 Spring Reports Stay plugged in You can check out the…

IBM Newsletters

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