Convert Telegram Attachement to Binary Data in Order to Upload to Google Drive

Describe the problem/error/question

I am not able to upload a simple video from Telegram into Google Drive


There is no convert to .mp4 or .jpg!! whyyy

What is the error message (if any)?

File is not Binary Data!

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)


## Share the output returned by the last node
<!-- If you need help with data transformations, please also share your expected output. -->

## Information on your n8n setup
- **n8n version:** [email protected]
- **Database (default: SQLite):**  SQLite
- **n8n EXECUTIONS_PROCESS setting (default: own, main):** own,main
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** n8n cloud
- **Operating system:** macOS

plz help

Hi @Daniel_Invincible

What kind of file attachment are you getting from Telegram? You should be able to upload it to Google Drive without any file conversion.

What error message are you getting from the GDrive?

Hi @ria

I am getting a video file as a telegram attachment. It comes in a form of a message json and the video is within the video object.

Here is an example message input:

[
{
"update_id": 
REDACTED,
"message": 
{
"message_id": 
6,
"from": 
{
"id": 
REDACTED,
"is_bot": 
false,
"first_name": 
"REDACTED",
"username": 
"REDACTED",
"language_code": 
"en",
"is_premium": 
true
},
"chat": 
{
"id": 
-REDACTED,
"title": 
"REDACTED",
"type": 
"supergroup"
},
"date": 
1714354844,
"forward_origin": 
{
"type": 
"user",
"sender_user": 
{
"id": 
REDACTED,
"is_bot": 
false,
"first_name": 
"REDACTED",
"username": 
"REDACTED",
"language_code": 
"en",
"is_premium": 
true
},
"date": 
1714354794
},
"forward_from": 
{
"id": 
REDACTED,
"is_bot": 
false,
"first_name": 
"REDACTED",
"username": 
"REDACTED",
"language_code": 
"en",
"is_premium": 
true
},
"forward_date": 
1714354794,
"video": 
{
"duration": 
8,
"width": 
464,
"height": 
848,
"file_name": 
"2024-04-28 21.07.10.mp4",
"mime_type": 
"video/mp4",
"thumbnail": 
{
"file_id": 
"AAMCAQADHQJ4nIoyAAMGZi76nSmcd7WlkzoTnkc8IgXPSKYAAhcEAALAIXlFCu4dWA0VjPIBAAdtAAM0BA",
"file_unique_id": 
"AQADFwQAAsAheUVy",
"file_size": 
11478,
"width": 
175,
"height": 
320
},
"thumb": 
{
"file_id": 
"AAMCAQADHQJ4nIoyAAMGZi76nSmcd7WlkzoTnkc8IgXPSKYAAhcEAALAIXlFCu4dWA0VjPIBAAdtAAM0BA",
"file_unique_id": 
"AQADFwQAAsAheUVy",
"file_size": 
11478,
"width": 
175,
"height": 
320
},
"file_id": 
"BAACAgEAAx0CeJyKMgADBmYu-p0pnHe1pZM6E55HPCIFz0imAAIXBAACwCF5RQruHVgNFYzyNAQ",
"file_unique_id": 
"AgADFwQAAsAheUU",
"file_size": 
1640891
}
}
}
]

I am not able to upload this video object to the Google Drive without converting it to Binary Data first and there is no node to convert to binary data. I think I may need to code some sort of algorithm that will do this.

Thanks

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