Hello Devz,
Having a Google Home at home and a Google Assistant in my pocket, I wanted to go further and create my own Actions. Pretty easy with Google DialogFlow!
DialogFlow is a free web interface that allows you to create a, wait for it… dialog flow!
Let’s say I want to add an expense by voice. Go to dialogflow.com, create your new project and open the Intents. As you can see, two default Intents will be present: the fallback and the welcome ones. Which will manage the default interactions with the user. Like “Hello”, “I ‘don’t know”, …
You can try the default interactions with these intents:
Now we can add our own custom Intent. Let’s call it AddExpense. Here we can first add some training phrases. You will see that some words will take colors. An AI is helping you to recognize the default entities, like currencies, date, time, …
If you click on one of the training phrases, you will see the parameters:
A bit below, you can see the parameters configuration. You can specify that some parameter are required and a default prompt if it’s missing.
As you can see, you can put as many prompt you want:
When the AI have all the needed parameters, it can give a custom answer to the user:
Now if you need more than the default parameters, you can create them in the Entities part. In this example, I will add a PaymentType (cash, credit card, … and their synonyms):
Now you can test you Intent to see if everything works:
Your Intent is complete, a JSON file is generated and can be sent to any webservice, even “locally” in the Google Cloud as a Fullfillement.
Now you can integrate your AI to all kind of chat like application:
Happy DialogFlow!! 😉