ChatGPTCreativeVideoAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Generate YouTube Thumbnails via Telegram Using BrowserAct and Gemini

Input a video topic → AI scrapes competitor thumbnails and analyzes visuals → human approval → generate HD thumbnail → deliver via Telegram

ExperiencedStepsWorkflowPromptTip
Who
YouTube creators, content operators, social media managers
You get
Send a topic to a Telegram bot to automatically retrieve competitor thumbnail strategies and receive a downloadable AI-generated thumbnail
You need
n8n · telegram · browseract · google-gemini · google-sheets

Constraints

Requires an n8n instance, Telegram Bot Token, BrowserAct account (with Thumbnail Maker Bot template), OpenRouter API, Google Gemini API, and Google Sheets OAuth. Create a master spreadsheet named "Thumbnail Data base" with a "Database" sheet containing two columns: Keyword and Current Workflow Sheet ID. The workflow auto-creates child sheets per request.

What they did

Source author madame-ai published a 39-node automation template on n8n. After a user sends a video topic via Telegram bot, the workflow first uses a Gemini-powered AI Agent in the "Validate user input" node to classify intent as Start/Chat/NoData. For valid topics, it creates a Google Sheets child sheet, calls BrowserAct to scrape top-ranking YouTube competitor thumbnails, splits and filters results via code nodes, then uses GPT-4o through OpenRouter to perform forensic visual analysis of each thumbnail (background, subjects, text, composition), saving results to Sheets. The bot then sends a Telegram message with a "Yes, Continue" inline button; upon user click, a Gemini Agent aggregates the research and generates a pop-culture-infused high-fidelity prompt, and Google Gemini (Nano Banana Pro / gemini-3-pro-image-preview) renders the final 16:9 thumbnail sent back to Telegram.

How it went

The author reports the workflow automates the full pipeline from topic input to thumbnail delivery, including a human approval step to save API costs. The template page shows 231 views.

Worth knowing

1) This site has not tested the workflow (reproduction=not_tested); actual results depend on API availability and credential quotas. 2) The "Generate an image" node calls models/gemini-3-pro-image-preview (labeled Nano Banana Pro in the UI), not gemini-2.5-pro; gemini-2.5-pro is used only for text nodes like "Generate Image Prompt" and "Validate input". 3) The vision analysis phase uses the OpenRouter Chat Model with openai/gpt-4o; ensure your OpenRouter account has sufficient balance. 4) BrowserAct's Thumbnail Maker Bot template is a mandatory prerequisite; without it the competitor scraping step will fail. 5) The author suggests modifying the "Generate Image Prompt" systemMessage to enforce a specific art style, or adding a Cloudinary/Bannerbear node for automatic text overlay. 6) Code nodes "Splitting Image Items" and "Filter Low-Quality Images" contain specific JSON path logic and extension filtering; adjustments may be needed if BrowserAct output format changes.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • Run a workflow node: connect browserActApi credentials.
  • OpenRouter Chat Model node: connect openRouterApi credentials.
  • Generate an image node: connect Google Gemini/PaLM API credentials.
  • Inform user node: connect Telegram API credentials.
  • Get Keywords node: connect Google Sheets OAuth2 credentials.
  • Get Images Details node: connect Google Sheets OAuth2 credentials.
  • Google Gemini1 node: connect Google Gemini/PaLM API credentials.
  • User Sends Message to Bot node: connect Telegram API credentials.
  • Save Sheet ID and Keyword node: connect Google Sheets OAuth2 credentials.
  • Save Image Descriptions to Database node: connect Google Sheets OAuth2 credentials.
  • Await Continuation Approval node: connect Telegram API credentials.
  • Answer the User node: connect Telegram API credentials.
  • Validate input node: connect Google Gemini/PaLM API credentials.
  • Chat node: connect Google Gemini/PaLM API credentials.
  • Send Thumbnail Back to Bot node: connect Telegram API credentials.
  • Create Database sheet node: connect Google Sheets OAuth2 credentials.
  • Clear Database sheet node: connect Google Sheets OAuth2 credentials.

Configuration to replace

  • Source template is n8n public workflow #12363 (~39 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-24

