ifttt-dialogflow-webhook
ifttt-dialogflow-webhook copied to clipboard
On this repo you will find a very small Dialogflow fullfilment that allows to integrate your chatbots with IFTTT applets.
1. Intro
On this repo, you will find a very small Dialogflow fulfillment that allows integrating your chatbots with IFTTT applets.
Dialogflow is a Google platform that facilitates the creation of chatbots. You can configure your intents and replies easily with a visual interface. You can connect your Dialogflow chatbots with a lot of platforms ( Facebook Messenger, Telegram, Google Assistant, … ).
If you want to create a chatbot that speaks with third-party services ( Gmail, Spotify, … ) you need to create a fulfillment webhook and develop a connector on your servers.
The objective of this project is to facilitate the integration of third-party services with the help of IFTTT.
IFTTT is a platform where you can configure connections between hundreds of services.
2. Example
On this example, we are going to create a small poll with a chatbot. The replies will be saved on Google Drive.
Step 1: Create a IFTTT applet:
- Create a new IFTTT account.
- Go to IFTTT New Applet.
- Click on
+this. - Search
webhooks. - Select
Receive a web request. - Write an event name. We are going to use
poll_completed. - Click on
+that. - Search
Google Sheets. - Select
Add a row to spreadsheet. - Click
Create action. - Click
Finish.
Step 2: Deploy the webhook:
- Create a Heroku account.
- Click on this button:
- Write an app name and choose a region.
- Click
Deploy app - Wait until webhook be deployed.
- Click on
Viewand you will be redirected to your app. Default user istestand default password istest. Remember change them. - This control panel will allow you to connect your chatbot intents to IFTTT applets.
Step 3: Create your intent:
- Open a browser and log in to Dialogflow.
- Click Create agent in the left menu.
- Enter your agent's name, default language, and default time zone, then click the Create button.

- Create a new intent with this features:
-
Intent name. We will use
bot.example.poll. -
Some training phrases. For example:
i want to complete the poll,complete the poll,reply the poll. -
Two required params:
- value1 - @sys.given-name - $value1. Prompt:
Your name?. - value2 - @sys.number - $value2. Prompt:
Your age?.

- value1 - @sys.given-name - $value1. Prompt:
-
A response: Thanks for reply our survey.
-
- Activate Fulfillment on
Fulfillment > Enable webhook call for this intent.. - Save intent.
- Insert your Fulfillment URL on
Fulfillmentsection. Fulfillment URL appears on Heroku control panel (you installed it on previous section).

Step 4: Connect all.
- Go to Heroku control panel.
- Insert and Save
IFTTT Events URL. - Insert connections. The first row contains Dialogflow intents. The second row contains IFTTT events. On this example you should insert:
- Intent:
bot.example.poll. - Action:
poll_completed.
- Intent:
- Save Connections.
Step 5: Test
- Go to
Integrationson Dialogflow. - Enable Web Demo.
- Click on
https://bot.dialogflow.com/... - Write
i want to complete the poll.