Coder Social home page Coder Social logo

priyankavergadia / appointmentscheduler-googlecalendar Goto Github PK

View Code? Open in Web Editor NEW
90.0 90.0 62.0 17 KB

Create Appointment Scheduler chatbot using Dialogflow, by creating a fulfillment integration with Google Calendar API

License: Apache License 2.0

JavaScript 100.00%

appointmentscheduler-googlecalendar's People

Contributors

priyankavergadia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appointmentscheduler-googlecalendar's Issues

Appointments are not shown in Calendar

Goodday,

Thank you for the clear instruction videos, it was interesting to learn the steps in making an appointment agent. However, after deploying your code I don't see the scheduled appointments in my Calendar. I went through the steps twice and I don't get any error.

Could you please help me out?

No slots available though calendar is empty

After following the video tutorial and copying code from this repo, I cannot make an apointment, though webhook execution is succesful.
{ "fulfillmentText": "I'm sorry, there are no slots available for Invalid Date.", "outputContexts": [] }

{ "responseId": "39a299fc-1528-4b63-b49b-e988baa0c1f2-c8e3f272", "queryResult": { "queryText": "set appointment for drivers license Friday 10am", "parameters": { "time": "2022-01-26T10:00:00+03:00", "date": "2022-01-28T12:00:00+03:00", "AppointmentType": "Driver License" }, "allRequiredParamsPresent": true, "fulfillmentText": "I'm sorry, there are no slots available for Invalid Date.", "fulfillmentMessages": [ { "text": { "text": [ "I'm sorry, there are no slots available for Invalid Date." ] } } ], "intent": { "name": "projects/test-chat-bot-app-321808/agent/intents/f2ee95db-be68-495a-90a8-6765e6dc413d", "displayName": "Schedule Appointment" }, "intentDetectionConfidence": 0.73469204, "diagnosticInfo": { "webhook_latency_ms": 82 }, "languageCode": "en", "sentimentAnalysisResult": { "queryTextSentiment": {} } }, "webhookStatus": { "message": "Webhook execution successful" } }

Not get marked on the calendar

Hi, Priyanka (@priyankavergadia).

When I book an appointment it not get marked on the calendar. Dialogflow is working fine and it not show any errors. In the logs wrote:

dialogflowFirebaseFulfillment
Warning, estimating Firebase Config based on GCLOUD_PROJECT. Intializing firebase-admin may fail
5:40:55.727 PM
dialogflowFirebaseFulfillment
Parameters { time: [ '2019-11-16T00:00:00+02:00' ], date: [ '2019-11-16T12:00:00+02:00' ], process: [ 'test' ], name: [ 'test' ], phone: [ '59678889900' ] }
5:40:55.729 PM
dialogflowFirebaseFulfillment
TypeError: agent.parameters.date.split is not a function at makeAppointment (/srv/index.js:58:70) at WebhookClient.handleRequest (/srv/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:303:44) at exports.dialogflowFirebaseFulfillment.functions.https.onRequest (/srv/index.js:75:10) at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:57:9) at /worker/worker.js:783:7 at /worker/worker.js:766:11 at _combinedTickCallback (internal/process/next_tick.js:132:7) at process._tickDomainCallback (internal/process/next_tick.js:219:9)
5:40:55.735 PM
dialogflowFirebaseFulfillment
Function execution took 579 ms, finished with status: 'crash'

Invalid date

Hi Priyanka
how are you
every time I try to test the bot it says:
I'm sorry, there are no slots available for Invalid Date.

Dialogflow Google Calendar Fulfillment index.Js

Im new to programming and I've just started learning. I recently began practicng with Dialogflow, and I ran into a problem, and from what I've gathered, a lot of people have been experiencing this very same problem. This is within regards to the Index.Js (Webhook) fulfillment.