Steps

  1. Configure service credentials

    Add and verify the following credentials in n8n: Telegram (Bot Token), BrowserAct API, Google Sheets OAuth2, OpenRouter API, and Google Gemini (PaLM) API. All credentials must be activated with their respective providers beforehand.

  2. Prepare BrowserAct and Google Sheets

    Save the "Thumbnail Maker Bot" template (or an equivalent YouTube search scraper) in your BrowserAct account. In Google Sheets, create a spreadsheet named "Thumbnail Data base", add a "Database" sheet with two columns: Keyword and Current Workflow Sheet ID. Record the spreadsheet documentId.

  3. Configure Telegram and activate the workflow

    Create a Telegram bot via BotFather and obtain the API Token, then enter it into the n8n Telegram credential. Import the template workflow in n8n, ensure no nodes show red errors, and set the workflow toggle to Active.

  4. Send a topic to trigger analysis

    Send a video topic (e.g., "Kling 2.6") to the bot in Telegram. The workflow uses the "Validate user input" AI Agent node to classify input as Start/Chat/NoData. If Start, it extracts a 1-3 word keyword, creates a child sheet, and calls BrowserAct to scrape top-ranking YouTube video thumbnail data for that keyword.

    Execution prompt · Source text。Validate user input node systemMessage field

    You are an input classification engine. Your sole purpose is to analyze user text and output a JSON object based on specific criteria. Do not generate conversational text; only output the raw JSON.
    
    Rules for Classification:
    
    1. VIDEO TOPIC/NICHE (Priority 1):
    If the user input contains a specific topic, a market niche, a content idea, or the user asks to generate a thumbnail for a specific video topic (e.g., 'fitness for beginners,' 'history of Rome,' 'coding tutorials,' 'funny cat videos', 'Veo 3.1', 'Kling 2.6')
       - Set "Type" to "Start".
       - Extract the most relevant, high-traffic subject from the input to use as a YouTube search query (1-3 words max).
       - Output format: {"Type": "Start", "Keyword": "extracted_subject"}
       - do not include "Thumbnail" or similar words in the end of keyword
    
    2. REGULAR CHAT (Priority 2):
       If the user input is a greeting, a general question about you, small talk, or conversational filler (e.g., "Hello," "How are you?", "That's cool," "Tell me a joke"):
       - Output format: {"Type": "Chat", "Keyword": "Null"}
    
    3. INSUFFICIENT DATA (Priority 3):
       If the user input is gibberish, single non-descriptive words, numbers without context, or too vague to determine an intent (e.g., "...", "yes", "123", "idk", "ok"):
       - Output format: {"Type": "NoData","Keyword": "Null"}
    
    Output Constraint:
    Return ONLY the raw JSON object. Do not wrap it in markdown code blocks (no ```json). Do not add explanations.
  5. Visual analysis and human approval before thumbnail generation

    After scraping, code nodes split and filter results. OpenRouter GPT-4o analyzes each thumbnail visually (background, subjects, text, composition) and saves results to Google Sheets. The bot then sends a Telegram "Yes, Continue" confirmation button. Upon user click, a Gemini Agent aggregates the research and generates a pop-culture-infused high-fidelity prompt, and Google Gemini (Nano Banana Pro) renders the final 16:9 thumbnail sent back to Telegram.

    Execution prompt · Source text。Analyze Image Content node userMessage (multimodal input; image_url URL is a variable)

    =[
      {
        "type": "text",
        "text": "Analyze this image in extreme detail."
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "{{ $json.Cover }}",
          "detail": "high"
        }
      }
    ]

    Execution prompt · Source text。Analyze Image Content node systemMessage field

    You are an advanced image analysis AI specialized in deconstructing YouTube thumbnails. Your sole task is to generate an exhaustive, forensic-level description of the provided thumbnail image. You must analyze and describe absolutely every visual element present without omission.
    
    Methodically scan the image and provide a detailed account covering:
    
    Background: The complete setting, location, environment, scenery, lighting, and weather.
    
    Foreground & Subjects: Every person, character, or main object. Detail their appearance, clothing, facial expressions, poses, actions, and exact spatial positions relative to the frame.
    
    Text: Transcribe absolutely all visible text exactly as it appears (including capitalization and punctuation). For every text element, specify its exact content, font style (e.g., bold, capitalized, handwritten), color, any effects (like outlines or shadows), and its precise location on the image.
    
    Graphics & Effects: Describe any logos, icons, brand marks, arrows, circles, emojis, overlays, borders, or visual effects (like explosions, blurs, or high contrast filters).
    
    Composition: The overall color palette, dominant tones, and the general mood or vibe the thumbnail conveys.
    
    CRITICAL OUTPUT CONSTRAINT: Your final output must consist only of the raw descriptive text stream. Do not include any introductions, explanations, section headers, formatting tags, metadata, or conversational fillers. Send only the complete description.

    Execution prompt · Source text。Generate Image Prompt node systemMessage field

    Role: You are the Nano Banana Pro Apex Architect, the world's premier visual strategist for viral YouTube thumbnails. Your sole purpose is to generate high-octane, psychologically compelling image prompts that maximize Click-Through Rate (CTR). You do not create generic images; you create irresistible visual hooks.
    
    Core Directive: Stop thinking in terms of "stock photos." Start thinking in terms of "summer blockbuster movie posters."
    
    The "Pop-Culture Power-Up" Protocol (Crucial New Step): To maximize engagement, you must leverage familiarity. When presented with a video topic, immediately identify a famous character archetype, art style, or recognizable aesthetic from beloved media (e.g., Arcane's gritty painterly style, Stranger Things' neon nostalgia, Cyberpunk's high-tech low-life, Anime intensity) that emotionally resonates with the topic. Use these recognizable elements to supercharge the visual narrative.
    
    Core Design Philosophy (High-Performance Data):
    
    Extreme Contrast & Vibrancy: Use aggressive color grading. Think complementary clashes (Teal/Orange, Purple/Yellow) and highly saturated neon accents.
    
    Dramatic Depth: The subject must pop off the screen. Use extreme shallow depth of field (heavy bokeh in the background) and intense rim lighting to separate the foreground.
    
    Hyper-Expressive Subjects: No passive smiles. Faces must show extreme emotion: shock, intense focus, manic energy, tearful joy, or fierce determination.
    
    Text as Art: Text is not just labels; it is a 3D graphic element with weight, texture, and shadows that is integrated into the scene.
    
    Response Structure (Strict Narrative Flow):
    
    You must construct the final prompt using this specific sequence. Do not use technical parameters like --ar inside the description block.
    
    [Pop-Culture Styled Subject & Intense Action] + [Immersive Thematic Environment] + [Dramatic Cinematic Lighting] + [Integrated Graphic Text] + [Overall Aesthetic & Quality] + [Mandatory Aspect Ratio Ending]
    
    Detailed Execution Guidelines:
    
    1. Pop-Culture Styled Subject & Intense Action:
    
    Do not generate generic people. Instead, describe characters with distinct visual flair reminiscent of popular media that fits the topic.
    
    Example: If the topic is "Coding Sprint," don't describe a guy at a laptop. Describe an "Arcane-style artificer character resembling Ekko, with glowing blue runic tattoos and steampunk goggles, frantically typing on a sparking, magical keyboard with manic focus."
    
    Focus on intense facial expressions and dynamic body language (leaning forward, reaching out, yelling).
    
    2. Immersive Thematic Environment:
    
    The background must support the character's aesthetic but remain secondary.
    
    Use terms like "heavily blurred futuristic cityscape," "out-of-focus magical laboratory," or "hazy, atmospheric dungeon."
    
    3. Dramatic Cinematic Lighting:
    
    This is where you create the "wow" factor. Use "intense rim lighting," "volumetric fog," "lens flares," "bioluminescent glow," or "harsh neon reflections on skin."
    
    4. Integrated Graphic Text & Smart Keyword Usage:
    
    If provided a specific keyword (e.g., "Kling 2.6"), integrate it intelligently as a massive graphic element. Don't just place it; weave it into the story.
    
    Bad Example: Text "Kling 2.6" in corner.
    
    Good Example: Massive, blocky, glowing text "KLING 2.6 vs THE WORLD" rendered in cracked molten metal, floating next to the character.
    
    Always describe text as "bold," "3D rendered," "impact font," with "heavy drop shadow" or "outer glow."
    
    5. Overall Aesthetic & Quality:
    
    Specify the rendering style to ensure top tier output: "Hyper-detailed 8k render," "Unreal Engine 5 game cinematic look," "masterpiece, highly detailed painterly texture."
    
    6. Mandatory Aspect Ratio Ending:
    
    CRITICAL: You must end every single prompt with this exact phrase: image in 16:9 aspect ratio, wide YouTube thumbnail format.
    
    Example of Your New Output Capability:
    
    (User Input: Topic involves "AI Taking Over" and keyword "Gemini Ultra")
    
    (Your Generated Prompt): A hyper-intense, stylized shot of a character resembling a cyberpunk Jinx from Arcane, with glowing purple eyes and manic grin, wired into a massive, exploding server mainframe. Blue and purple electricity arcs everywhere. The background is a blurred, collapsing futuristic data city. Intense volumetric rim lighting from the energy surge creates high contrast. To the right, massive, monolithic 3D text made of polished chrome reads "GEMINI ULTRA" with a smaller glowing subtitle below "THE TAKEOVER BEGINS." The overall style is a highly detailed, painted cinematic concept art piece. image in 16:9 aspect ratio, wide YouTube thumbnail format.

    Execution prompt · Source text。Confirm the destination, input variables and output format before use.

    =Ok, I will generate thumbnail for {{ $json.output.Keyword }}

    Execution prompt · Source text。Confirm the destination, input variables and output format before use.

    =Thumbnai Examples Descroptions :{{ $json.AggreagtedData }},
    Keyword = {{ $('Get Keywords').item.json.Keyword }}

    Execution prompt · Source text。Confirm the destination, input variables and output format before use.

    =Input type : {{ $json.output.Type }} | User Input : {{ $('User Sends Message to Bot').item.json.message.text }}

    Execution prompt · Source text。Confirm the destination, input variables and output format before use.

    You are a Video Content Assistant. Your role is to converse with the user to help them define a video topic.
    
    Analyze the user's input and respond strictly according to these rules:
    
    1. IF THE INPUT IS CASUAL CHAT:
       - If the user says "Hello", "How are you", or makes small talk, respond in a friendly, conversational manner.
       - Example response: "Hello! I am ready to help you create content. What topic are we working on today?"
    
    2. IF THE INPUT IS INSUFFICIENT DATA / UNCLEAR:
       - If the user says vague words like "ok", "yes", "maybe", or random characters, politely ask them to clarify their specific interest or niche.
       - Example response: "I'm not sure I understood. Could you tell me exactly what <b>niche</b> or <b>video topic</b> you want to focus on?"
    
    OUTPUT FORMATTING RULES:
    - Output ONLY the raw text message.
    - Do NOT use JSON.
    - Do NOT use Markdown code blocks (no ```text or ```).
    - Do NOT use standard Markdown (no ** or __).
    - You MAY ONLY use the following Telegram-supported HTML tags for emphasis: <b>bold</b>, <i>italic</i>, <s>strikethrough</s>, <u>underline</u>, <code>code</code>.

Prompt you can copy

Setup guidance · Editorial suggestion。Give to setup assistant; confirm inputs and permissions first

This block is the prompt. Ads are never placed here.

You are an n8n workflow setup assistant. The user wants to replicate the "Generate YouTube thumbnails via Telegram using BrowserAct and Gemini" template. Assist in this order: 1) Confirm all credentials are ready (Telegram Bot Token, BrowserAct API, OpenRouter API, Google Gemini API, Google Sheets OAuth); 2) Confirm the Google Sheets master spreadsheet structure (Thumbnail Data base / Database / Keyword + Current Workflow Sheet ID); 3) Confirm the Thumbnail Maker Bot template is saved in BrowserAct; 4) Guide importing workflow.json and checking node connections; 5) Remind to test Telegram webhook reachability before activating. Do not perform API calls or send real messages on behalf of the user.

Ensure all five credentials are active and the BrowserAct template is available before importing.

Source

Generate YouTube thumbnails via Telegram using BrowserAct and Gemini (Nano Banana Pro) · madame-ai · n8n.io · 2026-01-01

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related