Chatbot education

👉 Chatbot videos

👩🏼‍🎓 Bot Academy

Activechat Essentials

E-commerce Chatbots

Advanced Chatbot Tools

Tracking code installation

Tracking page visits

Natural Language Chatbots

Intents and Entities

NLP contexts

Building Dialogflow agent and connecting to Activechat

Sending user input to NLP engine

Triggering bot skills by intents and events

Working with entities

Slot filling

Using contexts

NLP best practices 

Google Calendar chatbot integration

What if chatbot can help you to manage your schedule?
Your schedule, meetings is on your chatbot, with Activechat – it’s easier than you think.

In this short guide I will show you how to interact with Google Calendar through your chatbot.

1. Connecting your Google account to the chatbot

Go to “Settings – Integrations” and select “Google Services” on the left. Click “Connect” to give Activechat permission to access your Google account and you’ll see the complete list of Sheets in the table. This is for reference only (you will be able to select specific Sheets from this list later in block settings).

Now when you have your Google Service account connected to the chatbot, you can use all Google blocks in Activechat constructor.

2. Creating an event in Google Calendar (GC Create)

Use the GC Create to Create an event in your Google Calendar.  Please note that time  should be entered in 24-hour clock format  and  dates  should be entered in yy.mm.dd format.

Here is field description in-depth:

  • calendarId = Choose your Google account;
  • startTime = enter the start event time in 24 – hours format (e.g. 13:00);
  • endTime= enter the end event time in same way (e.g. 14:00 );
  • startDate =  enter the start date in yy.mm.dd. (eg. 19/04/15);
  • endDate =  enter the end date in yy.mm.dd. (eg. 19/04/15);
  • summary= Enter the Title of the event;
  • creatorEmail= enter your email;
  • timeZone= Enter your GMT in following way – if you located in GMT +1 = enter 1. If you located in GMT -1 = enter -1 (you have to enter it manualy);
  • description = Enter the description of your event.

To make things work you will also need system variables:

      ➡️ $_gc_event_summary
      ➡️ $_gc_event_description
      ➡️ $_gc_event_creator
      ➡️ $_gc_event_start_time
      ➡️ $_gc_event_end_time
      ➡️ $_gc_event_start_date
      ➡️ $_gc_event_end_date

After GC-Create block is executed you can check resulting status with $_gc_result variable (it should contain “Ok” if data was sent successfully). Use SWITCH block to check this if necessary.

Do not forget to connect TEXT block (displaying $_last_error system variable) to the ERROR exit so that your bot will inform you if anything goes wrong while executing these blocks. If you do not have anything connected, the blocks will fail silently and you will spend lots of time trying to figure out what’s going on. 

Here is the screenshot of my flow:

2. Find your events and meetings (GC Search)

Use GC Search to check your schedule.

Date interval:

In red square will be interval in which it will search your events. For example, if you have an event in date – 2019/05/13 , you can set interval: dateMin: 2019/05/10 and dateMax: 2019/05/14 . Put it simple – to find event(s) you should just set a date interval in which your event(s) fits.

Time interval

The same thing with a time interval, for example: if you need to find an event  which starts in 10:50, place Time max for 10:52.

Timezone

Tricky thing about timezone is that every Google Calendar has its timezone, like here:

This field is optional in GC SEARCH, it will move your time interval according to your Google Calendar timezone.

As the result you can get something like this:

3. Update or remove your events

It’s quite simple. Let’s check it.
Use our system variable – $_gc_event_id  to identify the event which you want to edit.

Feel free to edit any fields you want in chosen event

Removing events

You can toggle the “remove” option if it’s on – the event will be deleted. If the toggle is turned off – bot will update the information which you entered.