Help dynamic datetime filename in automation

I have button-card for take picture and send my phone with notify + telegram.

          - type: custom:button-card
            name: Çek
            icon: mdi:camera-plus
            tap_action:
              action: call-service
              service: script.cek_gonder
              service_data:
                  baslik: 'Kamera Görüntüsü'
                  mesaj: 'Çekilen resim'
                  filename: "'/media/camera/tablet_{{ now().strftime('%d-%m-%Y_%H:%M:%S') }}.jpg'"

My script getting values but filename value sometimes throw error. Telegram cant send notification becuz filename have “seconds” variable.

Example generated file name ;
tablet_20-06-2022_12:24:30.jpg

Notify send phone : tablet_20-06-2022_12:24:30.jpg
then telegram trying to send notification: tablet_20-06-2022_12:24:31.jpg // +1 sec

My script;

cek_gonder:
  alias: Çek Gönder
  sequence:
  - service: camera.snapshot
    data_template:
      filename: "{{ filename }}"
      entity_id: camera.tablet
  - service: notify.telegrambot
    data_template:
      title: '{{ baslik }}'
      message: '{{ mesaj }}'
      data:
        photo:
          file: "{{ filename }}"
          caption: '{{ mesaj }}'
  mode: single
  icon: mdi:webcam

How can i set filename string value not date time ?

Here is a script I use for that exact thing.

It uses the “hass-variables” custom integration but you could probably do the same thing with an input_text entity.

as_kitchen_snapshot:
    alias: 'Kitchen Snapshot'
    sequence:
      - service: variable.set_variable
        data: 
          variable: kitchen_snap_timestamp
          value: '{{ now().strftime("%Y%m%d_%H%M%S") }}'
      - service: camera.snapshot
        data:
          entity_id: camera.kitchen
          filename: /config/www/snapshots/kitchen_{{ states('variable.kitchen_snap_timestamp') }}.jpg
      - delay: '00:00:05'
      - service: notify.pushbullet
        data: 
          data:
            file: "/config/www/snapshots/kitchen_{{ states('variable.kitchen_snap_timestamp') }}.jpg"
          message: "A snapshot has been taken in the kitchen"