Create a new bot via BotFather in Telegram. For more information about creating a Telegram bot, see Create a bot in Telegram in Integrating Chat with Telegram.
Full integration of the bot with chat is not necessary, as the bot is only for receiving video IDs.
In order to upload a file to the TWIN system, you need to make an API request to add a file using any tool designed for sending API requests. For example, using Postman.
curl --location 'https://bot.twin-ai.com/api/v1/files'
--form 'private="false"' \
--form 'file[0]=@""'
The query will be automatically imported.

Go to the Bot Scripts section of personal account.
Open the desired script in the editor. If you don't have a script, create a new one.
Add a Result block at the location where you want the video file to be sent, and declare the following variables in it:
chat_id - {messengerUserId}.bot_token - Telegram bot token, which is displayed in BotFather after bot creation.file_id - file identifier in the TWIN system received earlier.Set the Statement block, and draw an arrow to it from the Result block.
Click Open editor in the block parameters.
Paste the expression in the window that appears:
$response = http.request("https://api.telegram.org/bot" :: $bot_token :: "/sendVideoNote","POST").
header("Content-Type", "multipart/form-data").
body({"chat_id":$chat_id}).
file($file_id, "video_note").
send()
$code = $response.statusCode
$body = $response.body
If the user has restricted receiving voice messages, the mugshot will not be sent as it is considered a voice message, unlike a regular video attached as a file.
{code} = 400 condition.When using this structure, if video transmission is restricted, the contents of an additional Information block will be sent.