DEV Community

JaydenChowJW
JaydenChowJW

Posted on

Align Scheduling

This is a submission for the Coze AI Bot Challenge: Bot Innovator.

What We Built

We built a scheduling bot that can help facilitate the process of organising events between groups of people, help organise your own personal events, and create documents for things like meetings etc. Using Coze in conjunction with the Google Calendar plugin suite, you will be able to organise team meetings, outings with friends with ease.

Demo

https://www.coze.com/store/bot/7363083969291714567

Image description

Image description

Image description

Image description

Image description

https://www.coze.com/store/bot/7363083969291714567

Your Configuration

The Prompt

Character

You're a proficient event organizer and personal schedule manager. You're skilled at synchronizing and organizing users' daily schedules via Google Calendars and Google Tasks. You can set details for events and tasks, and help users access them anytime. Keep your responses concise

Skills

Skill 1: Event Management

  • Get event details, including start and end time, timezone, and event title, from users.
  • Incorporate those details seamlessly into Google Calendar.
  • Delete events at user request. List the events to the user for verification before deleting them
  • When requested to update events, list down available events for the user to update. Confirm the new details with the user before making the final changes

Skill 2: Task Management

  • Directly interface with Google Tasks.
  • Schedule, record, and manage tasks as per the user's instructions.
  • Create tasks associated with events on the user's google calendar, let the user set the task to be completed a certain time before an event
  • Create subtasks if the user requires them

Skill 3: Retrieve Information

  • Provide quick access to event or task data when asked by the user.
  • Read the user's google calendar to retrieve their tasks and events
  • Create a unix timestamp for each event using its date and time details when requested.

Skill 4: Event specific or scheduled reminders

  • Allow the user to set reminders at intervals or before events
  • Ensure timely reminders are sent when they are supposed to

Skill 5: Shared Event Creation

  • Any user can suggest to the bot to add an event to everyones calendar with the same details
  • Users will consent to the event being added to their calendar when they type "Add shared event" after it has been suggested

Skill 6: Office document creation:

  • Create documents with appropriate headers and subheaders and titles for the user based on what they want the document to be about.
  • You can add the content the user provides as well

Constraints:

  • When creating an event, always specify the exact date when returning its details
  • If there is an event currently occurring at the same time as an event that wishes to be added, verify with the user that they would like both events to occur -When creating a timestamp, convert the local time to utc before creating
  • Give a short summary of your capabilities when asked, only elaborate if asked again by user

*REMEMBER If the user types in the keyword "Schedule" get all of the users events from their google calendar in order of occurrence from earliest to latest
*REMEMBER Do NOT fabricate events if there are none scheduled

Journey

There were alot of ups and downs when implementing this bot. I went through a lengthy trial and error process to ensure that my bot would perform as intended as consistently as possible. Using the many plugins that google has was much more finnicky than I had initially imagined, and they took quite some effort to wrangle in line with the features I had in mind. A few of them still elude me when it comes to getting what I want out of them.

So here's some of the troubles I encountered.

Google Calendar

First off, I originally wanted to create events on a shared calendar on google calendars. However, due to the current implementation of the Google Calendar plugin, I was unable to specify which calendar I wanted to add the event to. As a result, I decided to work around it and try to get as close as possible by letting the bot "remember" the event when it is suggested and allow users to simply easily add the event to their own calendars without having to manually input identical details.

Discord Timestamps

Something else that left me quite stumped and frustrated was a custom plugin I developed. Due to the application being deployed on Discord, I wanted the bot to be able to display times which would be automatically set to the local timezone of whoever was reading the message for scenarios where not everyone is working in the same country, especially in this age of remote working and online relationships. Discord allows this through its use of this format .
I was unable to find a plugin on the store which was published to do what I wanted, so I created a simple plugin to convert the date from the user into a timestamp to put into this format when retrieving the user's events from their calendar. However, due to the weird nature of where the bot thinks its local timezone is vs what the timezone actually is, or possibly something else entirely. I was not able to accurately get timestamps during actual bot usage, despite many modifications to the prompt. It would only work in the test runs of the plugin despite the exact same inputs. This is something I wish either I or Coze will solve in the future.

Image description

Image description

Google Tasks

Next, We wanted to use the google tasks alongside the google calendar plugins, as that only seemed natural given they are found quite related on google calendar's site. However, the limitation of the task plugin on Google's end as well as some other unknown to me factors, I could not set tasks which had a due date at all, nor could i set tasks with subtasks reliably. Thus this remains an incomplete feature.

Scheduled Triggers

Finally, We wanted the bot to carry out a daily reminder to the user, informing them of their schedule for the day. We spent quite awhile trying to get it to work on telegram and on Coze's preview, Silly of us, as soon after I checked the documentation to find it was only supported on Discord and Lark, influencing our decision to deploy it on Discord. So, I am happy to say this function now works well on Discord.

We am quite happy with the performance of this bot, and will continue to iterate on it as improvements are made to the plugins and features are added. I am excited for the future of Coze, and hope to explore all it may come to offer!

Contributors

@jaydenchowjw
@sharee10

Top comments (0)