December 13, 2019 By Henrik Loeser 3 min read

The IBM Cloud platform and its services evolve—and so do our tutorials. Now you can benefit from new IBM watsonx Assistant features.

The tutorial on how to build a database-driven Slackbot utilizes IBM watsonx Assistant for the chatbot, IBM Cloud Functions to access the database, and IBM Db2 on Cloud as backend database. All three have introduced new features the tutorial and its users can benefit from. Therefore, we updated the tutorial and the related code which is available on GitHub. The Slackbot is now easier to set up and the environment is more secure. 

Read on for details.

Build a Slackbot to interact with a database.

Improvements to watsonx Assistant

Earlier this year, IBM watsonx Assistant introduced webhooks to easily make programmatic calls to external applications. Previously, as a beta feature, IBM Cloud Functions actions could be called from dialog nodes, and not all cloud regions were supported. Moreover, you had to manually edit the JSON representation of a dialog node and add the configuration to invoke an action and manage parameters and results.

With the new webhook feature, developers can configure the URL and general parameters in a form under the Options menu. Dialog node-specific parameters and the resulting variable are integrated into the dialog editor. There are even form fields to reset context variables. Previously, all of this required edits to the JSON representation and extra dialog nodes for clean-up.

Easily configure a webhook URL and header data.

More security for Cloud Functions and Db2 on Cloud

As mentioned earlier, the tutorial on how to build a database-driven Slackbot makes use of IBM Cloud Functions to implement serverless actions. These actions are used to insert and query data into a Db2 on Cloud database. 

Similar to most other services and compute resources, Cloud Functions moved to IBM Cloud IAM (Identity and Access Management) and its resource management concepts. It provides common user authentication and fine-grained access control across IBM Cloud. The updated tutorial makes use of the IAM namespaces in Cloud Functions. Thus, you can better control the resources for actions and access to them.

IBM Cloud offers both the Key Protect and the Hyper Protect Crypto Services to create and manage encryption keys. Many services have been enhanced to support user-controlled data encryption keys. One of these services is Db2 on Cloud. 

Administrators can now migrate a database from using a service-generated encryption key to utilizing root keys managed in Key Protect. As a reader of our Slackbot tutorial, you now have the option of either using the Lite plan for Db2 on Cloud or go with an Enterprise plan and opt for additional security.

Conclusions

The new features in IBM watsonx Assistant make it easier to set up and configure the dialog as well as the programmatic calls to external applications. For the tutorial, it resulted in a simpler dialog layout and flow and easier instructions. Changes to IBM Cloud Functions and Db2 on Cloud allow better control over resources and privileges, and it is even possible to use your own encryption keys to protect the database.

Check out the tutorial on how to build a database-driven Slackbot and its related code on GitHub.

If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik) or LinkedIn

Was this article helpful?
YesNo

More from Cloud

Serverless vs. microservices: Which architecture is best for your business?

7 min read - When enterprises need to build an application, one of the most important decisions their leaders must make is what kind of software development to use. While there are many software architectures to choose from, serverless and microservices architectures are increasingly popular due to their scalability, flexibility and performance. Also, with spending on cloud services expected to double in the next four years, both serverless and microservices instances should grow rapidly since they are widely used in cloud computing environments. While…

Serverless use cases: How enterprises are using the technology to let developers innovate

6 min read - Serverless, or serverless computing, is an approach to software development that empowers developers to build and run application code without having to worry about maintenance tasks like installing software updates, security, monitoring and more. With the rise of cloud computing, serverless has become a popular tool for organizations looking to give developers more time to write and deploy code. Despite its name, a serverless framework doesn’t mean computing without servers. In a serverless architecture, a cloud service provider (CSP) handles…

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 fictional 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…

IBM Newsletters

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