Google Search Integration

Written by Hasan Rizvi
Posted On Dec, 04, 2017
HOW TO SET UP GOOGLE SEARCH:
For this set up we will use Google Search in story as example. So let’s get started.

  • Go to “Chatbot AI” and click “Story” on the dropdown


  • Select an existing story that you want to set up Google search for or create a new one.


  • In the bottom right you will see (under “Bot Sends” block) Plugin button in the very last of all 4 options given. When you click on Plugin button, the following window will pop up with many options. Click on Google icon.



  • After clicking the Google icon, another window will pop up on top of the previous window. Scroll down on it and Click on the “Get Started” Button.



  • Now scroll a little more on the same window. Then insert your API Key down here.



    The directions to get the API Key and Search Engine ID can be found by clicking “more” link below each field. *Note: When finding Search Engine ID follow these steps:

  1. By clicking “more” underneath “API Key” and/or “Search Engine ID” you will end up at Google CSE home. Click on GET A KEY and follow the directions, you will receive your API Key.





  2. Click on “Custom Search Engine control panel”.



  3. You will be redirected to another page. Click Custom Search Heading there. And then click on your newly created search engine.



    On the new page, scroll down, you will see drop down against Sites to Search.



  4. Change it to Search the entire web. Now click on Search Engine Id button to get Search Engine Id.


  5. Now go back to your setup and paste you Search Engine ID on field required.


  • Now for the query select any value from the drop down. Remember the Google search will run against the value of query you’ve selected. For Example, {first_name} will be the first name of the user who is chatting with you.
    We prefer using your own entities or {last_user_msg}.



  • Lastly, you can add one or multiple comma separated email addresses that you want to send notifications on when an integration task is failed


WHERE TO USE GOOGLE SEARCH:
Consider a scenario where you are creating a bot for FAQ purpose. And you want to setup a story which responds meaning of what user says.

For instance, the user says “What is the meaning of chat bot”. So you create a story with keywords and set keywords like meaning, means etc. And against that you will connect Google search plugin with query of {last_user_msg}.

Whenever the user types in something with meaning in it. Your bot will quickly search Google and bring the first result from it.