Can't get imap to trigger when receiving email from specific sender

Please follow Questions Guideline #11… configuration and other code should be shared as properly formatted text. This makes it easier to help you because we can copy/paste and edit without having to rewrite the whole thing.

For your template sensor:

  1. Make sure the configuration for the trigger-based template sensor is set up under the top-level key template.
  2. action needs to be at the same depth as trigger, and should not have a hyphen.
  3. The entity_id in service call action needs to be nested under either a data or target key.
  4. Make sure the rest of the sensor configuration is included. What you have posted so far is missing significant parts.