I want to have an automation that send me an email but with a file attached.
It’s working well with images, but with a file it’s not working, I have only the message, but no file attached.
This works
- id: send_mqt_file
alias: Send MQT Humidity History
trigger:
- entity_id: binary_sensor.router_alive
from: ‘off’
platform: state
to: ‘on’
condition: []
action:
data:
data:
images:
- /config/1.png
- /config/2.png
message: Last Sensors info
title: Last Sensors info
service: notify.notifier_send_humidity_history
This is not working (email sent, but no file attached
- id: send_mqt_file
alias: Send MQT Humidity History
trigger:
- entity_id: binary_sensor.router_alive
from: 'off'
platform: state
to: 'on'
condition: []
action:
data:
data:
file: "/config/mqtt_data"
message: Last Sensors info
title: Last Sensors info
service: notify.notifier_send_humidity_history
I use an almost identical routine myself here flawlessly. I can only suggest you check the file names again carefully. (also: I don’t use and quotes in the file: xxx on mine)