"Send email" / "Save value" according to the rule

Hello,

  1. how can I send an email when a condition/rule is met?
  2. how can I savesensor value when a condition/rule is met?

Example: if the temperature is below 5 degrees Celsius, then send an email stating in the subject “Sensor Name” and in the message body “date, time and sensor value with units”.

Thanks.