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.


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?

More from Cloud

Enhance your data security posture with a no-code approach to application-level encryption

4 min read - Data is the lifeblood of every organization. As your organization’s data footprint expands across the clouds and between your own business lines to drive value, it is essential to secure data at all stages of the cloud adoption and throughout the data lifecycle. While there are different mechanisms available to encrypt data throughout its lifecycle (in transit, at rest and in use), application-level encryption (ALE) provides an additional layer of protection by encrypting data at its source. ALE can enhance…

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…

The history of the central processing unit (CPU)

10 min read - The central processing unit (CPU) is the computer’s brain. It handles the assignment and processing of tasks, in addition to functions that make a computer run. There’s no way to overstate the importance of the CPU to computing. Virtually all computer systems contain, at the least, some type of basic CPU. Regardless of whether they’re used in personal computers (PCs), laptops, tablets, smartphones or even in supercomputers whose output is so strong it must be measured in floating-point operations per…

IBM Newsletters

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