Skip to content

This project uses the OpenAI API for email sentiment analysis and integrates the Calendly API for event management. It features Docker for containerization and PostgreSQL for database management, providing a good solution for automated sentiment analysis and event handling.

License

Notifications You must be signed in to change notification settings

prernarohra/Email-Sentiment-Analysis

Repository files navigation

Email-Sentiment-Analysis

Email Sentiment Analysis

📋 Overview

This project uses the OpenAI API for performing sentiment analysis on emails and integrates the Calendly API for efficient event management. It also uses Docker for containerization and PostgreSQL as the database, providing a robust and scalable solution for automating sentiment analysis and event scheduling.

✨ Features

  • Sentiment Analysis : Uses OpenAI API to analyze sentiment from email content.
  • Event Management: Integrates Calendly API for scheduling and managing events.
  • Containerized Deployment : Docker setup for easy deployment.
  • Database Management : Uses PostgreSQL to store and manage email and event data.

⚙️ Tools and libraries

  • Python
  • VS code
  • PostgresSQL
  • Docker
  • OpenAI API Key
  • FastAPI
  • Pydantic
  • Sqlalchemy
  • Email
  • Calendly

🔧 Installation

1. Clone this repository:

# Clone the repository
git clone https://github.com/prernarohra/Email-Sentiment-Analysis.git

# Navigate to the project directory
cd Email-Sentiment-Analysis

2. Create a .env file in the root directory to securely store your API keys and email credentials:

touch .env

3. In the .env file, replace YOUR_OPENAI_API_KEY and YOUR_CALENDLY_API_KEY with your respective API keys and configure your email credentiatls:

OPENAI_API_KEY=YOUR_OPENAI_API_KEY
CALENDLY_API_KEY=YOUR_CALENDLY_API_KEY
USERNAME=YOUR_EMAIL_USERNAME
PASSWORD=YOUR_EMAIL_PASSWORD

4. Start Docker and build the application container:

docker-compose up --build

🚀 Usage

  1. Set Up Environment Variables: Ensure the .env file has the correct API keys for OpenAI and Calendly and correct credentials.

  2. Run the Application : Once the Docker container is up, the app will start, and you can access it through http://localhost:8000 (or your specified port).

  3. Sentiment Analysis: The application will process emails and return sentiment analysis using the OpenAI API.

  4. Event Scheduling: Use the Calendly integration to manage events directly within the application.

  5. API Key Replacement:

  • OpenAI API Key: Replace YOUR_OPENAI_API_KEY in the .env file.
  • Calendly API Key: Replace YOUR_CALENDLY_API_KEY in the .env file.
  • Postgresql Database URL: Replace postgresql://username:password@localhost:5432/your-database with your username, password of the server and your database name.

Make sure to restart the Docker container after making any updates to the .env file to apply the new keys.

🙌 Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

🎀 License

This project is open-source and available under the MIT License.

About

This project uses the OpenAI API for email sentiment analysis and integrates the Calendly API for event management. It features Docker for containerization and PostgreSQL for database management, providing a good solution for automated sentiment analysis and event handling.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published