Skip to content

late-pay-notify automates overdue payment notifications by identifying late payments and sending email reminders to customers.

Notifications You must be signed in to change notification settings

esperanca-leonardo/late-pay-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📨 Late Pay Notify

Gmail LibreOffice Pandas Python

Late Pay Notify is a tool that automates the process of notifying customers about overdue payments by sending email reminders.

📑 Table of Contents

🚀 Key Features

  • Data Management: The script efficiently handles data from an Excel file to identify clients with overdue payments and prepares personalized email notifications.
  • Automated Communication: It automatically composes and sends email messages to notify clients of overdue payments, streamlining communication processes.
  • Workflow Automation: By automating the process of identifying overdue payments and sending notifications, the script saves time and ensures timely communication with clients.

📹 Demonstration Video

late-pay-notify-demonstration-video.mp4

💡 How It Works

  1. Data Loading: The script loads data from an Excel file named data.xlsx using the pandas library.
  2. Data Processing: It processes the loaded data, converting the Previsão Pagamento column to datetime format and filtering payments that are overdue.
  3. Email Composition: For each client with overdue payments, an email message is composed using their purchase details (ID, Name, Value, Due Date) and a predefined message template.
  4. Email Sending: The script sends the composed email to the respective clients using the SMTP protocol and a Gmail account configured with provided credentials.
  5. Email Notification: After sending each email, a confirmation message is printed to the console.

🔧 Tools and Technologies Used

  • Python: A versatile and widely-used programming language known for its simplicity and readability. It's used to develop the automation.
  • Pandas: Employed for efficient data manipulation, enabling the automation to handle product data from an Excel file within the Python environment.
  • Excel: Product data is stored in an Excel file format, widely-used and accessible for tabular data storage.
  • Smtplib: A module for sending emails via SMTP.
  • Email.message: A module for creating and manipulating email messages.
  • Os: A module for interacting with the operating system.
  • Datetime: A module for working with dates and times.
  • Dotenv: A library for loading environment variables from .env files.

📋 Prerequisites

Before running the application, make sure you have the following prerequisites installed:

  • Git: Widely-used distributed version control system.
  • Python: A powerful, general-purpose programming language.
  • Pip: Package manager for installing and managing Python libraries.

📝 Installation Instructions

1. Clone this project

git clone https://github.com/esperanca-leonardo/late-pay-notify.git

2. Navigate to the project directory

cd late-pay-notify

3. Create and activate a virtual environment

  • 3.1. First, install the virtualenv library

    pip install virtualenv
  • 3.2. Then, create a virtual environment named venv

    • Linux or macOS
      virtualenv venv
    • Windows
      python -m virtualenv venv
  • 3.3. Activate the virtual environment

    • Linux or macOS
      source venv/bin/activate
    • Windows
      .\venv\Scripts\activate.bat

4. Install dependencies

Make sure you have Python and pip installed on your system. Then, install the project dependencies using pip

pip install -r requirements.txt

5. Setting up Gmail authentication

This project uses Gmail for sending emails. You will need to generate an app password for your Gmail account. Follow the instructions here to generate an app password.

6. Create a .env file

Create a file named .env in the project directory and add the following variables

MAIL=your_email
PASSWORD=your_app_password

7. Run the project

Execute the project using the following command

python main.py

📌 Observations

As the project currently stands, it will not send emails to any real customers because all customer emails in the database are fake. Therefore, in order to test the application, it will send emails to the sender's email address.

About

late-pay-notify automates overdue payment notifications by identifying late payments and sending email reminders to customers.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published