Archived | Create a Google Action with Watson Assistant

Archived content

Archive date: 2021-02-25

This content is no longer being updated or maintained. The content is provided “as is.” Given the rapid evolution of technology, some content, steps, or illustrations may have changed.


Chatbots cannot just do the old “press 1 for English” kind of menu. We want to talk to chatbots – especially voice gadgets – like people talk to people. We don’t need to pretend to be human, but we want the conversation to be like a human interaction. This code pattern is built for developers who want to access their chatbots using Google Home, a smartphone, or another device supported by Google Assistant. It shows how to create a Google Action and a Node.js server to make your Watson Assistant dialogs available when you say “Hey Google.”


When using a chatbot, you want the interaction to be as natural as possible. You want them to simulate the back-and-forth dialogue of a human conversation. They can respond the same way every time or they can use machine learning to respond according to the situation. The chatbot in this code pattern responds to the situation.

The code pattern explains how to build a retail agent chatbot that can ask for car reservation schedules and specifics. It includes a Watson™ Assistant workspace and uses Watson Assistant’s content catalog and digression feature to make the conversation flow naturally and stay on task. To test it with Google Assistant devices, you’ll set up a Google Action that calls out to a Node.js server that interacts with Watson Assistant.

When you have completed this code pattern, you’ll understand how to:

  • Create a Google Assistant Action that calls out to an HTTPS endpoint
  • Launch a Node.js server that can interact with the Google Assistant requests and send responses from Watson Assistant
  • Use Watson Assistant to create a retail agent that can have a conversation to gather the information needed to make a reservation



  1. The user talks or types to Google Assistant.
  2. Google Assistant posts the text to an HTTPS endpoint.
  3. The Node.js server calls Watson Assistant to get the response.
  4. The response is returned to Google Assistant.
  5. Google Assistant replies to the user.


Ready to put this code pattern to use? Complete details on how to get started running and using this application are in the README.