Monday, July 19, 2010

Python helps non-profit Process Structured E-mail applications

One of my sideline gigs is that of founder and Executive Director of Computers for Communities (Canada). As a start up non-profit I often find myself playing many rolls. We have done a great job recruiting skilled and motivated volunteers that have helped out with so much.

Even though we continue to recruit more volunteers there are still the regular communications that need to occur. For me I currently receive 10-20 new volunteer inquiries a week. This is largely due to our membership with Volunteer Ottawa. They provide us a venue to market our volunteer opportunities to a large pool of volunteers.

The process is quite ingenious. We pay a modest membership fee and in turn we get access to a pool of volunteers. We get a chance to post our volunteer opportunities and volunteers find us through various search criteria.

If they find a position they are interested in they click APPLY and an e-mail is sent off into the web for the gnomes to carry around. They happen to ultimately land in one of my many e-mail boxes. Each e-mail needs a prompt response or else we might loose a volunteer before meeting them.

As the opportunities grew so did my e-mail pile. Since we posted opportunities in January we have received over 100 inquiries.

I started with individual responses to each inquiry. That is after all important right? Sure is. But at the cost of a couple minutes per e-mail. Then I track all the volunteer info in a spread sheet, which takes another couple of minutes. So lets say 5 minutes (easy) per email and 15 emails a week. that is 75 minutes a week replying to volunteer applications. Then there are the other tasks a director and president need to handle to keep an organization going.

My first streamlining was to compose generic responses. I would then go through a process of :
* Open e-mail
* copy name, paste to spreadsheet
* copy phone number, paste
* copy email
* open new e-mail,
* open canned response
* cut response,
* paste in e-mail
* copy e-mail address
* paste in TO field
* send e-mail

I got pretty good at this, and having dual monitors help. But still 2-3 minutes per email and 30-60 minutes a week.

There had to be a better way. The short answer is there was....

I drew on my experience of automating repeatable tasks using a scripting language called Python. I had never worked with e-mails in Python before so this was a great learning opportunity. Python is free, it is open source, it works on PC, MAC and of course Linux Operating Systems. Python works great on a desktop computer ( I use Ubuntu Desktop) or can be run from a server.

I won't go into too much technical details (maybe another blog topic) but with Python I was able to automate the whole process. Now the e-mail application gets sent in, my e-mail client (Evolution) send it to the right folder and passes the contents of the email to the python script.

The volunteer applications sent from the Volunteer Ottawa system are e-mails that are all formatted the same. The same headers, paragraphs and line starts with headings such as "name:", "e-mail", etc...

The python script does the following:
* Parses the e-mail for all the needed information
* Dumps the gathered info into a CSV (Comma Separated Value) file, easily brought into any spreadsheet or database
* Evaluates what position the volunteer applied for
* Gets the pre-canned text based on position they applied for
* Generates an email addressing the volunteer by their name and referencing their position
* Sends out the email through google mail and to the volunteer.
* marks the incoming e-mail as read.
* sends me a confirmation that the e-mail was sent.

A few hours of putting together the pieces and voila I reclaim an hour an week for other things.

If you are interested in learning more about the script then leave a comment. If there is interest then I will follow up with another blog detailing some of the ins and outs of this script.

If other groups using Volunteer Ottawa want to collaborate I am willing to open the code and work with other volunteers to generalize the code so other groups can free up their time.

Check out Python the next time you have a task to automate.

Cheers

5 comments:

  1. Hi Dave,

    I've sent along a copy of your blogpost to my friends at WikiEducator.org, to see if they can make use of your script. WE are 15,000 educators in 120 countries, and we're a volunteer community - could come in quite handy.

    Cheers,

    - WikiRandy

    ReplyDelete
  2. This is terrific - Thanks for posting this to your Blog Dave! We will be sure to pass this along to our members and share it on our SM sites.
    From
    -the Volunteer Ottawa Team!

    ReplyDelete
  3. Hi Dave,

    Great post! I'm trying to script up something very very similar and was thinking about using Python. I've written in a variety of languages but not yet Python and I was curious if you'd be willing to share your code (or some snippets of it). It'd go a long way towards help me developing mine, though I of course understand if you'd rather keep it to yourself. Let me know at dankessler AT gmail DOT com

    Thanks!
    -Dan

    ReplyDelete