{"id":19987488,"url":"https://github.com/schibsted/slack-calendar-topic","last_synced_at":"2026-04-19T03:01:53.748Z","repository":{"id":54654808,"uuid":"285677006","full_name":"schibsted/slack-calendar-topic","owner":"schibsted","description":"Set the topic of a Slack channel to the currently ongoing event in a Google calendar","archived":false,"fork":false,"pushed_at":"2021-02-05T18:20:24.000Z","size":145,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-10-30T21:26:12.805Z","etag":null,"topics":["google-calendar","slack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schibsted.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-06T21:42:16.000Z","updated_at":"2021-02-05T18:20:27.000Z","dependencies_parsed_at":"2022-08-13T23:00:39.905Z","dependency_job_id":null,"html_url":"https://github.com/schibsted/slack-calendar-topic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schibsted/slack-calendar-topic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schibsted%2Fslack-calendar-topic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schibsted%2Fslack-calendar-topic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schibsted%2Fslack-calendar-topic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schibsted%2Fslack-calendar-topic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schibsted","download_url":"https://codeload.github.com/schibsted/slack-calendar-topic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schibsted%2Fslack-calendar-topic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31992822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-calendar","slack"],"created_at":"2024-11-13T04:36:36.014Z","updated_at":"2026-04-19T03:01:53.729Z","avatar_url":"https://github.com/schibsted.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slack Calendar Topic\n\n[![Build Status](https://travis-ci.com/schibsted/slack-calendar-topic.svg?branch=master)](https://travis-ci.com/schibsted/slack-calendar-topic)\n[![Maintainability](https://img.shields.io/codeclimate/maintainability/schibsted/slack-calendar-topic)](https://codeclimate.com/github/schibsted/slack-calendar-topic)\n![License](https://img.shields.io/github/license/schibsted/slack-calendar-topic)\n\nA script that sets the topic of a Slack channel to the currently ongoing event\nin a Google calendar. Great for keeping track of who's on call, for example.\n\n![Image](./docs/calendar.png)\n\n## Getting started\n\n#### Create a service account\n\nCreate a Google Service Account, download the credentials in JSON format and\nexport it to `GOOGLE_CREDENTIALS`.\n\n#### Create a Slack bot\n\nCreate a Slack bot with scopes `channels:manage` and `channels:read`, and export\nits access token to `SLACK_ACCESS_TOKEN`.\n\n#### Share calendar(s) with your service account\n\nGo to **Settings and sharing** for the Google Calendar(s) you'd like to use, and\nshare them with the service account by entering the e-mail address of the\nservice account in **Share with specific people**.\n\n#### Mentions in calendar events\n\nIf you want to use mentions in the topic, you need to use Slack's special syntax for\nthat. Open Slack and go to the profile of the user you want to mention, click the `More`\nbutton and then `Copy member ID`. You can now mention that user with `\u003c@{MEMBER-ID}\u003e`\n\nFor example, if the desired member ID is `F4K3ID123`:\n\n```\nPerson on-call: \u003c@F4K3ID123\u003e\n```\n\nUnfortunately, this can make it hard to read your calendar at a glance. To get around that,\nput your topic in the event description instead of the title, and we'll use that when it's set.\n\n#### Connect calendars and channels\n\nCreate a mapping between calendars and channels like so, and export it to\n`CHANNEL_CALENDAR_MAP`:\n\n```\n[\n  {\n    \"calendarId\": \"c_413612vkasdr1126ckja82sa0v@group.calendar.google.com\",\n    \"channelId\": \"C018DQTCFNX\"\n  },\n  ...\n]\n```\n\n#### Run it\n\nThat's it! Run it with `npm run update` (or `./bin/update`) and watch your channels\nbe updated to the currently ongoing events in the corresponding calendars:\n\n```sh\n$ ./bin/update\n#backend-bugs: Set topic to 'Person on call: Tuesday talent 🤩'\n#infrastructure-issues: Topic already set\n#petty-problems: No ongoing event\n```\n\n## Deploying\n\n#### Anywhere you want\n\nYou can deploy this script anywhere that runs Node and has some mechanism for running it on\na schedule (like cron).\n\n#### AWS Lambda\n\nIt's a particularly good fit for a [Lambda scheduled with CloudWatch][aws]. Create your lambda,\nset the environment variables, and configure the handler as `lambda.handler`. Then, run\n`AWS_LAMBDA_NAME=slack-calendar-topic ./deploy.sh` to deploy it.\n\nIf you haven't already, remember to install and configure your `aws` command line interface first:\n\n- Log into your AWS Console and retrieve your IAM credentials.\n- Run `aws configure` and follow the steps.\n\n[aws]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschibsted%2Fslack-calendar-topic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschibsted%2Fslack-calendar-topic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschibsted%2Fslack-calendar-topic/lists"}