Home

Daily Email Solution

My favorite book on leadership is How to Win Friends and Influence People by Dale Carnegie. Each chapter is a piece of advice that the author goes into great detail on. The chapters have stories or tidbits on the effectiveness of that advice. The application in real life works really well!

This book has a lot of information and you’re unlikely to remember every single chapter and its lessons. Books like this are great to go back to and reference from time to time. The only thing is I’m not always at my desk to reference it and sometimes I get out of the habit. That’s where Python comes in.

I wrote a Python script that sends me an email once a day with my notes from a random chapter of How to Win Friends and Influence People. I wrote out all my notes in an Excel workbook, with each chapter having a dedicated row. The script goes through this Excel workbook and adds the row to a list if the row hasn't been used before. Then the script picks a random number from the list and sends that row’s chapter notes to a distribution list. Finally, it enters that day’s date to a column in the spreadsheet so that it won't be selected the next time it runs. If all the chapters have been used before, the script deletes the dates from each row so that the chapters can all be used again. I use Task Scheduler to activate a batch file that runs the script every morning. Now I get a daily email with my notes from a random chapter of the book and try to use them throughout the day.

This is a link to a OneDrive folder titled, Daily Email Solution Files, that has the related files.

If want to be added to the distribution list, just let me know, I'm at Nicholas.A.Sagan@gmail.com.