Sending email from notify action group

What’s the right way to send email from a notify action group in 2026.8.3 ?

I’d previously been successfully using something like this in conjunction with the SMTP integration:

- name: all
  platform: group
  services:
    - action: mobile_app_user1
    - action: mobile_app_user2
    - action: email

After receiving the deprecation notice about the notify.email action, I’ve been trying to find the right way to update this to use notify.send_message.

Based on the example at https://www.home-assistant.io/integrations/group/#notify-action-groups, I would’ve guessed that something like this would work:

- name: all
  platform: group
  services:
    - action: mobile_app_user1
    - action: mobile_app_user2
    - action: send_message
      data:
        target: email_user_example_org

(notify.email_user_example_org is the entity that’s created by the SMTP integration when I enter [email protected] as a recipient.)

That triggers a stack trace that appears to be complaining that data can’t have any properties (which seems in line with the docs, which state that data is an optional string despite the example treating it as an object with a target property):

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 2926, in async_call
    processed_data: dict[str, Any] = handler.schema(service_data)
                                     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/site-packages/voluptuous/schema_builder.py", line 205, in __call__
    return self._compiled([], data)
           ~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/local/lib/python3.14/site-packages/voluptuous/validators.py", line 256, in _run
    return self._exec(self._compiled, value, path)
           ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/site-packages/voluptuous/validators.py", line 386, in _exec
    raise e if self.msg is None else AllInvalid(self.msg, path=path)
  File "/usr/local/lib/python3.14/site-packages/voluptuous/validators.py", line 384, in _exec
    v = func(path, v)
  File "/usr/local/lib/python3.14/site-packages/voluptuous/schema_builder.py", line 779, in validate_callable
    return schema(data)
  File "/usr/local/lib/python3.14/site-packages/voluptuous/schema_builder.py", line 205, in __call__
    return self._compiled([], data)
           ~~~~~~~~~~~~~~^^^^^^^^^^
  File "/usr/local/lib/python3.14/site-packages/voluptuous/schema_builder.py", line 549, in validate_dict
    return base_validate(path, data.items(), out)
  File "/usr/local/lib/python3.14/site-packages/voluptuous/schema_builder.py", line 382, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['target']

If I just list action: email_user_example_org directly, I get a different error (expected since this entity isn’t an action, I think):

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 2894, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Action notify.email_user_example_org not found

I’ve tried various different permutations of this but haven’t found anything that works so far.

Hi,

Welcome to the forum!

The new way is to use the SMTP send message service. The screenshot below is from the development tool.

The Notify groups only supports legacy notifier services, it does not support the notify.send_message action. AFAIK, there isn’t currently a direct method to do what you want to do.

There is an indirect method using a legacy Notify group as the target, then using a automation to capture the events of notifications to that group and post them using the newer actions.

Thanks for the replies!

smtp.send_message doesn’t appear to be usable in a notify action group:

Invalid config for 'group' from integration 'notify' at notify.yaml, line 8: invalid slug smtp.send_message (try smtp_send_message) for dictionary value 'services->0->action', got 'smtp.send_message'

I see; I figured that there might be some way to rig this up. I’ll give that a try.

(And just to check, is there something else that I should be using instead of a notify action group if I want to send notifications to a few mobile apps and an email address? My goal is to have a single notification target that I can reference across multiple automations, so that I don’t need to make a bunch of tedious changes if I add or remove an app later.)

For basic SMTP and Mobile App notifications, the other option would be to create a Group Helper containing the notify entities from both integrations. Then update your automations to use notify.send_message (targeting the new notify entity created by the group helper) instead of notify.all. That’s one of the long-term goals of the ongoing updates to notification integrations… to make grouping notification targets easier and to make it easier to have dynamic targets using relatively basic templating.

Unfortunately, notify.send_message only supports basic notifications with message and, optionally, title. So, handling grouped notifications when the notifications use extended data and are from multiple integrations is still kind of a pain and will require a different design for the automation.

Thanks! I’m only using messages and titles right now, so this seems like a workable approach for me.

In case it helps anyone else running into this:

  • I added https://www.home-assistant.io/integrations/group/ (which I think I already had installed).
  • I went to /config/helpers in my HA instance.
  • I clicked Create helper, Group, and Notify group.
  • I assigned the name Everyone and added members (the two mobile apps and email address were the only ones available).
  • I started updating all of my existing automations to send to the new group.

For the final step, I think it’s a bit faster to edit the YAML directly. For each automation’s action, I’m replacing this:

action: notify.all
metadata: {}

with this:

action: notify.send_message
metadata: {}
target:
  entity_id: notify.everyone