# Record a video with timestamp and send it via telegram after finished

**URL:** <https://discourse.nodered.org/t/record-a-video-with-timestamp-and-send-it-via-telegram-after-finished/57451>\
**Category:** General\
**Tags:** telegram, home-assistant\
**Created:** [29 January 2022 11:05 UTC](https://discourse.nodered.org/t/record-a-video-with-timestamp-and-send-it-via-telegram-after-finished/57451 "2022-01-29T11:05:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![villah](https://avatars.discourse-cdn.com/v4/letter/v/7c8e57/32.png) [@villah](https://discourse.nodered.org/u/villah)\
**Post date:** [29 January 2022 11:05 UTC](https://discourse.nodered.org/t/record-a-video-with-timestamp-and-send-it-via-telegram-after-finished/57451/1 "2022-01-29T11:05:49Z")

</div>

Hi there,

I am trying to record a video with timestamp calling to Home Assistant service:

{"filename":"/config/www/cam1\_records/{{entity\_id.name}}\_{{now().strftime('%Y%m%d-%H%M%S')}}.mp4"}

That's ok, no problem, video is created and stored. The problem comes when I want to send that video to Telegram. I couldn't manage to find a way to send the video because I fail to find a method to send the name of the video file accordingly because the name change with time. I have to wait 35s to finish the video recording.

I tried to send data field to the telegram node (output) but it sent in the same format as I put in the record call service so I suposse that when the telegram node generate the name of the file, as time as changed, it is not going to find the file.

I tried with fixed name and it works perfect so I suposse I need to find a way to send the final file name to the telegram node to work.

I want to keep the timestamp for data storage purposes.

Any idea? Not very skilled with node red.

Thank you!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 January 2022 11:26 UTC](https://discourse.nodered.org/t/record-a-video-with-timestamp-and-send-it-via-telegram-after-finished/57451/2 "2022-01-29T11:26:44Z")

</div>

Create the filename first in the flow before you send it to the HA node. Then you can send that same name to the Telegram node.

---

<div class="post-metadata">

**Author:** ![villah](https://avatars.discourse-cdn.com/v4/letter/v/7c8e57/32.png) [@villah](https://discourse.nodered.org/u/villah)\
**Post date:** [29 January 2022 20:28 UTC](https://discourse.nodered.org/t/record-a-video-with-timestamp-and-send-it-via-telegram-after-finished/57451/3 "2022-01-29T20:28:14Z")

</div>

Ok Colin, done. Thank you for your advice!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [30 March 2022 20:29 UTC](https://discourse.nodered.org/t/record-a-video-with-timestamp-and-send-it-via-telegram-after-finished/57451/4 "2022-03-30T20:29:10Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
