• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

priyankavergadia/AppointmentScheduler-GoogleCalendar: Create Appointment Schedul ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

priyankavergadia/AppointmentScheduler-GoogleCalendar

开源软件地址(OpenSource Url):

https://github.com/priyankavergadia/AppointmentScheduler-GoogleCalendar

开源编程语言(OpenSource Language):

JavaScript 100.0%

开源软件介绍(OpenSource Introduction):

Appointment Scheduler

Setup Instructions

Dialogflow and Fulfillment Setup

Service Account Setup

  1. In Dialogflow's console, go to settings and under the general tab, you'll see the project ID section with a Google Cloud link to open the Google Cloud console. Open Google Cloud.
  2. In the Cloud console, go to the menu icon ☰ > APIs & Services > Library
  3. Select Google Calendar API and then Enable to enable the API on your cloud project.
  4. Under the menu icon ☰ > APIs & Services > Credentials > Create Credentials > Service Account Key.
  5. Under Create service account key, select New Service Account from the dropdown and enter AppointmentCalendar for the name and click Create. In the popup, select Create Without Role.
    • JSON file will be downloaded to your computer that you will need in the setup sections below.

DMV Appointment Calendar Setup

  1. Open the JSON file that was downloaded in the previous section and copy the email address indicated by the client_email field
// Ex:
appointment-scheduler@${PROJECTID}.iam.gserviceaccount.com
  1. Open Google Calendar. On the left, next to Add a friend's calendar click the + and select New Calendar
  2. Enter Appointment Calendar for the name of the calendar and select Create Calendar. Next, go to the Appointment Calendar calendar that will appear on the left column.
  3. Paste the email copied from the previous step into the Add people field of the Share with specific people section and then select Make changes to events in the permissions dropdown and select Send.
  4. While still in Settings, scroll down and copy the Calendar ID in the Integrate Calendar section.

Add Service Account and Calendar ID to Fulfillment

Go to the index.js file in Dialogflow's Fulfillment section

Take the Calendar ID copied from the prior section and replace <INSERT CALENDAR ID HERE> on line 24 of index.js.

// Ex:
const calendarId = '[email protected]';

Next copy the contents of the JSON file downloaded in the "Service Account Setup" section and paste it into the empty object on line 25 of index.js const serviceAccount = {}.

//Ex:
    const serviceAccount = {
      "type": "service_account",
      "project_id": "sample",
    ...
  };

Click Deploy at at the bottom of the page.

Running the sample

In Dialogflow's console, in the simulator on the right, query your Dialogflow agent with Set an appointment at 4pm tomorrow for drivers license and respond to the questions your Dialogflow agent asks. After getting the required information, an appointment will be added to the "Appointment Calendar" calendar.

How to make contributions?

Please read and follow the steps in the CONTRIBUTING.md.

License

See LICENSE.

Disclaimer

This code is a sample, should not be used for any potential production workloads.

Terms

Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the Google APIs Terms of Service.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap