this got it working for me as well (was having no luck using the original blog post!)

would be great to see the docs updated with an example that explains the logic to help folks get started