Skip to content

Installation Guide: Step 1

Rohit Rathi edited this page Sep 17, 2018 · 2 revisions

Setup DialogFlow Assistant & Webhook

  1. Create account on DialogFlow platform & create new Agent with default settings.

  2. Go to the "agent settings" -> "Export and Import" and use "Restore from zip" and choose the zip file /dialogFlowAssistant/agent.zip

  3. Go to "ML settings tab" and make sure that "Match Mode" is set to "ML Only", if not change it so.

  4. Integrate DialogFlow agent with Google Assistant (and other platforms if you wish) in "Integrations" section.

  5. Create account on Google Cloud Platform and Go to "Cloud Functions" (You may create new google project or use the same one with which your DialogFlow agent is linked)

  6. Create new function with code from /eYantraWebhook/index.js

    Note: for development purpose, one can use Google cloud functions emulator along with localhost tunnelling applications like Pagekite or ngrok. Just complete the setup of the Emulator and go to /eYantraWebhook/ & run the following commands:

    _> functions start
    _> functions deploy eYantraWebhook --trigger-http
    
    (to read the logs)
    _> functions logs read
    
  7. Fill up the "Project" & "Server" details in "fulfillment" JSON in code with your corresponding details of Google Project of DialogFlow agent & iot-platform server respectively.

  8. Get the "access URL" of Cloud function and update it in DialogFlow's fulfillment section.

  9. Go to Google Project page of your DialogFlow agent and create new "Application Credential Key" JSON file and save it somewhere safe in your PC where the server of iot-platform will be hosted.

  10. Add "GOOGLE_APPLICATION_CREDENTIALS" in environment variables with path to that JSON key file. Check out here for detailed procedure.

Note: make sure to complete the billing process of Cloud functions in order to allow the function to access outbound requests.

You can also use any other cloud functions alternative instead of Google cloud functions like AWS Lambda, etc. if you wish to do so.