A personalized newsletter automation system was developed to connect Llama College's subscriber information, project data, content library, and email delivery process. The workflow automated the full process, from collecting platform data to generating personalized newsletter content and delivering each campaign.
Concurrent Data Aggregation
The pipeline retrieved data for users, projects, tweets, articles, videos, podcasts, resources, and newsletters through API integrations. Independent retrieval operations ran concurrently using Python's ThreadPoolExecutor. This avoided waiting for each source to finish sequentially. Cursor-based pagination was also used to handle larger datasets.
Subscriber Interest Matching
The workflow identified the projects each subscriber followed. These relationships determined which content was relevant to each user. Tweets could be filtered by recency. Articles, videos, podcasts, and other resources were grouped around the appropriate projects before newsletter generation.
Dynamic Email Personalization
Jinja2 was used to create reusable HTML newsletters with conditional content blocks. Instead of maintaining separate hardcoded campaigns, template logic determined which projects and content types appeared for each subscriber. A single template system could therefore support multiple personalized email variations.
Automated Campaign Delivery
Generated emails were connected to Brevo for bulk distribution. This created a direct path from processed subscriber data to campaign delivery. The team no longer needed to manually rebuild recipient lists and email variations for every newsletter cycle.
Scheduled & Production-Ready Execution
The implementation included error handling, logging, execution tracking, email validation, and other production controls. A Bash script supported cron-based scheduling, allowing the workflow to run on a recurring schedule.
Key Deliverables
- Built automated aggregation across eight subscriber, project, and content data streams.
- Developed interest-based content matching with recency and project filtering.
- Created reusable personalized HTML newsletters using Jinja2 conditional rendering.
- Integrated Brevo for automated campaign distribution to 3,000+ subscribers.
- Added concurrent processing, pagination, logging, validation, and scheduling for reliable recurring execution.