Dialogflow
How to create a bot using Dialogflow on Gupshup platform
- When you create a Dialogflow agent, a Google Project is created automatically or you can choose an existing Google project.
- Along with this Google Project, a Google Service account is also created which has all permissions to communicate with the Dialogflow.
![DF 1.jpeg 1443](https://files.readme.io/df8b8ae-DF_1.jpeg)
Step 1: ##Get the Google Project ID
- Log in to your Dialogflow account and select your agent.
- Then click on Gear Icon next to your agent name and copy Project ID as shown in the image below.
![DF 2.jpeg 1444](https://files.readme.io/7e20209-DF_2.jpeg)
Step 2: Generate Dialogflow JSON
- In the Dialogflow console, click on the gear icon.
- Click on the Google Project.
![DF 3.png 593](https://files.readme.io/835bdfe-DF_3.png)
- In the Google Console, click on the hamburger icon in the top left corner.
![DF 4.png 297](https://files.readme.io/cce4895-DF_4.png)
- In the menu that appears on the left, click on IAM & Admin.
![DF 5.png 297](https://files.readme.io/a0738d8-DF_5.png)
- Click on Service Accounts.
![DF 6.png 220](https://files.readme.io/736cd05-DF_6.png)
- Create a new service account by clicking on the + Create Service Account button.
![DF 7.png 216](https://files.readme.io/9588b72-DF_7.png)
- Make sure to provide Viewer access in Quick access settings.
![DF 8.png 395](https://files.readme.io/7861dc6-DF_8.png)
- After the creation of the service account, click on Manage Keys in the list of service accounts.
![DF 9.png 1640](https://files.readme.io/a346e57-DF_9.png)
- Click on Add Key For that service account.
![DF 10.png 1633](https://files.readme.io/1fa9867-DF_10.png)
- Select key type as JSON.
![DF 11.png 559](https://files.readme.io/2940617-DF_11.png)
- Then a JSON file will be downloaded to your local machine. Copy the content of the JSON for later use.
Step 3: Create a bot using Dialogflow method
- Sign up/Log in to the Gupshup website.
- Go to Dashboard tab > My Bots section.
- Click the + button in the top right corner to create a new bot.
![DF 12.png 1893](https://files.readme.io/eee3cf7-DF_12.png)
- Enter a name and description for the bot and click Next.
![DF 13.png 891](https://files.readme.io/599c8e5-DF_13.png)
- In the Select Method tab, select Dialogflow and enter the JSON you copied earlier in the JSON field that appears.
- Click the Create Bot button. Your Dialogflow agent will be linked to the bot.
![DF 14.png 886](https://files.readme.io/bec8139-DF_14.png)
Updated over 2 years ago