https://github.com/dkunin/cronos
Reminder of calendar events
https://github.com/dkunin/cronos
Last synced: over 1 year ago
JSON representation
Reminder of calendar events
- Host: GitHub
- URL: https://github.com/dkunin/cronos
- Owner: DKunin
- Created: 2025-02-24T14:50:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-11T05:33:44.000Z (over 1 year ago)
- Last Synced: 2025-03-11T06:27:05.715Z (over 1 year ago)
- Language: JavaScript
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### **📅 Google Calendar Telegram Reminder**
This Node.js script fetches upcoming events from **Google Calendar** using a **service account** and sends daily reminders via **Telegram**.
[](https://github.com/DKunin/cronos/actions/workflows/deploy.yml)
---
## **📌 Features**
✅ Fetches **events for today + 3 days ahead**
✅ Sends a **Telegram notification** with event details
✅ Includes **event time, description, location, and a direct link**
✅ Runs **daily at 12:00 PM** using a cron job
---
## **🚀 Setup & Installation**
### **1. Clone the repository**
```sh
git clone https://github.com/your-repo/calendar-reminder.git
cd calendar-reminder
```
### **2. Install dependencies**
```sh
npm install
```
### **3. Set up Google Calendar API**
- Enable **Google Calendar API** in [Google Cloud Console](https://console.cloud.google.com/)
- Create a **Service Account** and download the JSON key (`cronus.json`)
- **Share your Google Calendar** with the service account email
### **4. Create a `.env` file**
```ini
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_chat_id
CALENDAR_ID=your_calendar_id (or use "primary")
```
---
## **📜 Usage**
Run the script manually:
```sh
node index.js
```
It will also **run automatically every day at 12:00 PM**.
---
## **Customization**
- Modify `runJob()` in **`index.js`** to adjust the message format.
- Change the cron schedule in:
```js
cron.schedule("0 12 * * *", runJob);
```
(Uses **cron syntax**, adjust timing as needed.)