How to create a FAQ in Landbot with Dialogflow API v2 (BETA)
Want to offer smoother and more natural experiences to your visitors? For those of you who already know the capabilities of Dialogflow then this might sound familiar, so keep reading!
This workaround starts with a brick template called FAQ_DF v2, with an already built agent you can import (download agent zip).
In this Brick we are going to use the Detect Intent functionality of Dialogflow to offer an answer based on previously trained sentences, and also we created a fallback intent to give an answer if the question that the user ensues is not ready.
Please if you don't have a Dialogflow account yet, sign up here ➡️ Dialogflow.com
Select Sign Up if it's your first time:
- Click on Create Agent
- Name your Agent and click on CREATE
- Download the whole zip file (that has 3 files inside) previously mentioned on the beginning of this article from dropbox . Do not unzip the file we will upload it to Dialogflow
- Go to Settings section of the Agent (wheel icon)
- Go to the Export and Import option
- Import zip file
Once you add it. You will need to type IMPORT
- Go to Intents
- Add an intent and set the input context as "faqs" and leave the output context empty
- Set a phrase in the Training phrases option
- Set your answers
- Click again on the wheel icon to return to the Agent Settings section and check for the Google Project section in the General tab. Now click on the Service Account email of your account
- The Service Account console will display
- Click on the Actions (3 dots) and once the menu is displayed select "Create Key"
- Select JSON and click CREATE
- Save the downloaded file for later, we will use it to create the Token needed for our Webhook integrations with the Dialogflow API
- Import (how to import a brick) Brick FAQ_DF v2
- Open the first Webhook's configuration
- In the REQUES BODY section Paste ALL the content of the JSON file we just downloaded, and press Test. It should display the STATUS 200 and the variables that we will use later on
- Save the brick, go back to the the bot and Save again.
- Go to the SHARE section, and open in the SHARE URL to try the bot with the question you added in Share URL
- In case it recognises one of your sentences :
- In case it doesn't recognises the sentence, the Faqs_Fallback will trigger