Skip to content

This repository showcases a Dialogflow CX agent integrated with a Node.js and Express webhook. The webhook processes user requests and sends dynamic responses, enhancing the agent's functionality. It demonstrates how to use webhook fulfillment with Express for real-time responses, perfect for scenarios requiring external service integration

Notifications You must be signed in to change notification settings

aalee9263/dialogflow-server-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Dialogflow CX Webhook Integration with Express and ngrok This repository contains a Dialogflow CX agent integrated with a webhook built using Node.js and Express. The webhook processes user requests, handles fulfillment, and delivers dynamic responses from the server. ngrok is used to expose your local server to the internet for testing purposes with Dialogflow.

Features Webhook Fulfillment: Processes requests from Dialogflow CX and sends real-time, dynamic responses. Express Framework: Lightweight server setup using Express for handling HTTP requests. ngrok Integration: Exposes your local server for webhook testing in a Dialogflow CX agent. Easy Deployment: Ready to deploy on platforms like Heroku, AWS, or other Node.js hosting services. Installation and Setup Follow these steps to install and run the project:

  1. Clone the Repository bash Copy code git clone https://github.com/your-username/dialogflow-webhook-handler.git cd dialogflow-webhook-handler
  2. Install Dependencies bash Copy code npm install
  3. Set Up Environment Variables Create a .env file in the root directory to configure environment settings:

makefile Copy code PORT=3000 4. Run the Express Server Start your Express server by running:

bash Copy code npm start 5. Use ngrok to Expose Local Server To make your local webhook accessible to Dialogflow, run ngrok to tunnel the Express server:

bash Copy code ngrok http 3000 Copy the generated ngrok URL (e.g., https://abc123.ngrok.io) and use it in Dialogflow CX.

  1. Webhook Configuration in Dialogflow CX Go to your Dialogflow CX agent. Navigate to Fulfillment and add the ngrok URL followed by /webhook (e.g., https://abc123.ngrok.io/webhook) as your webhook endpoint. Project

About

This repository showcases a Dialogflow CX agent integrated with a Node.js and Express webhook. The webhook processes user requests and sends dynamic responses, enhancing the agent's functionality. It demonstrates how to use webhook fulfillment with Express for real-time responses, perfect for scenarios requiring external service integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published