Creating a Story Skill in Google Assistant

Photo by Thomas Kolnowski on Unsplash
Hi, we will see how to create a storytelling action in google assistant using dialog flow and firebase.
We will split this blog into two parts
Part 1: Create an action in google assistant and adding dialog flow
Part 2: Creating a Firebase cloud function which acts as a webhook and link the webhook with dialog flow
Let's begin with Part 1 now
Create a Project in Google Assistant Developer Console

Then fill the project name

Once Saved Click Actions

Which will show the actions screens

Select Add Action option

A popup would be opened in that select Custom intent and then click Build which will open the dialog flow

Click on Default Welcome intent

Remove the prefilled text responses and then type a new response like
Hi ! Welcome to Cartoon Stories
and then enable the webhook for the welcome intent

and then click save (the intent gets saved). We will handle the welcome intent in the backend using firebase cloud functions.
Similarly, create intents like

1. For actions_intent_CANCEL add the text response as
Comeback again i will think more stories for you
and enable the end of the conversation and click Save

2. For actions_intent_MEDIA_STATUS add the follow-up intent by clicking the Add-followup-intent

for actions_intent_MEDIA_STATUS and actions_intent_MEDIA_STATUS-yes enable the webhook and save the intent.
for actions_intent_MEDIA_STATUS_no add the text response as
Comeback again i will think more stories for you
and enable the end of the conversation and click Save
3. For actions_intent_NO_INPUT enable the webhook and click save
4. For actions_intent_OPTION create two followup intents namely

then in actions_intent_OPTION enable webhook as well as in Events to add Google Assitant option

For actions_intent_OPTION-more-stories enable webhook and save the intent and for the actions_intent_OPTION-cancel add the response and enable the set this as the end of the conversation.
5. In stories intent, we will do the same as we did in actions_intent_OPTION-more-stories like creating the two follow up intents

once done save the intent.
Now we have done with the intent part now we will create a entities
We will create an entity named @story and then add the following

Add your story invocation names and it’s synonyms

Click Save.
Well, we have completed the Part1 of this blog now it’s time for the Part 2.
Hi ! Welcome to Cartoon Stories




