I would try this app first. Rule machine will work, but this might be a much easier option.
If that doesn't suit you, then Rule Machine can be revisited.