May 26, 2024


In at present’s world, the place on-line collaborative work is essential and sustaining productiveness is essential,  chatbots have an essential position to play. Why chatbots? Staff continuously want to include info from exterior sources of their communications, and chatbots might help them discover that info multi functional place. On this submit we’ll stroll you thru a bot that was impressed by an actual use case right here at Google. 

In giant corporations resembling Google, it may be troublesome to seek out out which particular person is liable for a selected product space. When buyer groups have a query they typically should undergo many advert hoc trackers such because the one right here in Sheets (pattern scrubbed knowledge) to seek out solutions. 

If you end up on the go loads, this will get even more durable, particularly if you happen to do not bear in mind the Sheets URL and methods to use it to seek out your reply. As a substitute of sifting by way of a spreadsheet, what if you happen to might simply ship a chat message to see who to contact for networking or safety experience? That’s the place the combination between Dialogflow and Google Chat is available in! It helps scale back context switching for customers, as a result of they’ll ask their questions proper inside Google Chat, addressing a bot in-built Dialogflow that integrates with the Sheets API to seek out solutions. Let’s see the way it works!

For those who’d moderately watch than learn, we share your complete course of on this video:

How does it work?

When a person asks a query in  Google Chat, the bot that’s initiated integrates with Dialogflow to facilitate pure conversations. Dialogflow, in flip, integrates with a backend database or Sheets (as proven within the picture) by way of a Cloud Capabilities success. 


Extracting the data from Google Sheets

To extract the data from Sheets we first have to know precisely what info is related to satisfy a request. After figuring out the items of knowledge we’d like, we use the Sheets API to extract them. 

Defining the enter phrases

Whereas it could be simpler to write down a fundamental bot that requires the enter to be formatted in a predetermined order, such a bot can be troublesome to make use of. Customers must bear in mind the order and all the time spell every part accurately. And if a software is just too exhausting to make use of, folks aren’t going to make use of it.

The important thing to chatbot adoption is usability, and meaning the flexibility to deal with phrases that happen in pure dialog, like these: 

  • “Who’s on Gmail for knowledge administration?”
  • “I wish to know the info administration guru “
  • “Inform me who’s the info administration specialist”

That is the place Dialogflow is available in. Dialogflow is a pure language understanding platform that simplifies the design and integration of conversational person experiences for cell apps, internet apps, bots, and extra. 

We constructed our bot in three simple steps, which ought to look acquainted to you if  you have accomplished the Deconstructing Chatbots video sequence. 

Step 1: Outline the entities

Dialogflow makes use of fashions educated on pure dialog.  Earlier than we will use these fashions, nevertheless, our bot must know the important thing phrases in our context, such because the position sorts, expertise, and account names (e.g.,  Account Specialist, Gmail, and Safety).


Step 2: Configure the intents

An intent is basically the person’s query. That is the place we outline methods to use the entities we simply created by defining Actions and Parameters. After we add the bot to a room, the intent is the place the response comes from.

Actions and Parameters

The entities you outline are utilized in  configuring your actions and parameters. On this case, Roles, Abilities, and Accounts are all required parameters for this intent to be fulfilled (and the person can present these in any order they like). If a person forgets one, we outline a immediate to get it from the person. 


Coaching phrases 

As a result of completely different folks speak in another way, we use coaching phrases to offer completely different examples of person requests. Dialogflow makes use of a pretrained NLP mannequin, and these coaching phrases are the life like questions that assist practice a selected mannequin for our use case.

training phases

Step three: Arrange success code

Success is the place we glue every part collectively, connecting all of the APIs in a Node.js Firebase operate. On this case, we use the Sheets API however you possibly can hook up with any backend you select. Seek advice from the pattern code for particulars.

Inline Editor

One-click integration 

Dialogflow integrates with many common dialog platforms like Google Chat, Google Assistant, Slack, and extra. Direct end-user interactions are dealt with for you, so you possibly can deal with constructing your agent. Every integration handles end-user interactions in a platform-specific manner, so see the documentation to your integration platform for particulars. 


Constructing a chatbot that integrates Google Chat, Dialogflow, and Sheets (or one other knowledge supply) is simple.  For extra particulars, watch our Combine Dialogflow with Google Chat video, the place we speak in additional depth concerning the course of, and take a look at the total supply code on GitHub. 

Need to study extra about constructing chat and voice functions utilizing Dialogflow? We’ve created a whole video sequence on Deconstructing Chatbots that can take you from zero to hero very quickly!

For extra cloud content material comply with us on Twitter @pvergadia and @srivas_dev.

Associated Article

Conversational AI drives higher buyer experiences

Conversational AI takes contact facilities into a brand new period of customer support.

Learn Article


Source link

Leave a Reply

Your email address will not be published. Required fields are marked *