In this tutorial you will learn about the Message Node, what it does and how to use and its Settings
1. What it does
Adds a plain text or SSML message, which will be passed to the user at the end. Alexa or Google assistant will read out the message to the user
You can add more than one version of message, out of which only one will be selected randomly.
Handlebar-like syntax can be used to insert values of variables like from Project Data Store, by using {{msg.govocal.dataStore.config.WelcomeMessage}}
<speak></speak>
tags.
2. How to use
Use this Node whenever you want to respond the user with some message.
- When using Message Node with Card Node(as shown above), Alexa will read out the message in Message Node along with displaying the card to the user.
- Make sure to add Respond Node, in order to send the response to the user
3. Node Setting
- Name
Name for Respond Node - Message
- You can add multiple versions of the same message, by clicking
Add message version
, out of which only one will be selected randomly. - You can provide messages in SSML format, but do not use
<speak></speak>
tag. For more info, Click Here. - You can also use handle bar-like syntax to extract a message from a variable. For example, if you store a message in a key
WelcomeMessage
in Project Data Store, then calling{{msg.govocal.dataStore.config.WelcomeMessage}}
will extract the message.
You can also get the intent name and its slots as{{msg.NLU.intent.name}}
for Intent name and{{msg.NLU.intent.slots.<slot name>}}
- You can add multiple versions of the same message, by clicking
4. Input
Respond Node takes input from from any node.
5. Output
The selected message version will be passed in the msg.govocal.out.content.message
property to the next connected node like below:
msg.govocal.out.content.message = “I am the selected message”;
If you want to add or change the message response to user, you only need to change the value of above property.