No luck with data_template

I’ve been having a heck of a time trying to get all of this down. While trying to run:

notify:
  - name: savefile
    platform: file
    filename: file.txt

- alias: Device Discovered
  trigger:
    platform: event
    event_type: device_tracker_new_device
  action:
    - service: notify.savefile
      data_template:
        message: '{{ trigger.event }}'

I get the error:

2017-05-18 21:47:27 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/template.py”, line 99, in async_render
return self._compiled.render(kwargs).strip()
File “/usr/local/lib/python3.5/dist-packages/jinja2/environment.py”, line 1008, in render
return self.environment.handle_exception(exc_info, True)
File “/usr/local/lib/python3.5/dist-packages/jinja2/environment.py”, line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File “/usr/local/lib/python3.5/dist-packages/jinja2/_compat.py”, line 37, in reraise
raise value.with_traceback(tb)
File “”, line 1, in top-level template code
File “/usr/local/lib/python3.5/dist-packages/jinja2/sandbox.py”, line 385, in getattr
value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: ‘trigger’ is undefined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/automation/init.py”, line 326, in async_trigger
yield from self._async_action(self.entity_id, variables)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/automation/init.py”, line 407, in action
yield from script_obj.async_run(variables)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/script.py”, line 151, in async_run
yield from self._async_call_service(action, variables)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/script.py”, line 181, in _async_call_service
self.hass, action, True, variables, validate_config=False)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/service.py”, line 74, in async_call_from_config
config[CONF_SERVICE_DATA_TEMPLATE]))
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/service.py”, line 70, in _data_template_creator
for key, item in value.items()}
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/service.py”, line 70, in
for key, item in value.items()}
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/service.py”, line 72, in _data_template_creator
return value.async_render(variables)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/template.py”, line 101, in async_render
raise TemplateError(err)
homeassistant.exceptions.TemplateError: UndefinedError: ‘trigger’ is undefined

Does anyone see anything weird about what I’m trying to do?

It looks similar to my version here:

Did you make it an automation?