Code Monkey home page Code Monkey logo

dialogflow-tester's Introduction

DialogFlow Tester (Mock Fulfillment Webhook)

wehbooks in DialogFlow Image from DialogFlow

This is a simple Node+Express Webhook to test DialogFlow V2 APIs and mock a fulfillment webhook locally while meeting the requirements. It uses an npm version of ngrok to get a secure public url which is a core requirement for registering a webhook to DialogFlow. Depending on how the program is started, the requests or responses will be stored locally in a json file.

Install

  1. Clone the repository and install the npm dependencies
git clone https://github.com/thinkty/dialogflow-tester.git
npm install
  1. After downloading the dependencies, start the application with either npm run request to test requests from DialogFlow or npm run response to test sending responses from this application to DialogFlow.

  2. After successfully launching the application, in the terminal, there should be a secured (https) public url from ngrok.

  3. Copy the url and paste it in to the DialogFlow console. Go to DialogFlow console > Fulfillment > Webhook and paste the ngrok url in the url input field and click save. dialogflow console for webhook

  4. Click on Save and type into the Try it now input field to test your webhook. Make sure to enable webhook in the Fulfillment section of the intent.

Customization

You can also modify the generateResponse function to add your own payloads to the response back to DialogFlow.

License

MIT

dialogflow-tester's People

Contributors

dependabot[bot] avatar thinkty avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.