Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seb-sti1/notion2calendar
Synchronise tasks from a Notion database to/from a Google Calendar calendar
https://github.com/seb-sti1/notion2calendar
google-calendar notion
Last synced: 5 days ago
JSON representation
Synchronise tasks from a Notion database to/from a Google Calendar calendar
- Host: GitHub
- URL: https://github.com/seb-sti1/notion2calendar
- Owner: Seb-sti1
- License: gpl-3.0
- Archived: true
- Created: 2024-05-19T18:48:25.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-09-15T10:00:13.000Z (4 months ago)
- Last Synced: 2024-09-29T19:02:32.987Z (4 months ago)
- Topics: google-calendar, notion
- Language: TypeScript
- Homepage:
- Size: 90.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**The current version doesn't fully work (see [#1](https://github.com/Seb-sti1/Notion2Calendar/issues/1)), but Notion
has released an IOS/Android Notion Calendar app (which was the main reason for this repo).
Hence, I decided to archive this repo.**
# Notion to GCalendar
This repository is meant to synchronise a collection from Notion
to Google Calendar.## Installation
### Get a Google Calendar API key, Notion token and database id
See [Node.js quickstart](https://developers.google.com/calendar/api/quickstart/nodejs)
to create an app and save the credentials in the `credentials.json`.Go on [My integrations](https://www.notion.so/my-integrations), create an integration and
save the secret in `.env` (see `example.env` as an example). You also need to add the database id
in the `.env` (see [the image in the first paragraphs](https://developers.notion.com/reference/retrieve-a-database) to
find how to get the database id).
Don't forget to go on the page of the database and
[Connect to](https://stackoverflow.com/questions/72396153/how-do-i-retrieve-a-site-using-notions-api)
the integration you just created.### Development
To install packages:
```bash
npm i
```To run use:
```bash
npm run dev
```### Production
You will need to have the `credentials.json` for the Google API page, the `.env` (see the `example.env`)
and the `token.json` (at first empty). To authorise the application to access Google API you will need
to run `npm run login`, there will be a link to click on to authorise the
connection to Google Calendar (it will fill the `token.json` to remember the connected account).```sh
npm run build # build source
docker compose up # build (if necessary) the docker image and start it
docker compose down # if you want to remove the container
```If you want to run that regularly you can use `crontab -e` to add a `cron` task:
```cronexp
*/15 * * * * cd /the-folder-to-credentials && docker compose up > /dev/null 2>&1 && docker compose down > /dev/null 2>&1
```## TODOS
- Check [watch](https://developers.google.com/calendar/api/v3/reference/events/watch?hl=fr)
## Useful link
- https://github.com/googleapis/google-auth-library-nodejs
- https://developers.google.com/calendar/api/quickstart/nodejs?hl=en
- https://github.com/makenotion/notion-sdk-js