I needed the logic over and over again, so I abstracted it into a separate reusable service.
Currently available Actions: