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
There is no built package available for installation, you need to compile the source code. This plugin cannot be installed on Mattermost Cloud products, as Cloud only allows installing plugins from the marketplace.
- Clone this repo.
- Install npm, Golang, golangci-lint and Automake.
- Go into the cloned directory and run
make
. You will need to upload this to your mattermost instance through the system console and provide it a Client secret and Client ID. - When building is finished, the plugin file is available at
dist/com.mattermost.google-calendar-VERSION.tar.gz
- In your Mattermost, go to System Console > Plugin Management and upload the
.tar.gz
file.
- 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. - From the left menu select
Library
and activate the Google Calendar API. - From the left menu select
Domain verification
and verify the domain of your Mattermost installation. - From the left menu select
Credentials
. - 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!!