Watson Assistant

Expand all | Collapse all

How to integrate watson assistant with google calendar

  • 1.  How to integrate watson assistant with google calendar

    Posted Mon August 10, 2020 10:12 AM
    Hi,
    I've used the webhook feature in watson. I would like to know how I can go about integrating google calendar (via api's) into watson assistant?
    Does this involve creating a function where the code knows how to access google calendar api and using webhook, invoke the function? The usecase I have in mind is the following:
    The user asks the chat bot, 'what's on my calendar for today?', The bot makes a call to the calendar via API and retrieves a list of appointments for the day.
    OR
    The user asks, at what time is my piano class today? The bot responds with time based on the calendar event.

    Are there any examples/documentation that I can look into?

    btw, Morgan Langlais sent me here!

    Thanks in Advance!



    ------------------------------
    Vamshi Bhoopalam
    ------------------------------


  • 2.  RE: How to integrate watson assistant with google calendar

    User Group Leader
    Posted Mon August 10, 2020 12:12 PM
    Vamshi,

      There are two ways to do this, or any other similar integration to another cloud-based service.  

      Approach #1) Use webhooks - There are some good examples of webhook usage in the library , under the webhooks folder (https://community.ibm.com/community/user/watsonapps/viewdocument/its-now-way-easier-to-personalize?CommunityKey=7a3dc5ba-3018-452d-9a43-a49dc6819633&tab=librarydocuments&LibraryFolderKey=1ae9c14a-17f4-4bf5-a81f-da99ad0087af&DefaultView=folder) .  Mitch Mason has a nice article there.  You can also reference the example in the documentation, here (https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-webhooks).  If you scroll down through that section, it also talks about how to use IBM Cloud Functions to execute your webhooks.

      Approach #2) Create an "orchestration app" - You create the chatbot UI and do the coordination and integration of all of the various services that ​you will be using.  In this case, you need to set and track the User ID, the Assitant instance, and then monitor the JSON being returned from your Watson Assistant service.  You can then detect a "Show My Calendar" intent, and when you detect that intent, you can make whatever call(s) you need to make to the Google Calendar API.

    ------------------------------
    Daniel Toczala
    Community Leader and Customer Success Manager - Watson
    dtoczala@us.ibm.com
    ------------------------------