A google calendar plugin for Mattermost client which allows you to create, delete, and get notifications from your google calendar events.
- Create events
- Delete Events
- Get 10 minute notifications
- Get event updates
- Status is set to Do Not Disturb when in a event (Manually required to reset it)
- Get invitations request within Mattermost and reply to them instantly
- Get upcoming calendar events
- Get a summary for any day you like
Clone this repo and do a make
. You will need to upload this to your mattermost instance through the system console and provide it a Client secret and Client ID.
These can be obtained through the following procedure:
- Go to Google Cloud Dashboard and create a new project.
- After creating a project click on
Go to APIs overview
card from the dashboard which will take you to the API dashboard. - Select
Credentials
from the left menu - Now click on
Create Credentials
dropdown and selectOauth client ID
option. - While creating the Oauth credentials, enter the values of
Authorized Javascript Origins
as<Mattermost server URL>
and the value ofAuthorised redirect URIs
as<Mattermost server URL>/plugins/com.mattermost.google-calendar/oauth/complete
. - After creating the Oauth client, copy the Client ID and secret.
- Upload the plugin to Mattermost and go to
Google Calendar Plugin settings
. Paste the client id and secret. - Enable the plugin and you should be able to see event reminder notifications.
You will be required to follow the above steps to acquire a Client ID and Client secret.
- Clone the repo and make sure
mattermost server
andmattermost webapp
is up and running. - Use
ngrok
or any other tunnel provider to expose the mattermost server port (8065) to Internet. The command to create a tunnel isngrok http 8065
. (Note: Google will need you to verify the domain. You can setup use Python SimpleHTTPWebServer to set one up and upload the file google provides to verify the domain. Afterwards, you can close SimpleHTTPWebServer and run your Mattermost Server) - Replace all instances of
*config.ServiceSettings.SiteURL
with yourngrok
URL - Login to Google Cloud Console and create a new project.
- Go to API library and make sure Google Calendar API is enabled.
- Go to API and Services and select
Credentials
tab from the left menu. - Now click on
Create Credentials
dropdown and selectOauth client ID
option. - While creating the Oauth credentials, enter the values of
Authorized Javascript Origins
ashttp://localhost:8065
and the value ofAuthorised redirect URIs
ashttp://localhost:8065/plugins/com.mattermost.google-calendar/oauth/complete
. - After creating the Oauth client, copy the Client ID and secret.
- Upload the plugin to Mattermost and go to
Google Calendar Plugin settings
. Paste the client id and secret. - Enable the plugin and you should be able to see event reminder notifications.
If you are interested in contributing, please fork this repo and create a pull request!
- Change response to event within mattermost
- Show conflicts when invited to event with other events on your calendar
- Better error logging / handling
- Optimizations in cron jobs for reminding users about 10 minutes until event as well as user in event
- Code refactoring
- More commenting throughout code to explain what's going on
- Set the calendar user wants to sync with (Currently it uses primary calendar)
- Customize reminder time (user can set if they want anything other than 10 minutes)
- Include a web app portion which displays the events for a particular day without user needing to enter commands
- Hossein Ahmadian-Yazdi - Hossein's Github
- Thanks to Waseem18 Notification Plugin for the code inspiration
- Thanks to Mattermost Github Plugin for code structure
- Created as a submission for Mattermost Hackathon 2019!!