Smarter Sample Preparation for Environmental Challenges