Calendar Plugin - AmyAssist/Amy GitHub Wiki
Plugin info
This plugin provides some functions of the google calendar.
You can ask for your events today, tomorrow or an other day. Or you can ask for the next upcoming events.
The given informations to your events include the title of the event, the start date and time as well as the end time or alternatively the information, that the event lasts the whole day.
Ths only works if you connencted your Google account with Amy and only for the events, which are stored in your Google Calendar.
You can also create new events with a dialog.
How to setup
For this plugin you need to turn on the Google Calendar API:
- Go to your Google Cloud Console Dashboard and then click on
ENABLE APIS AND SERVICES - Search for
Google Calendar APIand click on the result with the same name. - Click on
Activate. You will be redirect to your Dashboard. - Go to your Credentials (in the menu on the left) and choose an existing project or create a new one.
- Then click on
Create credentialsin theCredentialstab. Choose theOAuth client IDoption,otheras Application type, enter a name and click oncreate. Now your new client ID and client secret is displayed, there you can press onOK. - Next click on the download icon next to your OAuth 2.0 client ID and it should download a
.jsonfile. - Open the file in an Editor copy what is inside.
- Make a new file called
io.github.amyassist.amy-plugin-calendar.properties, writeCREDENTIALS_JSON=then paste what you have copied before. - Save this file in
Amy/config.
To connect your Google Calendar to Amy in the current state you have to run the backend and say or type any of the calendar grammar. The authentication will send a link to the console and make an attempt to open it right away in your standard browser. There you can give Amy the authorisation to use your Google Calendar. This will be saved into \temp\calendarauth\StoredCredential.
Plugin features
The following segments will explain the various features the plugin provides. The commands presented will have agf form as there are sometimes too many possible alternatives for one command to list them entirely. For all possible command variation see in CalendarSpeech.aim.xml You can read all about the agf form and dialogs here.
Calendar events at a date
The command for Amy to get your calendar events for any date is [which|what|do i have] [any] (events|appointments) [do i have] [at] [{date}].
If you don't tell Amy on which day she will ask When? and you can answer with today, ``tomorrow` or any other date.
Next calendar events
The command for Amy to get your next number events, where number is an integer, is what (is|are) my next [{number}] event. If you don't say any number Amy will ask How many events should i show? and you can answer {number} [event].
Create new event
The command for Amy to set up a new event is [create|make] new [{allday}] (event|appointment) [from [the] {startdate} [at {starttime}]] [(to|until) [the] {enddate} [at {endtime}]] [with {remindertype} [notification]] [at ]{remindertime}[ earlier](/AmyAssist/Amy/wiki/at-]{remindertime}[-earlier) [(named|called) {title}] and it will trigger following dialogue:
How should I name it?{title}
Is it an all day event?(yes|true|no|false)
When does it start?[at] [the] {startdate} [at {starttime}]
When does it end?[at] [the] {enddate} [at {endtime}]
You can skip each of the following two questions by saying "no" after I asked them. What should I write in the description?{description}
What is the location of the event?{location}
Do you want to receive a notification via email or as popup?[via|as] (email|popup)
ow much earlier do you want to be reminded of the event?{remindertimevalue} (minutes|min|hours|days)
Depending on how much information you give Amy in your first sentence she will ask more or less questions.
The shortest command to trigger the whole conversation would be new event and one of the longest create new all day appointment from the 21th of september 2019 until the 22th of september 2019 with email notification at 2 days earlier named weekend. After this phrase Amy would only ask for the description and location.