Weather Bot


AmplifyReach Catalyst Platform provides some default workflow to explore the ease of building conversation and the power of chat bot.

This is a default bot for fetching weather information. This consumes an API written by AmplifyReach to fetch weather information from multiple sources.

Sample Interaction

Bot Say's: Hello, Welcome to AR Bot! How may I help you today?
User Say's: What's the weather in Pune
Bot Say's: Sure! I can help you with weather information
Bot Say's: Give me few sec, till I fetch the weather information for Pune
Bot Say's:
Today's weather at Pune is:
Summary: light rain
Current Temperature: 24.22
Sunrise: 15-06-2017 12:28:00 AM
Sunset: 15-06-2017 01:42:19 PM
Wind Pressure: 96.0

Dissecting Conversation

Login and Launch My Conversation under Bot Studio
Login to

Launch My Conversations under Bot Studio

Launch "Default - Weather Bot" conversation

Weather Conversation

This conversation is built using 3 nodes.

  • Weather Intent - Intent Node to identify customer’s intent
  • Get City – Variable Node to capture city information for which weather should be fetched. This node also has Trigger to fetch the weather information
  • Display Weather – Message Node

Weather Intent - Intent Node

This node help to identify the customer's intent for fetching weather information. We would create an intent and provide different training examples on how a customer can express their intent for a weather update.

Intent “GetWeather”

This is an Intent with training example for identifying customer’s intention for fetching weather information for a city.

Tip: Please check intent documentation for more details

The following are the list of training examples provided with-in Intent

  • What is the current temperature
  • What is the temperature
  • How is the weather
  • How is the climate
  • What is the current humidity
  • What are the atmospheric conditions
  • How hot is it today
  • How cold is it today
  • is it going to be hot or cold
  • is it going to rain
  • is it cloudy today
  • Do I need to carry my umbrella
  • Should I carry my shades

Build a conversation node to consume the intent

This node consumes the intent “GetWeather”. The examples provided for the intent helps the system to identify the customer’s intention. Once the customer’s intent is identified as per “GetWeather” training examples, the “Bot Say’s” is printed in the chat and the next node is executed.

Tip: Please check how to consume an intent in conversation node documentation for more details

Conversation variable & trigger node

The conversation requires city information to fetch the weather information. Once we have the city information we are consuming one of the test API available at AmplifyReach to fetch the weather information.

The system will ask the customer to enter the City name if it is not provided as part of the intent statement.

If the customer says
“What is the current temperature”

The Bot will ask for city information
“Please enter city name”

The system will not ask for the city information if the customer has already provided as part of their intent statement.

If the customer says
“What is the current temperature in Austin”

The Bot automatically detects that “Austin” is a location provided with-in the intent and the same would get assigned to the variable &location provided in the node. So, in this case, Bot will skip asking the question “Please enter city name” and directly assign “Austin” as location.

Now, the trigger would get executed and the following message would be printed to the customer

Bot Says: Give me few sec, till I fetch the weather information for Austin

Tip: Please check variable node for more details

A trigger has been added to the same node as the Input parameter / Variable node. We pass the city name to the REST API and parse the response that is required to form a message to be displayed to the customer.

JSON Response:

  "summary": "clear sky",
  "sunrise": "29-03-2017 06:31:11 AM",
  "sunset": "29-03-2017 06:47:35 PM",
  "temperature": 27.098000000000013,
  "humidity": 950.92,
  "pressure": 56,
  "status": 0,
  "wind": 1.86,
  "updatedAt": "2017-03-29 03:28:09"

Tip: Please check documentation for creating triggers

Tip: Please check documentation for consuming triggers with-in conversation

Message node to display weather information

This node display’s weather information to the customer by consuming the data received as part of the Trigger response.

Bot Say’s:

Today's weather at &location is:

Summary: {{summary}}
Current Temperature: {{temperature}}
Sunrise: {{sunrise}}
Sunset: {{sunset}}
Wind Pressure: {{pressure}}

Tip: Please check the documentation of message node for more details

Try Out Conversation

Please click on the Try Out button to launch the chat window where you can see your workflow in action.

Try out different statements and check which statements the Bot can identify and which it is not able to identify.

Play with the intent training examples to add examples which the Bot is not able to identify.

Tip: Please look at Debugging conversation for more details on Try Out

Deploy Conversation

Deploy your conversation and add the widget code to your website. These simple steps can enable Bot on your site for customers.

Tip: Please look at Deployment documentation for more details

Tip: To integrate Freshdesk, please look at documentation for more details