We are gonna develop a new app just for google home using dialog flow and here, the fulfillment section is going to use a cloud function on firebase and pull data from the google cloud’s datastore to fulfill the intent. And the front-end or the user interaction is going to happen through google home.
Building High-Quality Apps for Google AssistantPeter Friese
In this session, I will show you how to build great apps for the assistant using Dialogflow and Actions on Google. Building Actions with Dialogflow is deceptively easy, but building great apps that meet the quality bar requires in-depth knowledge of the design guidelines we defined. In this talk, I'm going to walk you through the best practices for VUI design and will show you how to apply these to your Assistant apps. We’ll cover topics such as handling new and returning users, robust error handling for no-input and no-match situations, and being able to repeat information for the user. We will also look at strategies for implementing multi-lingual apps and how to design for multiple surfaces at the same time.
Using Dialogflow to build actions for Google Assistant ‘18Abdelrahman Omran
You already know Google Assistant, and you're now ready to develop actions for billions of users? Let's know about Dialogflow together and how simple and easy we can do amazing stuff with basic knowledge and sometimes without any coding at all. It's kind of fun, and interesting experience, so let's get started building something useful. You're free to use these slides in your talks, I'd appreciate giving credits though - https://goo.gl/Dn7ruf
These have been slightly updated from the presentation given by Kevin Pettitt with Bruce Elgort and Vince Schuurman at the Irish Lotus User Group (ILUG) conference in May 2007
User Stories and User Story Mapping by Jason JonesAgile ME
There are two eternal challenges to Software Development Projects. One is that there are always more to build than we have time or resources to do. Always! The other is that all project problems ultimately comes down to poor communication. User Stories is really the promise of a conversation and User Story Mapping is a proven way of using Stories for doing release planning. Thus, this session will address both eternal challenges. The simplicity of the technique makes it a great starting point on the agile journey for most companies and will also help you improve the User Experience of your product. Join Andreas in an interactive session filled with hands on exercises that provides you with all the tools you need to start using User Story Maps at your work place.
Building High-Quality Apps for Google AssistantPeter Friese
In this session, I will show you how to build great apps for the assistant using Dialogflow and Actions on Google. Building Actions with Dialogflow is deceptively easy, but building great apps that meet the quality bar requires in-depth knowledge of the design guidelines we defined. In this talk, I'm going to walk you through the best practices for VUI design and will show you how to apply these to your Assistant apps. We’ll cover topics such as handling new and returning users, robust error handling for no-input and no-match situations, and being able to repeat information for the user. We will also look at strategies for implementing multi-lingual apps and how to design for multiple surfaces at the same time.
Using Dialogflow to build actions for Google Assistant ‘18Abdelrahman Omran
You already know Google Assistant, and you're now ready to develop actions for billions of users? Let's know about Dialogflow together and how simple and easy we can do amazing stuff with basic knowledge and sometimes without any coding at all. It's kind of fun, and interesting experience, so let's get started building something useful. You're free to use these slides in your talks, I'd appreciate giving credits though - https://goo.gl/Dn7ruf
These have been slightly updated from the presentation given by Kevin Pettitt with Bruce Elgort and Vince Schuurman at the Irish Lotus User Group (ILUG) conference in May 2007
User Stories and User Story Mapping by Jason JonesAgile ME
There are two eternal challenges to Software Development Projects. One is that there are always more to build than we have time or resources to do. Always! The other is that all project problems ultimately comes down to poor communication. User Stories is really the promise of a conversation and User Story Mapping is a proven way of using Stories for doing release planning. Thus, this session will address both eternal challenges. The simplicity of the technique makes it a great starting point on the agile journey for most companies and will also help you improve the User Experience of your product. Join Andreas in an interactive session filled with hands on exercises that provides you with all the tools you need to start using User Story Maps at your work place.
Chatbot is a program that can conduct an intelligent conversation. It should be able to convincingly simulate a human behavior and pass the Turing test.
In this series, we will learn how to build a chatbot from scratch, connect it with external API to pull data and deploy it on Slack as a bot.
Want to build a custom app for Google Home or Google Assistant? Learn the basic concepts and how you can create a custom app to reach your users on new platforms (Google Home, Android, iPhone, and more) and help them get things done.
We'll use serverless tools like Google Cloud Functions as well as API.AI to do intelligent routing of commands to entities and intents.
Video of this talk available at: https://www.youtube.com/watch?v=C492KgDMO0c&list=PLlCd2ljeqltbJQQ79eyxbresnaKkP0TgS&index=1
The ability to keep up with the current digital revolution and ensure business continuity is dependent on the skills of Flutter App Development Services. When it comes to Flutter app development tools, businesses have many options. Additionally more agile than past methods, this one makes it simpler for engineers to write code. Google's backing is likely to directly cause Flutter's popularity to soar. To accomplish this successfully, you will require numerous extra development tools from other sources.
Is expanding your company's presence in the target market your goal? Increasing your reach and the visibility of your business is your only goal, regardless of whether you are an enterprise, SMB, or startup preparing to launch a new product.
Advantages of golang development services & 10 most used go frameworksKaty Slemon
Golang is a programming language trusted by companies like Dropbox, Facebook, Netflix & Uber. Here we are providing Golang pros & list of top 10 Golang Frameworks.
This session is about how to get started with mobile development. Most developers are used to build software for desktop. Regardless of the technology you pick up for building mobile apps there are some tips and tricks that can help smooth your path.
Time to learn flutter or stick to native development Concetto Labs
Both app development languages React Native & Flutter have their own pros and cons. But, if you see, Flutter is a clear winner in this app development race.
Does Flutter Offer Distinctive Cost AdvantagesMindfire LLC
Owing to its versatility, Flutter is an easy framework to work with. It doesn’t require UI-specific components. When building cross-platform apps using Flutter, there are a plethora of factors to consider. Developers may build applications that are compatible with both Android and iOS devices by using Flutter’s unified codebase.
Consequently, the amount of work required for developing and testing on different platforms is decreased, resulting in a reduction in expenditures overall.
React Native App Development in 2023-Tips to Practice.pdfTechugo
Cross-platform development is not a new trend. However, it is a necessity in modern app development. React Native, a cross-platform tool, allows you to create mobile apps for Android and IOS at the same time. The framework should be familiar to developers.
This book is crafted for beginner coders seeking to delve into the realm of web app development using Python, specifically focusing on deploying applications with Replit.
Whether you aim to create a profitable venture or simply desire to enhance your skills in building and deploying web applications, this guide is tailored for you.
Our web application will be a straightforward yet powerful AI writer tool aimed at helping Users get special copy for their businesses based on a big Ad Men using OpenAI's API.
Buy full book here:
https://www.amazon.com/dp/B0CSPV74XK
General trends on how Indians use streaming service such as Hotstar:
About IPL:
The Indian Premier League (IPL) is a professional Twenty20 cricket league in India contested during March or April and May of every year by eight teams representing eight different cities or states in India.[3] The league was founded by the Board of Control for Cricket in India (BCCI) in 2008. The IPL has an exclusive window in ICC Future Tours Programme.
The IPL is the most-attended cricket league in the world and in 2014 ranked sixth by average attendance among all sports leagues.[In 2010, the IPL became the first sporting event in the world to be broadcast live on YouTube.The brand value of the IPL in 2019 was ₹475 billion (US$6.7 billion), according to Duff & Phelps.[8] According to BCCI, the 2015 IPL season contributed ₹11.5 billion (US$160 million) to the GDP of the Indian economy.[9]
There have been twelve seasons of the IPL tournament. The current IPL title holders are the Mumbai Indians, who won the 2019 season. The venue for the 2020 season has been moved, due to the ongoing COVID-19 pandemic; games will now take place in the United Arab Emirates from 19 September through 10 November.
Official report from hotstar about the 2018 vivo IPL.
About IPL:
The Indian Premier League (IPL) is a professional Twenty20 cricket league in India contested during March or April and May of every year by eight teams representing eight different cities or states in India. The league was founded by the Board of Control for Cricket in India (BCCI) in 2008. The IPL has an exclusive window in ICC Future Tours Programme.
The IPL is the most-attended cricket league in the world and in 2014 ranked sixth by average attendance among all sports leagues. In 2010, the IPL became the first sporting event in the world to be broadcast live on YouTube. The brand value of the IPL in 2019 was ₹475 billion (US$6.7 billion), according to Duff & Phelps. According to BCCI, the 2015 IPL season contributed ₹11.5 billion (US$160 million) to the GDP of the Indian economy.[9]
There have been twelve seasons of the IPL tournament. The current IPL title holders are the Mumbai Indians, who won the 2019 season. The venue for the 2020 season has been moved, due to the ongoing COVID-19 pandemic; games will now take place in the United Arab Emirates from 19 September through 10 November.
More Related Content
Similar to How to build and publish a google home app with dialogflow
Chatbot is a program that can conduct an intelligent conversation. It should be able to convincingly simulate a human behavior and pass the Turing test.
In this series, we will learn how to build a chatbot from scratch, connect it with external API to pull data and deploy it on Slack as a bot.
Want to build a custom app for Google Home or Google Assistant? Learn the basic concepts and how you can create a custom app to reach your users on new platforms (Google Home, Android, iPhone, and more) and help them get things done.
We'll use serverless tools like Google Cloud Functions as well as API.AI to do intelligent routing of commands to entities and intents.
Video of this talk available at: https://www.youtube.com/watch?v=C492KgDMO0c&list=PLlCd2ljeqltbJQQ79eyxbresnaKkP0TgS&index=1
The ability to keep up with the current digital revolution and ensure business continuity is dependent on the skills of Flutter App Development Services. When it comes to Flutter app development tools, businesses have many options. Additionally more agile than past methods, this one makes it simpler for engineers to write code. Google's backing is likely to directly cause Flutter's popularity to soar. To accomplish this successfully, you will require numerous extra development tools from other sources.
Is expanding your company's presence in the target market your goal? Increasing your reach and the visibility of your business is your only goal, regardless of whether you are an enterprise, SMB, or startup preparing to launch a new product.
Advantages of golang development services & 10 most used go frameworksKaty Slemon
Golang is a programming language trusted by companies like Dropbox, Facebook, Netflix & Uber. Here we are providing Golang pros & list of top 10 Golang Frameworks.
This session is about how to get started with mobile development. Most developers are used to build software for desktop. Regardless of the technology you pick up for building mobile apps there are some tips and tricks that can help smooth your path.
Time to learn flutter or stick to native development Concetto Labs
Both app development languages React Native & Flutter have their own pros and cons. But, if you see, Flutter is a clear winner in this app development race.
Does Flutter Offer Distinctive Cost AdvantagesMindfire LLC
Owing to its versatility, Flutter is an easy framework to work with. It doesn’t require UI-specific components. When building cross-platform apps using Flutter, there are a plethora of factors to consider. Developers may build applications that are compatible with both Android and iOS devices by using Flutter’s unified codebase.
Consequently, the amount of work required for developing and testing on different platforms is decreased, resulting in a reduction in expenditures overall.
React Native App Development in 2023-Tips to Practice.pdfTechugo
Cross-platform development is not a new trend. However, it is a necessity in modern app development. React Native, a cross-platform tool, allows you to create mobile apps for Android and IOS at the same time. The framework should be familiar to developers.
This book is crafted for beginner coders seeking to delve into the realm of web app development using Python, specifically focusing on deploying applications with Replit.
Whether you aim to create a profitable venture or simply desire to enhance your skills in building and deploying web applications, this guide is tailored for you.
Our web application will be a straightforward yet powerful AI writer tool aimed at helping Users get special copy for their businesses based on a big Ad Men using OpenAI's API.
Buy full book here:
https://www.amazon.com/dp/B0CSPV74XK
General trends on how Indians use streaming service such as Hotstar:
About IPL:
The Indian Premier League (IPL) is a professional Twenty20 cricket league in India contested during March or April and May of every year by eight teams representing eight different cities or states in India.[3] The league was founded by the Board of Control for Cricket in India (BCCI) in 2008. The IPL has an exclusive window in ICC Future Tours Programme.
The IPL is the most-attended cricket league in the world and in 2014 ranked sixth by average attendance among all sports leagues.[In 2010, the IPL became the first sporting event in the world to be broadcast live on YouTube.The brand value of the IPL in 2019 was ₹475 billion (US$6.7 billion), according to Duff & Phelps.[8] According to BCCI, the 2015 IPL season contributed ₹11.5 billion (US$160 million) to the GDP of the Indian economy.[9]
There have been twelve seasons of the IPL tournament. The current IPL title holders are the Mumbai Indians, who won the 2019 season. The venue for the 2020 season has been moved, due to the ongoing COVID-19 pandemic; games will now take place in the United Arab Emirates from 19 September through 10 November.
Official report from hotstar about the 2018 vivo IPL.
About IPL:
The Indian Premier League (IPL) is a professional Twenty20 cricket league in India contested during March or April and May of every year by eight teams representing eight different cities or states in India. The league was founded by the Board of Control for Cricket in India (BCCI) in 2008. The IPL has an exclusive window in ICC Future Tours Programme.
The IPL is the most-attended cricket league in the world and in 2014 ranked sixth by average attendance among all sports leagues. In 2010, the IPL became the first sporting event in the world to be broadcast live on YouTube. The brand value of the IPL in 2019 was ₹475 billion (US$6.7 billion), according to Duff & Phelps. According to BCCI, the 2015 IPL season contributed ₹11.5 billion (US$160 million) to the GDP of the Indian economy.[9]
There have been twelve seasons of the IPL tournament. The current IPL title holders are the Mumbai Indians, who won the 2019 season. The venue for the 2020 season has been moved, due to the ongoing COVID-19 pandemic; games will now take place in the United Arab Emirates from 19 September through 10 November.
- About SBBin21 course
- **StopBeingBoring in 21** is gently crafted flagship course of SBB. It is never
late to embrace your uniqueness with grace and quiet confidence. In nurturing space,with lot support of wonderful facilitators you are going to create dank and not so dank memes, craft personal stories, write poems , co write and act in a comedy sketch. Ready for the fun ride?
Fatafat click this link and schedule a tête-à-tête.
https://stopbeingboring.club/sbb-in-21-days-ya
Or write to stopbeingboring.hq@gmail.com
//whatsapp to 8722790216 / 8870164289
- About SBB
- StopBeingBoring is one of its kind, world's first community whose
sole goal is to improve your soft skills through eclectic forms of arts.
Our members have dipped and dabbed in Improv, Stand up, Storytelling,
Sketch writing,Poetry, Rapping, Beat Boxing to name a few and created Art
with time. And in this process, have had tangible improvement in their self expression(Communication), collaboration(Team Work and Work Ethic),critical thinking and leadership skills.
Enticing? Too hard to believe. Whether you are agnostic or believer, without further ado, check www.stopbeingboring.club
Or write to stopbeingboring.hq@gmail.com
//whatsapp to 8722790216 / 8870164289
Digidesk is an electronic document and form management platform designed to eliminate manual data entry and paper documents while providing a great onboarding experience to your customers / new joiners.
This book is one of the greatest marketing manuals ever written--the classic that defines the strategies, plans, and campaigns of today's marketing battlefield. Marketing is war. To triumph over the competition, it's not enough to target customers. Marketers must take aim at their competitors - and be prepared to defend their own turf from would-be attackers at all times. This indispensable guide gives smart fighters the best tactics - defensive, offensive, flanking, and guerrilla.
You might think the key to innovation is attracting exceptional creative talent. Or making the right investments. Or breaking down organizational silos. All of these things may help - but there's only one way to ensure sustained innovation: You need to lead it - and with a special kind of leadership. Collective Genius shows you how.
Collective Genius is a great book for anyone trying to bring about a change within their organisation. This book is a collection of case studies and learnings derived from them to structure a framework that can be used by anyone at any level in the corporate / entrepreneurial life.
“Man is literally split in two: he has an awareness of his own splendid uniqueness in that he sticks out of nature with a towering majesty, and yet he goes back into the ground a few feet in order blindly and dumbly to rot and disappear forever.”
― Ernest Becker, The Denial of Death
Many entrepreneurs want to look beyond just founding a company, they are looking to leave a lasting tribute. To understand legacy in a larger context, one has to understand the root of such need and that stems from death.
This slide deck captures Ernest Becker and Jason Silva's thoughts along those lines.
So many aspiring entrepreneurs are held back, because they are waiting for a good idea to come to them. But in reality, there is no such thing as a bad idea. Any idea can be a great idea, if you think differently, dream big, and commit to seeing it realised - @richardbranson
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Elevating Tactical DDD Patterns Through Object Calisthenics
How to build and publish a google home app with dialogflow
1. Moses Sam Paul August 10, 2018
Chapter 6: How to build a Google Home App with
Dialogflow |Overview
medium.com/swlh/chapter-6-how-to-build-a-google-home-app-with-dialogflow-overview-4549d92d8d6a
Series Content:
Chapter 6: Google Home App Tutorial: Overview
Chapter 7: Google Home App Tutorial: Conversation Design
Chapter 8: Google Home App Tutorial: Environment Setup
Chapter 9: Google Home App Tutorial: Fulfillment via Inline Editor
Chapter 10: Google Home App Tutorial: Fulfillment via Cloud Datastore
Chapter 11: Google Home App Tutorial: Fulfillment via Webhook
Chapter 12: Google Home App Tutorial: App Deployment
In this series, we are going to see how to write and deploy a cloud function on firebase and
use the google cloud’s datastore as the backend and the action.google / google assistant
as the front end. Don’t panic, we are gonna break down each “term” below.
Let’s try to grasp the big picture here.
Remember this high-level flow? [If not, I strongly suggest that you finish theother 5
chapters]
1/5
2. From this chapter onwards, we are gonna develop another new app just for google home
using dialog flow and here, the fulfillment section is going to use a cloud function on
firebase and pull data from the google cloud’s datastore to fulfill the intent. And the front-
end or the user interaction is going to happen through google home so the revised version
incorporating all the technology pieces is given below.
New Terms Alert!
wakeup!!!!
1. Firebase: Firebase is a mobile and web application development platform developed
2/5
3. by Firebase, Inc. in 2011, then acquired by Google in 2014.
Explore > https://console.firebase.google.com/
2. Cloud Function: Cloud Functions for Firebase lets you automatically run backend
code in response to events triggered by Firebase features and HTTPS requests. Your
code is stored in Google’s cloud and runs in a managed environment. There’s no
need to manage and scale your own servers.
Read more > https://firebase.google.com/docs/functions/
3. Google Cloud Platform: Google Cloud Platform, offered by Google, is a suite of
cloud computing services that runs on the same infrastructure that Google uses
internally for its end-user products, such as Google Search and YouTube.
Read more > https://console.cloud.google.com/
4. Google Cloud Datastore: Google Cloud Datastore is a NoSQL document database
built for automatic scaling, high performance, and ease of application development.
Read more > https://cloud.google.com/datastore/docs/concepts/overview
5. Actions for Google: Actions on Google is a program for developers of “Actions”
(software applications) that run via Google Assistant on devices such as the Google
Home smart speaker and the Google Pixel smartphone and on the Google Allo
mobile app. Actions for Google includes toolkits, tutorials, and other community
resources.
Developers can build two types of Actions.
Direct Actions are simple; according to ‘The Verge’: “ask for information, get an
answer. Ask to turn off the lights, the lights turn off. Ask to play a song, and it plays.
Conversation Actions, in contrast, are more back and forth. “ Conversational
Actions use tools from Dialogflow, a company that Google bought and whose tools
are integrated into Actions for Google.
Read More: https://console.actions.google.com/
Conversation Steps:
3/5
4. Lets walk through the conversation steps with an example.
#1: User say “Give me a motivational Quote”
#2 Google Home sends the statement to Google Assistant
#3 Google assistant uses action for google to transcribe the speech to text
#4 Dialog Flow receives the text and figures out which agent to send this to
#5 Dialogflow’s agent identifies the intention of the user and passes to the right intent
#6 Dialogflow’s intent uses entities to store parameter values [Quote_Type: Motivational ]
*Intents are optional
#7 Dialogflow’s intent passes the request along with entities to fulfillment
#8 Fulfilment uses webhook to call the cloud function
A webhook is an API concept that's growing in popularity. A webhook (also called a
web callback or HTTP push API) is a way for an app to provide other applications
with real-time information. A webhook delivers data to other applications as it
happens, meaning you get data immediately.
#9 Cloud function executes the business logic and connects to the data store and pulls
relevant data.
#10 Fulfillment delivers the response (JSON object) from the webhook
#11 Dialogflow returns the response to Google Assistant
4/5
5. #12 Actions for Google built for google assistant synthesizes text to audio to google home
#13 Google Home responds to user with a motivational quote.
Steps involved in building a Google Home App:
1. Design the conversation
2. Setup the environment
3. Build with Dialogflow
4. Test
5. Deploy
6. Measure
Now that the big picture is clear, in the next chapter, we’ll see how to design the
conversation.
5/5
6. Moses Sam Paul August 13, 2018
Chapter 7: How to build a Google Home App with
DialogFlow |Conversation Design
medium.com/swlh/chapter-7-how-to-build-a-google-home-app-with-dialogflow-conversation-design-63d6a1402ed0
In the previous chapter, we have set the context of the app that we are trying to build for
google home and the conversation flow of the same at a high level.
In this chapter, we are gonna see how to design a conversation that will eventually become
our app.
Series Content:
Chapter 6: Google Home App Tutorial: Overview
Chapter 7: Google Home App Tutorial: Conversation Design
Chapter 8: Google Home App Tutorial: Environment Setup
Chapter 9: Google Home App Tutorial: Fulfillment via Inline Editor
Chapter 10: Google Home App Tutorial: Fulfillment via Cloud Datastore
Chapter 11: Google Home App Tutorial: Fulfillment via Webhook
Chapter 12: Google Home App Tutorial: App Deployment
Conversation design is a design language based on human conversation (similar to how
material design is a design language based on pen and paper).
1/5
7. The more an interface leverages human conversation, the less users have to be taught
how to use it.
Conversation Design is a synthesis of several design disciplines such as,
Voice User Interface design (VUI)
Interaction Design
Visual Design
Motion Design
Audio Design
UX writing.
“A man dressed in black standing under a wave-like white concrete structure” byUrfan
Hasanov on Unsplash
The role of a conversation designer is like that of an architect, mapping out what users
can do in a space, while considering both the user’s needs and the technological
constraints.
Design Tips:
1. Create a Persona
2. Think outside the box, literally (beyond the screens ) :P
3. Remember in conversations, there are no errors (everything has to be handled)
Design Process:
2/5
9. How to write a Simple Dialogue.
1. Focus on one user persona and one key use case.
2. Find a partner and role-play the conversation, with one person pretending they’re the
user and the other pretending they’re the system persona. Record the conversation. If
you don’t have a partner, you’ll have to switch between playing both roles.
3. Transcribe the conversation. This is the first draft of your sample dialog.
4. Step through the dialog, saying the user’s lines and playing each of the system
persona’s lines in the text-to-speech (TTS) in which it will be rendered. If the TTS
doesn’t sound good, rewrite it or use Speech Synthesis Markup Language (SSML) to
change its performance.
5. Repeat steps 1–4 with different user personas and key use cases.
Sample Draft of Dr. Motivation
Simple enough? In the next chapter, let’s try and implement a small chat bot that pulls
motivational quotes from the cloud data store and fulfills through the cloud function for
firebase.
Don’t worry if you don’t understand what a cloud datastore is or what a cloud function on
firebase is. We’ll slowly unravel each term and build up form scratch. Now that all the
theory part is over, trust me, It’s gonna get interesting!
4/5
11. Moses Sam Paul August 14, 2018
Chapter 8: How to build a Google Home App with
DialogFlow | Environment Setup
medium.com/swlh/chapter-8-how-to-build-a-google-home-app-with-dialogflow-environment-setup-3547993e99a4
Now that we understand the high level flow of dialogs and designed a sample conversation.
Let’s go ahead and set up the environment to start building Dr. Motivation.
Series Content:
Chapter 6: Google Home App Tutorial: Overview
Chapter 7: Google Home App Tutorial: Conversation Design
Chapter 8: Google Home App Tutorial: Environment Setup
Chapter 9: Google Home App Tutorial: Fulfillment via Inline Editor
Chapter 10: Google Home App Tutorial: Fulfillment via Cloud Datastore
Chapter 11: Google Home App Tutorial: Fulfillment via Webhook
Chapter 12: Google Home App Tutorial: App Deployment
We’ll cover the marked part in this chapter.
1/11
12. Step 1: Create a project on console.actions.google.com
Step 2: Skip the category
Step 3: Set invocation
2/11
13. Step 4: Click on Actions in the left column & Add your first Action
3/11
14. Step 5: Clicking build will open up the dialogflow console with intent already pre-filled, just
click on create
Step 6: Two intents are available already..the default fallback intent and the default
welcome intent
4/11
15. Default welcome intent handles all the pleasantry inputs by the user
default fallback intent handles all the inputs that aren’t matched to any intents we have
created/ configured
Step 7: Create a new intent (LookingForQuote) and add a hard-coded text response to it
5/11
16. Step 8: Test out if the intent is triggered
6/11
17. cool…so when the user say “give me a quote” the intent “LookingForQuote” is triggered
and the default response is pushed out.
Step 9: Create Entity.
Let’s say you want to give different types of quotes to the user. Type could be friendship,
romantic, motivational etc.
7/11
18. Step 10: Go back and edit the “LookingForQuote” intent to accommodate the “QuoteType”.
Step 11: Set Parameters and make it “required” and define the prompts so that it’s easy for
the user to give the right response.
8/11
19. Step 12: Save the intent and test out the agent.
9/11
20. if the user asks for a quote our agent now
prompts the user to be specific w.r.t the entities
we have created.
You can notice that irrespective of the type of
quote we are always getting the same response
because we have just one “hard-coded”
response.
Let’s make it a little more dynamic by enabling
the fulfillment module in the next chapter.
10/11
22. Moses Sam Paul August 15, 2018
Chapter 9: How to build a Google Home App with
DialogFlow | Fulfillment via Inline Editor
medium.com/swlh/chapter-9-how-to-build-a-google-home-app-with-dialogflow-fulfillment-via-inline-editor-4b6cc21ba14a
Now that we have setup the environment, created necessary agent, intents and entity and
tested them. Let’s move on to the fulfillment module where we’ll use the inline editor to
create a relevant response based on the entity (QuoteType)
Series Content:
Chapter 6: Google Home App Tutorial: Overview
Chapter 7: Google Home App Tutorial: Conversation Design
Chapter 8: Google Home App Tutorial: Environment Setup
Chapter 9: Google Home App Tutorial: Fulfillment via Inline Editor
Chapter 10: Google Home App Tutorial: Fulfillment via Cloud Datastore
Chapter 11: Google Home App Tutorial: Fulfillment via Webhook
Chapter 12: Google Home App Tutorial: App Deployment
Recap and which part of the big picture we are tackling now.
1/16
23. Step 1: Enable Fulfillment for the LookingForQuote intent.
Step 2: — Fulfillment via inline editor [Powered by Cloud functions for Firebase]
2/16
24. Remove everything within the inline editor. Let’s try to write from scratch one line at a time.
Nothing to be afraid of, stay with me.
Here goes. The first line.
'use strict';
Strict:
The purpose of “use strict” is to indicate that the code should be executed in “strict mode”.
With strict mode, you can not, for example, use undeclared variables.
All modern browsers support “use strict” except Internet Explorer(IE) 9 and lower: Who
uses IE anyway….unless…
3/16
25. ok moving on.
const functions = require('firebase-
functions');
Const basically defines something that
this isn’t gonna change within the
program forever. We will be importing
firebase’s functions module here.
Then a few more consts each of which will
hold our intents. These strings should
match the name of the intents.
'use strict';
const functions = require('firebase-
functions');
const {dialogflow} = require
('actions-on-google');
const WELCOME_INTENT = 'Default
Welcome Intent';
const FALLBACK_INTENT = 'Default
Fallback Intent';
const LOOKING_FOR_QUOTE_INTENT =
'LookingForQuote';
…
Now we are gonna store the dialogflow
object within a const called app.
const app = dialogflow();
Next, we are gonna define the intents and
instantiate a “conv” object that will use the
ask function to talk to the user.
app.intent(WELCOME_INTENT, (conv) => {
conv.ask("welcome to Dr.Motivation! Ask for a quote about friendship or romance
or motivation");
});
Remember to enable webhook under the fulfillment section within the “default welcome
intent”.
similarly we are going to define the other two intents as well..don’t worry about this being
simple, as our goal is to make this fulfillment run without any errors first.
one for fallback intent
app.intent(FALLBACK_INTENT, (conv) => {
conv.ask("Stop mumbling & speak up");
});
4/16
26. one for our custom intent
app.intent(LOOKING_FOR_QUOTE_INTENT, (conv) => {
conv.ask("Friends are therapists, we can drink with");
});
finally we are gonna return the dialogflow object app when the fulfillment is called
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
the full code looks like this
'use strict';
const functions = require('firebase-functions');
const {dialogflow} = require ('actions-on-google');
const WELCOME_INTENT = 'Default Welcome Intent';
const FALLBACK_INTENT = 'Default Fallback Intent';
const LOOKING_FOR_QUOTE_INTENT = 'LookingForQuote';
const app = dialogflow();
app.intent(WELCOME_INTENT, (conv) => {
conv.ask("welcome to Dr.Motivation! Ask for a quote about friendship or romance
or motivation");
});
app.intent(FALLBACK_INTENT, (conv) => {
conv.ask("Stop mumbling & speak up");
});
app.intent(LOOKING_FOR_QUOTE_INTENT, (conv) => {
conv.ask("Friends are therapists, we can drink with");
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
Step 3: Deploy the function
Step 4: Test the function
5/16
28. check out the Fulfillment response by clicking the “Diagnostic Info” ..you will see the quote
we have mentioned within the code now.
Let’s try the default fallback without enabling fulfillment via webhook and with it.
Without Webhook Enabled :
7/16
32. now that webhook call is enabled we are getting a fulfillment response as well.
Step 5: Let’s add more functionality to the code.
Since we are getting QuoteType as a parameter, let’s try and use that within our code via
simple If else statements.
first define the QuoteType entity
const QUOTE_TYPE_ENTITY = 'QuoteType';
then extract the parameter value, store it in a variable…match it to values and push
different quotes each time.
app.intent(LOOKING_FOR_QUOTE_INTENT, (conv) => {
const quote_type = conv.parameters(QUOTE_TYPE_ENTITY).toLowerCase();
if (quote_type == "motivational") {
conv.ask("Don't be a lazy ass");
} else if (quote_type == "frienship") {
conv.ask("Friends are therapists, we can drink with");
} else if (quote_type == "romantic") {
conv.ask("something romantic");
} else {
conv.ask("get off your ass and work instead of talking to me");
}
});
Test it out:
11/16
33. You can also check out the firebase console for error logs.
12/16
34. go to your fire base console..or under the inline editor click on the link
ok..so conv.parameters is not a function but an object array so change () to []
conv.parameters(QUOTE_TYPE_ENTITY)
to
conv.parameters[QUOTE_TYPE_ENTITY]
Final Code is given below:
'use strict';
const functions = require('firebase-functions');
const {dialogflow} = require ('actions-on-google');
const WELCOME_INTENT = 'Default Welcome Intent';
const FALLBACK_INTENT = 'Default Fallback Intent';
const LOOKING_FOR_QUOTE_INTENT = 'LookingForQuote';
const QUOTE_TYPE_ENTITY = 'QuoteType';
const app = dialogflow();
13/16
35. app.intent(WELCOME_INTENT, (conv) => {
conv.ask("welcome to Dr.Motivation! Ask for a quote about friendship or romance
or motivation");
});
app.intent(FALLBACK_INTENT, (conv) => {
conv.ask("Stop mumbling & speak up");
});
app.intent(LOOKING_FOR_QUOTE_INTENT, (conv) => {
const quote_type = conv.parameters[QUOTE_TYPE_ENTITY].toLowerCase();
if (quote_type == "motivational") {
conv.ask("Don't be a lazy ass");
} else if (quote_type == "frienship") {
conv.ask("Friends are therapists, we can drink with");
} else if (quote_type == "romantic") {
conv.ask("something romantic");
} else {
conv.ask("get off your ass and work, instead of talking to me");
}
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
Step 6: Deploy & Test:
14/16
37. Obviously, this can’t be the final version, if you gotta make it really dynamic you gotta
connect it to a database to pull data based on the user input.
In the next chapter, we are gonna use Google’s cloud datastore which is a type of database
to pull data from them and serve quotes to our users.
16/16
38. Moses Sam Paul August 16, 2018
Chapter 10: How to build a Google Home App with
DialogFlow | Fulfillment via Cloud Datastore
medium.com/swlh/chapter-10-how-to-build-a-google-home-app-with-dialogflow-fulfillment-via-cloud-datastore-
706d6067294b
In this chapter we are gonna see how to connect google cloud’s datastore to have a set of
quotes with different categories and pull them based on the user inputs.
Series Content:
Chapter 6: Google Home App Tutorial: Overview
Chapter 7: Google Home App Tutorial: Conversation Design
Chapter 8: Google Home App Tutorial: Environment Setup
Chapter 9: Google Home App Tutorial: Fulfillment via Inline Editor
Chapter 10: Google Home App Tutorial: Fulfillment via Cloud Datastore
Chapter 11: Google Home App Tutorial: Fulfillment via Webhook
Chapter 12: Google Home App Tutorial: App Deployment
Recap and which part of the big picture we are tackling now:
1/10
39. Let’s understand what datastore is and how is it different first.
What’s Google Cloud Datastore ?
Google Cloud Datastore is a NoSQL document database built for automatic scaling, high
performance, and ease of application development.
What’s a NoSQL database?
A NoSQL (originally referring to “non SQL” or “non relational”) database provides a
mechanism for storage and retrieval of data that is modeled in means other than the tabular
relations used in relational databases.
Comparison with traditional databases
While the Cloud Datastore interface has many of the same features as traditional
databases, as a NoSQL database it differs from them in the way it describes relationships
between data objects. Here’s a high-level comparison of Cloud Datastore and relational
database concepts:
2/10
40. Unlike rows in a relational database table, Cloud Datastore entities of the same kind can
have different properties, and different entities can have properties with the same name but
different value types. These unique characteristics imply a different way of designing and
managing data to take advantage of the ability to scale automatically.
Enough with the theory, let’s begin.
Let’s setup our datastore now
Step 1: Login to your google cloud console:
Step 2: Select your project and Click on Datastore.
3/10
41. Step 3: Create Entity
Remember entity is just an item (row). Kind (QuoteTable) is the table name. Leave the
name space as default.
4/10
42. Quote, QuoteID & QuoteType are the properties [columns] . Make sure that the QuoteType
and QuoteId are indexed as we’ll be using these properties for filtering based on the user
input.
Now that a basic data store is setup in the next chapter we’ll see how to pull data from this
from our cloud function.
Let’s go back to our inline editor.
Till now we have edited only the index.js file, but this cloud datastore is a dependecy that
has to be added to the package.json file.
5/10
43. "@google-cloud/datastore": "1.1.0"
Back to index.js file.
Am gonna make the code as simple as possible, don’t expect coding standards :)
1. instantiate the object
const Datastore = require('@google-cloud/datastore');
// Instantiate a datastore client
const datastore = Datastore();
2. Define the queries
const query1 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
'Motivational');
const query2 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
'Friendship');
const query3 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
"Romantic");
3. Run the query, capture the return JSON file and print a specific Quote.
6/10
44. app.intent(LOOKING_FOR_QUOTE_INTENT, (conv) => {
const quote_type = conv.parameters[QUOTE_TYPE_ENTITY].toLowerCase();
if (quote_type == "motivational") {
return datastore.runQuery(query1).then(results => {
conv.ask(results[0][1].Quote);
});
} else if (quote_type == "friendship") {
return datastore.runQuery(query2).then(results => {
conv.ask(results[0][1].Quote);
});
} else if (quote_type == "romantic") {
return datastore.runQuery(query3).then(results => {
conv.ask(results[0][0].Quote);
});
} else {
conv.ask("get off your ass and work instead of talking to me");
}
});
Let us take one piece of this and understand.
if (quote_type == "friendship") {
return datastore.runQuery(query2).then(results => {
conv.ask(results[0][1].Quote);
});
The results is a JSON object that has two parts. The first part hold the filtered data and the
second part holds some info. If we print these values and see the firebase log, we’ll find the
below.
so we take the first object and within that am hard-coding the second quote to be shown all
the time, this is shitty programming but you can always loop and show a random quote.
4. Final code within index.js
// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs
// for Dialogflow fulfillment library docs, samples, and to report issues
'use strict';
const functions = require('firebase-functions');
const {dialogflow} = require ('actions-on-google');
const Datastore = require('@google-cloud/datastore');
// Instantiate a datastore client
const datastore = Datastore();
const WELCOME_INTENT = 'Default Welcome Intent';
const FALLBACK_INTENT = 'Default Fallback Intent';
const LOOKING_FOR_QUOTE_INTENT = 'LookingForQuote';
const QUOTE_TYPE_ENTITY = 'QuoteType';
const app = dialogflow();
7/10
45. app.intent(WELCOME_INTENT, (conv) => {
conv.ask("welcome to Dr.Motivation! Ask for a quote about friendship or romance
or motivation");
});
app.intent(FALLBACK_INTENT, (conv) => {
conv.ask("Stop mumbling & speak up");
});
const query1 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
'Motivational');
const query2 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
'Friendship');
const query3 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
"Romantic");
app.intent(LOOKING_FOR_QUOTE_INTENT, (conv) => {
const quote_type = conv.parameters[QUOTE_TYPE_ENTITY].toLowerCase();
if (quote_type == "motivational") {
return datastore.runQuery(query1).then(results => {
conv.ask(results[0][1].Quote);
});
} else if (quote_type == "friendship") {
return datastore.runQuery(query2).then(results => {
conv.ask(results[0][1].Quote);
});
} else if (quote_type == "romantic") {
return datastore.runQuery(query3).then(results => {
conv.ask(results[0][0].Quote);
});
} else {
conv.ask("get off your ass and work instead of talking to me");
}
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
5. Deploy & Test
8/10
47. Cool, so what did we do here?
Instead of hard-coding quotes within the code, we are now pulling quotes from the google
cloud data store using the Fulfillment’s inline editor.
Well, this isn’t enough, is it ? When we are writing complex functions we might need better
debugging and better control over the code and the packages we are leveraging. So it’s
better to set up a development environment and start tinkering our code over there
In the next chapter, we’ll see how to use the firebase command line interface and a JS
editor to move the development to our local machine and deploy it as a cloud function and
use webhook to do the same.
10/10
48. Moses Sam Paul August 30, 2018
Chapter 11: How to build a Google Home App with
DialogFlow | Fulfillment via Webhook
medium.com/heptagon/chapter-11-how-to-build-a-google-home-app-with-dialogflow-fulfillment-via-webhook-
7117b51dfc00
In this chapter, we are going to learn how to get Fulfillment done via a webhook.
Series Content
Chapter 6: Google Home App Tutorial: Overview
Chapter 7: Google Home App Tutorial: Conversation Design
Chapter 8: Google Home App Tutorial: Environment Setup
Chapter 9: Google Home App Tutorial: Fulfillment via Inline Editor
Chapter 10: Google Home App Tutorial: Fulfillment via Cloud Datastore
Chapter 11: Google Home App Tutorial: Fulfillment via Webhook
Chapter 12: Google Home App Tutorial: App Deployment
As you can see below, the big picture has changed a bit because now we know that
Fulfillment can be done via in-line editor or via webhook. In this chatper we are gonna be
seeing how to use the webhook and use a cloud function to pull data from the google data
store.
1/14
50. Download | Node.js
Download the Node.js source code or a pre-built installer for your platform, and start
developing today.nodejs.org
NPM is node package manager. npm is distributed with Node.js- which means that when
you download Node.js, you automatically get npm installed on your computer.
npm
npm is a separate project from Node.js, and tends to update more frequently. As a result,
even if you’ve just…www.npmjs.com
Open your terminal/ command prompt and check if node and npm are available with these
commands
node -v
and for npm
npm -v
Step 2: Install Firebase package
npm install -g firebase-tools
-g means the node package is being installed globally.
You can read more about this package here.
3. Login to Firebase via browser by running the following command
firebase login
4. Find your present working directory
pwd
5. Make a few folder
mkdir DrMotivation
6. Get into the new folder
cd DrMotivation/
3/14
51. 7. Initiate Firebase here. The tool gives you an option to install dependencies with npm.
firebase init functions
So locally /users/sam/DrMotivation is the foder where the firebase functions will be stored.
The default firebase directory for this directory is the name of your “Agent / google cloud
project name” …
Select javascript as the language
ESLint to catch portable bugs — yes [no idea what this means]
A linter or lint refers to tools that analyze source code to flag programming errors, bugs,
stylistic errors, and suspicious constructs.
ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript
code, with the goal of making code more consistent and avoiding bugs. In many ways, it is
similar to JSLint and JSHint with a few exceptions: https://eslint.org/docs/user-guide/getting-
started
Install Dependencies — yes
4/14
52. The output would like this.
Firebase Initialization Complete!
8. Let’s see what’s inside the project folder / our present working directory (pwd)
open .
Cool, remember the inline editor page within dialogflow had package.json and index.js..we
have the same files here but with a littel but more. The node modules folder has all the
packages that are required to run this locally.
9. Open the functions folder within your favorite text editor ( I usesublime)
5/14
53. Open Index.js
Cool, now that the entire working environment is setup, let’s move on to adding code to the
index.js file and publish it as a cloud function.
10. Copy the index.js code from our dialogflow’s inline editor and the required
dependencies into the package.JSON
11. Deploy the firebase function
firebase deploy
12. Errors!
6/14
54. replaced == with === let’s try and run now.
OK, 6 errors has come down to 3…so the then.results expects a return so…
have made few changes to the code. (return true :P)
7/14
55. Now, let’s try running this.
Nice, those errors are gone, but we have “cannot find module ‘actions-on-google’.
Try tunning
cd functions
npm install
That should fix it.
Now, lets come out of the functions folder
cd ..
pwd
Make sure you are in the project folder.
Deploy firebase functions again
firebase deploy --only functions
Voila!
8/14
56. Let’s go to dialogflow’s fulfillment page and enable webook.
ok, let’s test!
9/14
58. Just to be sure, am gonna add 1 more item to romantic category and pull that quote item
current data store:
Adding one more romantic quote.
Go back and edit the index.js file . I know it’s shitty programming but bear with me, we are
building up!
return datastore.runQuery(query3).then(results => {
conv.ask(results[0][1].Quote);
return true;
Now we should get the new quote we just added to the datastore
Deploy the firebase function and test it out on dialogflow. Worked!
11/14
60. worked! Let me put the package.JSOn and
inde.JS files below
package.JSON
{
"name": "functions",
"description": "Cloud Functions for
Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase serve --only
functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only
functions",
"logs": "firebase functions:log"
},
"dependencies": {
"@google-cloud/datastore": "1.1.0",
"actions-on-google": "2.0.0-alpha.4",
"dialogflow": "^4.0.3",
"dialogflow-fulfillment": "0.3.0-
beta.3",
"firebase-admin": "~5.13.0",
"firebase-functions": "^2.0.0"
},
"devDependencies": {
"eslint": "^4.12.0",
"eslint-plugin-promise": "^3.6.0"
},
"private": true
}
Index.JS
'use strict';
const functions = require('firebase-functions');
const {dialogflow} = require ('actions-on-google');
const Datastore = require('@google-cloud/datastore');
// Instantiate a datastore client
const datastore = Datastore();
const WELCOME_INTENT = 'Default Welcome Intent';
const FALLBACK_INTENT = 'Default Fallback Intent';
const LOOKING_FOR_QUOTE_INTENT = 'LookingForQuote';
const QUOTE_TYPE_ENTITY = 'QuoteType';
const app = dialogflow();
app.intent(WELCOME_INTENT, (conv) => {
conv.ask("welcome to Dr.Motivation! Ask for a quote about friendship or romance
or motivation");
});
13/14
61. app.intent(FALLBACK_INTENT, (conv) => {
conv.ask("Stop mumbling & speak up");
});
const query1 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
'Motivational');
const query2 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
'Friendship');
const query3 = datastore.createQuery('QuoteTable').filter('QuoteType', '=',
"Romantic");
app.intent(LOOKING_FOR_QUOTE_INTENT, (conv) => {
const quote_type = conv.parameters[QUOTE_TYPE_ENTITY].toLowerCase();
if (quote_type === "motivational") {
//getQuote(query1)
return datastore.runQuery(query1).then(results => {
conv.ask(results[0][1].Quote);
return true;
});
} else if (quote_type === "friendship") {
return datastore.runQuery(query2).then(results => {
conv.ask(results[0][1].Quote);
return true;
});
} else if (quote_type === "romantic") {
return datastore.runQuery(query3).then(results => {
conv.ask(results[0][1].Quote);
return true;
});
} else {
conv.ask("get off your ass and work instead of talking to me");
}
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
Summary: What did we learn in this chapter?
We have setup a local development environment to work on the cloud functions for firebase
and made sure it works.
In the next chapter, we are gonna see how to deploy this on Google Home app store, so
that anyone can access it.
14/14
62. Moses Sam Paul August 30, 2018
Chapter 12: How to build a Google Home App with
DialogFlow | App Deployment
medium.com/heptagon/chapter-12-how-to-build-a-google-home-app-with-dialogflow-app-deployment-9596bd74d9ad
Alright, now that our basic chatbot is up and running let’s integrate with Action on Google
so that we can access it via Google Assistant.
Series Content
Chapter 6: Google Home App Tutorial: Overview
Chapter 7: Google Home App Tutorial: Conversation Design
Chapter 8: Google Home App Tutorial: Environment Setup
Chapter 9: Google Home App Tutorial: Fulfillment via Inline Editor
Chapter 10: Google Home App Tutorial: Fulfillment via Cloud Datastore
Chapter 11: Google Home App Tutorial: Fulfillment via Webhook
Chapter 12: Google Home App Tutorial: App Deployment
Step 1:
1/4
63. In the popup that opens, make sure your intents are there and click on manage assistant
app.
That should open the Actions on Google Console..with the test simulator..test out the app
here. Now you can find the actual responses.
2/4
64. Cool, so the actions on dialog flow is running perfectly on actions on google console. Let’s
move to deploy.
Deploy:
Fill the necessary details. Privacy policy is important so try to generate on fromhere
A draft of mine is below:
Location Targeting: Select the countries where you want this to be released
Surface Capabilities: No Changes here.
Release:
3/4
65. Complete the release checklist. Indicate you have completed the required steps. Then,
click the Submit for Review button.
Select testers. In the next dialog, click on the button to whitelist testers to try your alpha or
beta version. Then, enter the email addresses for the testers. You can specify up to 20
testers for alpha testing and up to 200 testers for beta testing. Testers must have a Google
account (@gmail.com) or a G Suite account. You cannot whitelist multiple users via a
Google group email alias. Click Save to complete your submission.
Invite testers. You should send an invitation email to whitelisted testers with a link to the
alpha or beta version of your Action.
Leave your mail id below, if you wanna test the app :)
This finishes our second series on building an app for Google Home. Hope you guys found
it useful, if yes, clap as long as long as you can hold that mouse button.
4/4