Thank you for the prompt response. I am very impressed.
For this to work the way I envision both newly received and newly created items would need to have a category set. I think I can meld your example into the hello world example and get it to work for newly received items.
I am unsure of the best way to proceed with newly created items. I only want to set the category if the user does not set it themself. Is there an event that I can use that will detect new items of any type after they have been added? Would it make more sense to set the category before it is sent or posted?