Output Sensor Values to Formatted Text File

I want to export some sensor data to a text file to use in OBS Studio. I thought the notify.file would be the answer, but it exports a header and adds a new line every time. Am I missing something with notify integration or will I need to try and write a script and use shell_command?

An example template for what I want;

Indoor temp: {{ state_attr('climate.heating', 'current_temperature') }}°c
Outdoor temp: {{ state_attr('climate.heating', 'current_temperature') }}°c
Blind open: {{ state_attr('cover.study_blind', 'current_position') }}%
Study light: {{ state_attr('light.study_light', 'brightness') }}%
Now playing: {{ state_attr('media_player.spotify_reclusivemonkey', 'media_title') }} by {{ state_attr('media_player.spotify_reclusivemonkey', 'media_artist') }}