Notion-To-Calendar is a tool designed to synchronize Notion pages with Google calendar. It automates the process of transferring your scheduled tasks from a Notion taskboard/list to Google calendar using Notion integrations and the Google Calendar API.
- Node.js installed on your system.
- A Notion account and API key.
- Google Cloud setup (go to: Google Cloud Setup Instructions)
To get started with Notion-To-Calendar, follow these steps:
git clone https://github.com/Branchenprimus/Notion-To-Calendar.git
-
Navigate to the cloned directory:
cd Notion-To-Calendar
-
Install the dependencies:
npm install
-
Create a
.env
file in the root of the project and add your Notion API key:NOTION_API_KEY=your_notion_api_key_here NOTION_DB_ID=your_notion_db_id_here
-
To start the application, type:
npm run start
compiles the TypeScript code into JavaScript and runs the index.js file.npm run test
cleans temporary files and the Google Calendar token, compiles TypeScript code to JavaScript, and then runs the index.js.
- Generate an integration token from your Notion account.
- Share the Notion page or database with your integration.
- Use the Notion API key (integration token) in the
.env
file as mentioned in the setup.
Complete this quickstart to set up your environment or refer to: Google Cloud Console & Google Calendar API.
The UnifiedEventData
interface is central to the Notion-To-Calendar application, encapsulating the data structure for calendar events. This unified model is used for synchronizing event information between Notion and other calendar services. Each field in the interface is described below:
- id (string): A unique identifier, automatically generated by Notion.
- taskName (string): The name or title of the event. This is a brief description of the event or task.
- status (string): The current status of the event (e.g., "Not started", "In Progress", "Completed"). It helps in tracking the progress of tasks.
- start (Date, optional): Specifies the starting date and time of the event. This field is optional; if not provided, the event's start time is considered unspecified.
- end (Date, optional): Represents the ending date and time of the event. Similar to start, this field is optional and may be omitted if the event's end time is not defined.
- priority (string): The priority level of the event (e.g., "High", "Medium", "Low", "No Priority"). This is used to categorize events based on their importance.
- content (string, optional): Contains additional details or content related to the event. This could include extended descriptions, notes, or other relevant information. This field is optional and can be used to store any supplementary data associated with the event.
An example of a UnifiedEventData
object is as follows:
{
"id": "8e9e2d3a-e5a5-4554-898a-e4b51b2ba284",
"taskName": "Test Event",
"status": "Not started",
"start": "2024-01-27T00:00:00.000Z",
"end": "2024-01-27T00:00:00.000Z",
"priority": "No Priority",
"content": "Additional details here"
}
If you encounter any issues, open an issue on the GitHub repository.
Contributions to Notion-To-Calendar are welcome!
This project is licensed under the [Your License Name Here] - see the LICENSE file for details.