Hi,
I’m woking on an agent on n8n to analyze one hour long youtube videos with Gemini 2.0 models.
It seems the long videos return 500 error and doesn’t give me an output.
Any ideas or advice you can give?
Thank you!
I am using a prompt structure like this:
return {
contents: [
{
role: “user”,
parts: [
{
fileData: {
mimeType: “video/*”,
fileUri: $input.first().json.videoUrl
}},
{text: `
Think like a successful strategic planner working at an advertising agency. Analyze this video:
Please answer the following two questions:
What is the strategic main message of this video?
Which Reasons to Believe (RTBs) support this main message?
Write each answer clearly and concisely in 1–2 sentences. Do not include any introductory text or additional content. Provide your answers under the following two headings, and make sure these headings are bold:
Strategic Message:
RTB:
Do not leave any line breaks between them.`
}]}],
generationConfig: {
responseMimeType: “text/plain”
}};
HTTP Request URL (POST):
https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=KEY