From What I can gather with my limited knowledge is that, With most tutorials the System Entities (paramters) @sys.date and @sys.time have now changed within dialogflow and have been made one @ sys.date-time entity (Parameter). So I assume that this is now causing the inability for the 'Event' to be created within the calendar. Most of us using these tutorials are new to coding so we cant even fix this, I would really appreciate your help with an updated version of this code because this is what I believe is causing the issue. However here is Raw response from diagnostic
{
"responseId": "e3f05ad6-814d-4eda-b029-2f8e7509fa3e-9df18b51",
"queryResult": {
"queryText": "Vehicle registration",
"parameters": {
"AppointmentType": "Vehicle registration",
"date-time": {
"date_time": "2021-03-15T09:00:00+02:00"
}
},
"allRequiredParamsPresent": true,
"fulfillmentText": "Done! your Vehicle registration is set for 2021-03-15T09:00:00+02:00",
"fulfillmentMessages": [
{
"text": {
"text": [
"Done! your Vehicle registration is set for 2021-03-15T09:00:00+02:00"
]
}
}
],
"intent": {
"name": "projects/appointmentscheduler-pmhb/locations/global/agent/intents/06e553ae-df85-42aa-ac12-6fea3be816de",
"displayName": "Schedule Appointment"
},
"intentDetectionConfidence": 1,
"diagnosticInfo": {
"webhook_latency_ms": 350
},
"languageCode": "en",
"sentimentAnalysisResult": {
"queryTextSentiment": {}
}
},
"webhookStatus": {
"code": 14,
"message": "Webhook call failed. Error: UNAVAILABLE."
},
"agentId": "702579db-b382-422b-ab12-1dbe77cfa7da"
}

Fulfillment response says there are no availablie times when the calendar is open

Hello,
the installation went well. Everything appears to be working. However, I always get the following response no matter what day/time I ask for a call. I am requesting times that I know are open.

"{
"fulfillmentText": "I'm sorry, there are no times available for March 7, 3 PM.",
"outputContexts": []
}"

Raw API Response:
{
"responseId": "12941c25-6571-4a16-90ef-d61694369554-19db3199",
"queryResult": {
"queryText": "My Name is Kelly. Please schdule an appointment for 430 PM today. My phone number is 505-270-5990",
"parameters": {
"given-name": "name",
"time": "2020-03-07T16:30:00-05:00",
"date-period": "",
"date": "2020-03-07T12:00:00-05:00",
"phone-number": "phone"
},
"allRequiredParamsPresent": true,
"fulfillmentText": "I'm sorry, there are no times available for March 7, 3 PM.",
"fulfillmentMessages": [
{
"text": {
"text": [
"I'm sorry, there are no times available for March 7, 3 PM."
]
}
}
],
"intent": {
"name": "projects/appointmentscheduler-dudrfn/agent/intents/ae76ebb0-3ee7-46f3-ac7e-c8291a2045b1",
"displayName": "Schedule Appointment"
},
"intentDetectionConfidence": 0.56380177,
"diagnosticInfo": {
"webhook_latency_ms": 470
},
"languageCode": "en"
},
"webhookStatus": {
"message": "Webhook execution successful"
}
}

Fulfillment Request:
{
"responseId": "12941c25-6571-4a16-90ef-d61694369554-19db3199",
"queryResult": {
"queryText": "My Name is Kelly. Please schdule an appointment for 430 PM today. My phone number is 505-270-5990",
"parameters": {
"date": "2020-03-07T12:00:00-05:00",
"time": "2020-03-07T16:30:00-05:00",
"phone-number": "phone",
"given-name": "name",
"date-period": ""
},
"allRequiredParamsPresent": true,
"fulfillmentText": "We look forward to our call on 2020-03-07 We will ask for name at phone",
"fulfillmentMessages": [
{
"text": {
"text": [
"We look forward to our call on 2020-03-07 We will ask for name at phone"
]
}
}
],
"outputContexts": [
{
"name": "projects/appointmentscheduler-dudrfn/agent/sessions/18a8ecf1-d9d7-fa96-80e0-6921d887ad60/contexts/system_counters",
"parameters": {
"no-input": 0,
"no-match": 0,
"date": "2020-03-07T12:00:00-05:00",
"date.original": "today",
"time": "2020-03-07T16:30:00-05:00",
"time.original": "430 PM",
"phone-number": "phone",
"phone-number.original": "phone",
"given-name": "name",
"given-name.original": "Name",
"date-period": "",
"date-period.original": ""
}
}
],
"intent": {
"name": "projects/appointmentscheduler-dudrfn/agent/intents/ae76ebb0-3ee7-46f3-ac7e-c8291a2045b1",
"displayName": "Schedule Appointment"
},
"intentDetectionConfidence": 0.56380177,
"languageCode": "en"
},
"originalDetectIntentRequest": {
"payload": {}
},
"session": "projects/appointmentscheduler-dudrfn/agent/sessions/18a8ecf1-d9d7-fa96-80e0-6921d887ad60"

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.