This script automates outreach workflow
- Python 3.x
- Required packages: crewai, warnings, os, json, re
- API Keys:
- OpenAI API key
- Serper API key
The script uses a CONFIG dictionary with the following customizable settings:
-
University Settings:
- name: University name
- department: Department name
- student_url: URL to student directory
- email_domain: University email domain
-
Outreach Settings:
- num_students: Number of students to contact
- bcc_email: BCC email address
- sender_name: Your name
- sender_title: Your title
- message_template: Email template
- Install Dependencies:
pip install -r requirements.txt
pip install crewai warnings os json re
-
Set up API Keys:
- Ensure your API keys are properly configured in utils.py
- Required: OpenAI API key and Serper API key
-
Run the Script:
bash python main.py
The script will:
- Collect student information from the specified URL
- Validate email addresses and names
- Generate personalized outreach messages
- Create individual text files in the 'outreach/physics' directory for each contact
- File format: firstname_lastname.txt
- Contains: Email, BCC, and personalized message
- The script includes JSON parsing error handling
- Failed operations are logged to console
- Invalid entries are automatically filtered out
- The script uses AI agents for data collection and validation
- Ensures email addresses match the specified university domain
- Automatically creates the outreach directory if it doesn't exist
- Skips entries with invalid or missing email addresses
If you encounter errors:
- Check API key configuration
- Verify internet connection
- Ensure the student directory URL is accessible
- Check console output for specific error messages
Feel free to modify based on your need!