Reasons Why I Love You
A small action for Google Home that tells you a few reasons why Mister Rogers loves you. Edit and deploy it yourself to make a custom action that tells someone special why you love them!
How to customize this for someone special
Get your accounts set up
- Sign up for a Glitch account to host your code
- Create a Google Cloud project to host your action. Remember the name you gave it.
- Sign up for a Dialogflow account to control the action logic
Steps to set up your Google Home Action
- 'Remix' this app on Glitch. (i.e. copy it to your account so you can edit it), and open the vars.js file. Change the variable
personto be your name. Change the
reasonsto include your own reasons, as many as you'd like! Pay attention to the syntax and grammar here.
- Create a new 'agent' in Dialogflow, making sure to select the Google Cloud project you created earlier.
- Click on the gear icon next to the agent name to access settings. Click "Export and Import" and import the following zip file: assets/reasons-why-he-loves-you.zip.
- Edit the name, description, etc. in "General" settings.
- Click "Intents" in the left sidebar, and modify the "User says" inputs for "Give a Reason" and "Give a Reason - more" (accessible via the arrow next to "Give a Reason") to include messages you want the user to be able to say to hear a reason.
- Click "Integrations" and make sure "Web Demo" is active. A popup box will show you a link. Copy the long string of characters after
https://bot.dialogflow.com/, and replace the
projectIDvariable in vars.js with it. It should follow a similar format to the existing id.
- Click "Fulfillment" in the left sidebar and update the url to include the link to your Remixed project created in step 4. That's the url in the tab that opens when you click 'Show' from your Glitch project page. It will have the format
Your agent should now be working!
- Let's test!
- Type an example command in the right sidebar of Dialogflow to see if you get the responses you expect.
- You can also check if it works from the "Integrations" page by clicking on "Google Assistant" and then clicking "Test" at the bottom of the popup.
- This is also a good time to check your project's 'Show' page to see if the embedded action works. Note that the rest of the page will still be Mister Rogers-themed unless you change the
htmlOutputvariable in vars.js.
- Finally, preview the action using the Google Home web simulator. Access it from the left sidebar of your Actions on Google project page.
- If all of that worked, you have a working action! Now, you have three options:
- Modify and share your Glitch project demo page and use that as your online reason-giver
- Set up "infinite testing" so you can use your action privately and indefinitely! This is a bit of a process, though...
- Glitch for providing the starter code and hosting
- Erin, for loving and supporting me. Happy Valentines' Day. =)
- Google, for giving me a new, nerdy way to tell Erin that I love her. Their docs have more explanations, examples, and tutorials
- Google Developer Group NYC for inspiring me to tinker with Google Actions