This
project automates the process of sending personalized emails to research participants using Gmail and an Excel file as both data source and database. I originally developed it to invite participants to surveys or interviews, as we depended on the CRM team for email invitations (which used Mailchimp or other third-party platforms). By implementing this solution, the
that I led gained full control over scheduling, tracking sent messages, and logging responses—resulting in significant time savings and independence from paid messaging services. The script reads recipient details, personalizes email content, and ensures no duplicate sends.
Once messages are sent, the tool automatically updates Excel and subsequently transfers the data to
, expanding the research database with a consolidated record of participant interactions. By providing comprehensive statistics on when recipients were contacted and if/how they responded, the team can measure the success of recruitment efforts and refine future outreach strategies.
✅ Reads recipient email, name, and other details from an Excel file
✅ Sends customized emails based on recipient data
✅ Updates "Customer Data" sheet by marking emails as "Sent"
✅ Logs all sent emails in "Sent Emails Data", preserving formatting
✅ Skips empty rows and doesn't resend emails
✅ Supports batch sending (max 4 emails per run for testing)
1️⃣ Clone the Repository
git clone https://github.com/ninryt/automated-email-sender
.git
cd automated-email-sender
2️⃣ Create a Virtual Environment (Optional but Recommended)
python3 -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows
3️⃣ Required Packages
pip install openpyxl
Create an App Password for security: click here
EMAIL=your_email@gmail.com
PASSWORD=your_app_password
- Open and review the Excel file (which has two sheets: "Customer Data" and "Sent Emails Data").
- Go to the "Customer Data" sheet.
- Fill in the columns: Email, Last Name, First Name, Gender.
- The script will automatically update the "Status" column to "Sent" after sending emails, don't fill in the column "Sent".
- Don't fill in the sheet "Sent Emails Data", the sheet will automatically update once your emails will be sent.
Pull requests are welcome. For major changes, please open an issue first to discuss your ideas.
This project is licensed under the MIT License. See the LICENSE file for more details.