Write to csv issues

I have the following in my config.yaml

notify:
  - name: write_to_r1_csv
    platform: file
    filename: r1_csv_file.csv

and an automation that looks like this:

alias: XXXXXXX Log R1 to CSV Every 1 Minute
description: ""
triggers:
  - minutes: /1
    trigger: time_pattern
actions:
  - data:
      message: >-
        {{ now().strftime('%Y-%m-%d') }}, {{ now().strftime('%H:%M:%S') }}, r1,
        {{ states('input_text.r1_room') }}, {{
        states('input_text.r1') }}, {{
        states('sensor.r1_climate_state')}}, {{
        states('sensor.r1t_set_temp')}}, {{ states('sensor.r1t_temp') }}
    action: notify.write_to_r1_csv
mode: single

But the csv file never gets created.

what am I doing wrong?

This has been deprecated a long time ago. Now you need to create the csv file using the UI