Skip to content

This Drupal Module helps setup Chat Bot that interacts with Voice or Key Input of User. It Works using Dialogflow API for NLP. One can enable it in specified block of its Choice, Where as Footer suits the Best. It can be extended further to accumulate as many functionalities possible.Currently this module enables Search by Title, Latest Articles…

Notifications You must be signed in to change notification settings

samhaldia/drupal_chatbot

Repository files navigation

#INTRODUCTION

This module Helps in Building Basic Drupal Chat Bot Capable of interacting Voice/Key Based in Drupal 8 Website.

#REQUIREMENTS

This module requires the following prerequisites:

Steps to make your localhost HTTPS(If You don't have Live URL):

  1. Install NGROK by visting: https://ngrok.com/download

  2. Go to cmd C:\folder_location\ngrok-stable-windows-amd64 and execute below command:

  3. ngrok http -host-header=rewrite 123.132.156.219:80

  4. On execution you will see the below screen with publicaly accessible URLs generated by Ngrok ex: "https://0aac63f6.ngrok.io".

Steps to Create a New Dialogflow Agent:

  1. A Gmail account to access Dialogflow

  2. To Create app at go to https://console.dialogflow.com/api-client/#/login

  3. Click on Sign in With Google and It will ask : "Dialogflow wants to access your Google Account". Click Allow and Accept T&C.

  4. Click CREATE AGENT in Left Most Panel of Dialogflow

  5. Give Some Agent Name, like, "ChatBot" and it will create an agent.

  6. Create Entities by Clicking Entity: 1.Click on Entities in Left Most Panel and Create New entity: "Articles". Check "Define Synonyms" and add synonyms for each entry:

     								Articles  Articles,Publishes
                             
     								Latest Updates  Latest Updates
     						
     								Updates  Updates
     						
     							2. Create Another entity: "Drupal-Search" and Add synonyms as:
     					   
     								Search  Search, Find, search
     					   
     							3. Create another Entity: "Drupal-Pages" and Add Synonyms as:
     					
     								Pages  Pages, Top Rated Pages, Latest Pages, Top Pages
    
  7. Click on CREATE INTENTS : 1. Give it name (Which will be used later): "WorldPublish"

     					2. Click ADD TRAINING PHRASES and add User expressions as: "Top Publishes", "Top Articles", "Latest Publishes", "Published articles", "Latest updates", "Articles", "What are the latest articles?", "Latest Articles".
     					   
     					   Each Intents will automatically resolved to Parameter value and its corresponding resolved value.
     					   In Response Section add: "If you don't see any articles, Please visit Our Website for Latest Updates".
     					   Enable Webhook call for this Intent
     					   
     					3. Create another Intent: "Drupal-Pages" and Add User expressions as: "Read Pages", "Top Rated Pages", "Most Read Pages", "Top Pages", "Latest Pages"
     					
     					   In Response Section add: "If you don't see any Pages, Please visit Our Website for Latest Updates".
     					   Enable Webhook call for this Intent
     					
     					4. Create another Intent: "Drupal-Search" and add user expressions as: "Search", "search". 
     					   In Responses Section add: "Sorry! We could not process your query. Please  Try with other Terms Like :  Search [Your Term ex: Pricing]".
     					   Enable Webhook call for this Intent.
    
  8. Click on Fulfillment in Left Most Panel, Enable Webhook and enter the URL as generated in ngrok for ex: In Case of Localhost: https://0aac63f6.ngrok.io/root_folder_name_of_website/assist In case of Live URL: https://Live_URL/assist

  9. Click Save

  10. Click on Settings Icon beside Agent Name in Left Most Panel. Check on V1 API and get Client Access token to be Used later. One Can Use V2 API as well and has to modify the Response Format in Controller of Module.

    Client Access Token: *************************

#INSTALLATION

#CONFIGURATION

  1. Enable the module

  2. Go to admin/config/services/chatbot-settings and fill the form as: Client Access Token: Access Token, Bot Logo Image: , Bot User Logo: , Bot Header Logo:

  3. Go To admin/structure/block click on "Place Block" in Footer region in the list of blocks and Find "Chat Bot" block and click "Place Block".

  4. Before viewing in Browser Clear the Cache and see the Chat Bot Window enabled in Footer

#MAINTAINERS

Current maintainers:

About

This Drupal Module helps setup Chat Bot that interacts with Voice or Key Input of User. It Works using Dialogflow API for NLP. One can enable it in specified block of its Choice, Where as Footer suits the Best. It can be extended further to accumulate as many functionalities possible.Currently this module enables Search by Title, Latest Articles…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published