Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Birthday and Reminder Automation System

This project automates birthday greetings and reminders using Notion, Slack, and email notifications. It features scheduled tasks to send birthday wishes and reminders to specified contacts.

Table of Contents

  1. Features
  2. Technologies Used
  3. Installation
  4. Configuration
  5. Usage
  6. Project Structure
  7. License

Features

  • Birthday Automation: Automatically sends birthday greetings via email and Slack.
  • Reminder Notifications: Sends reminders for upcoming birthdays.
  • Integration:
    • Notion API for retrieving birthday data.
    • Gmail SMTP for sending email notifications.
    • Slack API for team notifications.
  • Customizable Templates: Use styled HTML emails for greetings.
  • Scheduler: Daily execution of tasks at a defined time.

Technologies Used

  • Languages: Python
  • APIs:
    • Notion API
    • Slack API
    • SMTP for email
  • Libraries:
    • smtplib
    • email.mime
    • requests
    • schedule
    • pytz

Installation

  1. Clone the repository:

    git clone https://github.com/DmitriDerevjanko/birthdayscript.git
    cd birthdayscript
  2. Create a .env file in the root directory and configure the environment variables (see Configuration).


Configuration

Environment Variables

Create a .env file in the root directory with the following variables:

NOTION_API_TOKEN=your_notion_api_token
NOTION_DATABASE_ID=your_notion_database_id

SMTP_SERVER=smtp.zone.eu
SMTP_PORT=587
EMAIL_ADDRESS=email@example.com
EMAIL_PASSWORD=your_email_password

SLACK_TOKEN=your_slack_token
SLACK_CHANNEL=#üldine

REMINDER_EMAILS=email1@example.com,email2@example.com

config.py

The application loads sensitive information from the .env file using the os module. Ensure the .env file is correctly set up before running the application.


Usage

  1. Start the scheduler:

    python main.py
  2. The scheduler runs tasks daily at 08:00 AM Tallinn time. Adjust the schedule in scheduler.py if needed.

  3. Test email notifications:

    python test_email_sender.py
  4. Test Slack notifications:

    python test_slack_sender.py

Project Structure

birthday-reminder-system/
├── config.py         # Environment variable loader
├── email_sender.py   # Email notification logic
├── notion.py         # Fetches birthday data from Notion
├── scheduler.py      # Scheduler for running tasks
├── slack_sender.py   # Slack notification logic
├── test_email_sender.py # Email sender testing script
├── test_slack_sender.py # Slack sender testing script
├── .env              # Environment variables (not included in version control)
└── README.md         # Project documentation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages