This project automates the intern onboarding process by:
✅ Monitoring a Google Sheet for new intern records
✅ Generating personalized welcome images
✅ Sending customized emails with embedded images
📦 Intern-Welcome-Automation/
├── 📜 main.py # Core script for monitoring and email automation
├── 📜 custom_credentials.py # Configuration file (User-defined variables)
├── 📂 intern_welcome_images/ # Stores generated welcome images
├── 🖼️ welcome_template.png # Default welcome image template
├── 📜 sheet_data.json # Cached Google Sheet data
├── 📜 requirements.txt # Dependencies
└── 📜 README.md # Documentation
🔹 To access Google Sheets, follow these steps:
- Go to Google Cloud Console.
- Create a new project.
- Enable Google Sheets API.
- Navigate to IAM & Admin > Service Accounts and create a new service account.
- Assign the Editor role.
- Generate and download the JSON key file.
- Save this file in your project folder and set its path in
custom_credentials.pyas:SERVICE_ACCOUNT_FILE = "path/to/your/credentials.json"
- Grant access: Share your Google Sheet with the service account email.
🔹 To send emails using Gmail:
- Enable 2-Step Verification for your Google account.
- Go to Google App Passwords.
- Generate a password and copy it.
- Set this password in
custom_credentials.py:SENDER_PASSWORD = "your-app-password"
Run the following command:
pip install -r requirements.txtSet the following mandatory variables before running the script:
- 📂
OUPUT_DIR– Directory for storing images - 🖼️
TEMPLATE_PATH– Path to the welcome image template - 🔑
SERVICE_ACCOUNT_FILE– Google service account credentials - 📊
SCOPES– API access scopes for Google Sheets - 📋
SPREADSHEET_ID– The Google Sheet ID containing intern data - 📌
RANGE_NAME– The range of data to monitor - 📧
SENDER_EMAIL– Your email address for sending emails - 🔑
SENDER_PASSWORD– Your app password for authentication - 📜
SUBJECT– Subject of the welcome email - ✉️
EMAIL_BODY– HTML template for the email content - 🔠
FONT_PATH– Font file for text rendering
Run the script to start monitoring the Google Sheet:
python main.py🚀 How it works:
- ✅ Fetches intern data from Google Sheets
- 🔄 Monitors for new additions every 30 seconds
- 🖼️ Generates a welcome image for new interns
- 📩 Sends an email with the generated image
| Function | Description |
|---|---|
📝 get_sheet_data() |
Fetches data from the Google Sheet and stores it as JSON. |
🖼️ generate_welcome_image() |
Creates a personalized welcome image with intern details. |
📧 send_welcome_email() |
Sends an email with the generated image. |
🔍 monitor_and_send_email() |
Continuously checks for new interns and triggers email sending. |
🔹 Email Not Sending?
- Ensure your Gmail App Password is set correctly.
- Check your SMTP settings and network connection.
🔹 Google Sheets Data Not Fetching?
- Ensure your service account email has access to the Google Sheet.
- Verify SPREADSHEET_ID and RANGE_NAME in
custom_credentials.py.
🔹 Image Generation Issues?
- Make sure
welcome_template.pngexists. - Verify
FONT_PATHis set correctly.
This project automates intern onboarding by integrating Google Sheets, Gmail, and Python scripting. It simplifies the process by ensuring each intern receives a personalized welcome email with an image. 🎉
🔹 Customizable: Modify the email template & welcome image to match your branding.
🔹 Scalable: Works for any number of interns without manual intervention.
💬 Have questions? Feel free to raise an issue or contribute!