Posted 4/5/2012 by techphoria414
One of the coolest features added by Sitecore way back in 6.2 was Workflow RSS Feeds. My WeBlog cohort Alistair Deneys discussed them a bit back in 2009. I even recall at Dreamcore 2010, Michael Seifert feigning the approval of a press release onstage, using a workflow RSS feed on his smartphone. You can even setup RSS feeds in Outlook, which is a great option for PC users who deal with that wonderful piece of bloatware on a daily basis.
Workflow RSS feed links in the Workbox. You can see we're very busy moderating comments here at Techphoria414.
The content and functionality of the RSS feed is great -- it would take a lot of effort to reproduce it in a custom email action. The example below doesn't even show the field-by-field change comparison that's included when an item is updated.
Despite the possibilities with RSS, I feel this functionality is really underused. RSS after all these years is still a bit foreign to many non-technical users, and the reality is that in a business setting people aren't paying attention to RSS feeds in the same way they do their email. We even encountered a customer recently who couldn't add RSS feeds to their Outlook client because of a network group policy! So we set out to find a simple solution that allowed us to securely turn the content of the RSS feed into emails for our users. We found it in a cool little tool called rss2email.
Rss2email does just what it says -- translates an RSS feed into email. It's a small python script which you configure from the command line, then run on a scheduled basis. It's pretty simple to set it up for Sitecore Workflow RSS:
- Download and Install Python 2.x
- Download and unzip rss2email to a location of your choice, e.g. c:\rss2email.
- Copy config.py.example, rename it to config.py and edit as needed. The settings I changed were:
- DEFAULT_FROM (something like email@example.com)
- FORCE_FROM=1 (to ensure the default from address is always used)
- SMTP_SERVER (obviously)
- Edit r2e.bat to include an absolute path to python.exe. You could also place python.exe in your PATH.
- Execute "r2e new <youremail>". This just gives r2e a default email address and creates its data file.
- Get the URL of the workflow feed you wish to have emailed. Note: The feeds you pull from the Workbox are specific to each Sitecore user! Be sure to get your user to provide their own feed URL.
- Execute "r2e add <feedurl> <useremail>". You likely will need to put the feed URL in quotes.
- If you have a lot of existing items in the feed and want to avoid sending the user a slew of emails on first run, execute "r2e run --no-send"
- Create a windows scheduled task that executes "r2e run" on a regular basis.
Your user will now receive an email for each new item entering the Workflow or Workflow State. I'm not giving the rss2email setup process justice, so be sure to reference the rss2email Getting Started guide. Once you have it running, the results are pretty great. In fact, the above screenshot was actually taken from my Google Mail account, not an RSS reader.
We have a small number of users who need these emails, so maintenance of r2e settings is not a huge issue. On a larger install, it would be interesting to find a way to adapt rss2email, or automate the addition/removal of users and their feeds. But quick and easy is what we were looking for, and this certainly delivered. Big thanks to Lindsey Smith for this tool.