This integration uses Rocket.Chat incoming webhook. With this integration, you'll get your event notifications right into Rocket.Chat.
- 3.Create a dedicated channel for the event messages to be posted. You can use an existing channel as well.
- 1.Go to
- 2.Click the "New" button on the top right corner, then select "incoming" for the webhook type.
- 3.Check "Enabled". Give it an optional name. Enter the channel name where the messages are going to be posted. For the "post as" box, enter a bot username like
rocket.cat. You can use other usernames as well, you're free to experiment.
- 5.Go to the bottom of the page and click "save".
As soon as the webhook is saved, you'll notice a webhook URL -
We'll need this in the next step.
The integration program runs on a server, periodically grabs the event data from your calendar and sends that data to your Rocket.Chat server to be processed and sent to the channel you set up in the previous section.
go get github.com/debdutdeb/rocketchat-google-calendar
fishconfig and add
$(go env GOPATH)/binto your
PATH. This way you won't have to specify the whole path to the command every time.
Use the help option to learn all the command line options and modify its execution process -
Usage of ./rocketchat-google-calendar:
List of calendar IDs, separated by commas. (default "primary")
Enter path to the credentials file. (default "credentials.json")
The upper limit of upcoming event start time. Lower bound is the moment of API access. (default "30m")
Time to wait before attempting a POST to Rocket.Chat webhook. (default "5m")
Enter the webhook url you got from Rocket.Chat.
Enter the appropriate values for the respective options.
You'll then be asked to open a link. Click on it and use your Google account to authorize the app.
Once you get the token, copy and paste it on the terminal and hit enter.
Your integration should now be running.
In the example command above, the event data is fetched from the Google servers every 5 minutes. You can change that behaviour however you like.
One very common usecase is to be notified about all the meetings/events for each day, in the morning. You can achieve this by combining the two flags
24hfor both of those options. This way the integration program will fetch data every 24 hours, list the events that's going to occur in those 24 hours and send them to your Rocket.Chat server.