Utiliser Apify, OpenAI et Google Sheets pour analyser les vidéos YouTube populaires

Intermédiaire

Ceci est unMarket Research, Multimodal AIworkflow d'automatisation du domainecontenant 12 nœuds.Utilise principalement des nœuds comme If, Merge, FormTrigger, HttpRequest, GoogleSheets. Utiliser Apify, OpenAI et Google Sheets pour analyser les vidéos YouTube tendance

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "9f2d25c77f55013c8efee3de456573aadd7369e6f0aaea70d0311a32c92bead1"
  },
  "nodes": [
    {
      "id": "d0605ee4-1304-4fe7-b0da-55d46bca2428",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -1040,
        -112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a179d690-a6da-41ef-9ca4-7346864f7233",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.viewCount }}",
              "rightValue": 1000
            },
            {
              "id": "b66e2013-6fc7-414d-bf7b-5c6c7e23bcae",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.viewCount }}",
              "rightValue": "={{ $json.numberOfSubscribers }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a8006ffd-f3cd-48e9-b62c-89ae9cd4b556",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -720,
        0
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "joinMode": "keepNonMatches",
        "outputDataFrom": "input2",
        "fieldsToMatchString": "id"
      },
      "typeVersion": 3.1
    },
    {
      "id": "3980893b-c2fb-45e4-911e-2e0a10f5aeb0",
      "name": "Étape 1 Résultats",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -480,
        64
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $json.id }}",
            "url": "={{ $('If').item.json.url }}",
            "input": "={{ $('If').item.json.input }}",
            "likes": "={{ $('If').item.json.likes }}",
            "title": "={{ $('If').item.json.title }}",
            "duration": "={{ $('If').item.json.duration }}",
            "fromYTUrl": "={{ $('If').item.json.fromYTUrl }}",
            "viewCount": "={{ $('If').item.json.viewCount }}",
            "channelUrl": "={{ $('If').item.json.channelUrl }}",
            "channelName": "={{ $('If').item.json.channelName }}",
            "thumbnailUrl": "={{ $('If').item.json.thumbnailUrl }}",
            "numberOfSubscribers": "={{ $('If').item.json.numberOfSubscribers }}"
          },
          "schema": [
            {
              "id": "input",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "input",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "fromYTUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "fromYTUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnailUrl",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "thumbnailUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "channelName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "channelName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "channelUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "channelUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "duration",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "duration",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "likes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "likes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "numberOfSubscribers",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "numberOfSubscribers",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "viewCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "viewCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1531469275,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk/edit#gid=1531469275",
          "cachedResultName": "Step 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk/edit?usp=drivesdk",
          "cachedResultName": "YouTube Videos"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "681b01b1-4bd5-4782-969c-286ab571db14",
      "name": "Trouver les entrées en double",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1024,
        112
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.id }}",
              "lookupColumn": "id"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1531469275,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk/edit#gid=1531469275",
          "cachedResultName": "Step 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk/edit?usp=drivesdk",
          "cachedResultName": "YouTube Videos"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.5,
      "alwaysOutputData": false
    },
    {
      "id": "ab8658bf-c5f1-402b-99c6-0d1b6d30f63e",
      "name": "YouTube Générateur de titres",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1152,
        304
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Video Title: {{ $('Step 1 Results').item.json.title }}\nThumbnail Description: {{ $('Analyze Thumbnail').item.json.choices[0].message.content }}\nVideo Transcript: {{ $('HTTP Request').item.json.captions }}"
            },
            {
              "role": "system",
              "content": "=# Overview  \nYou are an AI agent responsible for generating an optimized YouTube video title and corresponding thumbnail text based on an original title, visual thumbnail analysis, and video transcript. Your goal is to retain the original message while improving clarity, engagement, and visual storytelling.\n\n## Context  \n- You will receive:\n  - The original video title  \n  - A natural language description of the thumbnail image  \n  - The full video transcript  \n- Your output should be a single JSON object that includes:\n  - A revised, SEO-optimized video title  \n  - Concise thumbnail text (3–5 words) that complements the revised title and aligns with the thumbnail’s visual tone.\n\n## Instructions  \n1. Read and analyze the original video title for its main topic and keywords.  \n2. Use the thumbnail description and video transcript to better understand the visual and content themes.  \n3. Generate a new title that:\n   - Maintains the original intent and main keywords  \n   - Improves structure, clarity, or emotional appeal  \n   - Stays under 70 characters  \n4. Create 3–5 words of thumbnail text that:\n   - Adds insight, urgency, or intrigue to support the title  \n   - Aligns with the visual style of the thumbnail  \n   - Feels natural when paired with the title  \n\n5. Output a single JSON object with both the revised title and thumbnail text in the following format:  \n   ```json\n   {\n     \"newTitle\": \"Improved YouTube video title\",\n     \"thumbnailText\": \"3–5 word thumbnail text\"\n   }\n   ```\n\n## Tools  \n- Original Title: `{{ $('Step 1 Results').item.json.title }}`  \n- Thumbnail Description: `{{ $('Analyze Thumbnail').item.json.choices[0].message.content }}`  \n- Video Transcript: `{{ $('HTTP Request').item.json.captions }}`  \n\n## Examples  \n**Input:**  \n- Title: `\"He Built an AI Business With Just $100\"`  \n- Thumbnail Description: `\"A thumbnail showing a confident man pointing at a laptop, with large text reading 'From $100 to CEO'. The background features glowing tech icons on a dark gradient backdrop.\"`  \n- Transcript: *Describes how the subject bootstrapped a business using AI tools and minimal funding.*\n\n**Output:**  \n```json\n{\n  \"newTitle\": \"How He Launched an AI Startup with $100\",\n  \"thumbnailText\": \"AI Startup for $100\"\n}\n```\n\n**Input:**  \n- Title: `\"Top 10 ChatGPT Hacks You Didn't Know\"`  \n- Thumbnail Description: `\"A sleek modern thumbnail with neon text that says 'ChatGPT Tricks', showing a split screen of a person thinking and a glowing terminal interface.\"`  \n- Transcript: *Lists lesser-known prompts and features to boost productivity.*\n\n**Output:**  \n```json\n{\n  \"newTitle\": \"10 ChatGPT Hacks to Boost Productivity\",\n  \"thumbnailText\": \"Hidden GPT Features\"\n}\n```\n\n## SOP (Standard Operating Procedure)  \n1. Parse the input values: original title, thumbnail description, and transcript.  \n2. Identify key themes and keywords from the title.  \n3. Use visual and transcript context to improve the relevance and appeal of the new title.  \n4. Draft 1–2 thumbnail text options based on visual cues and the revised title.  \n5. Select the most compelling option.  \n6. Return the output as a clean JSON object with both fields.\n\n## Final Notes  \n- Do not include brand names or identifiable individuals unless they are generic and essential.  \n- Avoid vague adjectives and hype-driven phrasing.  \n- Keep the output concise, natural, and clear — ready for immediate use in automation or upload.\n---"
            }
          ]
        },
        "simplify": false,
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "8c200f72-d742-4117-9291-57c52ba3b278",
      "name": "Analyser la miniature",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1584,
        304
      ],
      "parameters": {
        "text": "=# Overview  \nYou are an AI agent responsible for analyzing a YouTube thumbnail via a provided URL and generating a single, well-written **natural language description** that captures the visual style, layout, and tone of the thumbnail. This description will be used as part of an image generation prompt to recreate a similarly styled thumbnail.\n\n## Context  \n- The agent uses OpenAI’s image understanding capabilities to visually analyze YouTube thumbnails.  \n- The goal is to create a **descriptive text output** that reflects the design, mood, and layout of the thumbnail — not to copy the content directly.  \n- The output should be a standalone sentence or paragraph in natural language, ready to be embedded in a larger prompt.\n\n## Instructions  \n1. Retrieve and analyze the thumbnail image from the given YouTube URL.  \n2. Identify and describe the following elements:\n   - Overall layout and composition  \n   - Character or subject placement (if applicable)  \n   - Background type and visual treatment  \n   - Font and text style, including content if legible  \n   - Dominant color palette and mood  \n3. Compose a fluent, single-string natural language description of the thumbnail.  \n4. The output should read like part of a prompt, e.g., \"An energetic YouTube thumbnail showing...\"  \n5. Do not include any structured formatting (like JSON, lists, or metadata).  \n\n## Tools  \n- OpenAI Image Understanding Node  \n\n## Examples  \n- **Input:**  \n  `https://i.ytimg.com/vi/HpkZU34fqUM/maxresdefault.jpg`  \n- **Output:**  \n  A high-energy YouTube thumbnail featuring a surprised man on the right side, with a bold red radial gradient background. Large comic-style yellow text appears on the left, creating a dramatic and urgent visual tone.\n\n- **Input:**  \n  `https://i.ytimg.com/vi/abc123xyz/default.jpg`  \n- **Output:**  \n  A clean, professional thumbnail showing a laptop with a blurred tech-themed background. Soft blue and gray tones dominate the scene, with sleek sans-serif text centered above the device.\n\n## SOP (Standard Operating Procedure)  \n1. Validate the provided YouTube thumbnail URL.  \n2. Retrieve the image and perform visual analysis using image capabilities.  \n3. Extract and synthesize details about layout, colors, subjects, and visual emphasis.  \n4. Write a **natural language description** that feels prompt-ready, descriptive, and cohesive.  \n5. Return only the final descriptive sentence or paragraph — no metadata, formatting, or JSON.\n\n## Final Notes  \n- Do not refer to brand names, creators, or exact text unless it's generic and descriptive.  \n- Focus on tone, layout, and composition to support style transfer, not replication.  \n- The description should serve as a high-quality visual summary usable in generative models.\n---",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {
          "detail": "high"
        },
        "resource": "image",
        "simplify": false,
        "imageUrls": "={{ $('Step 1 Results').item.json.thumbnailUrl }}",
        "operation": "analyze"
      },
      "typeVersion": 1.8
    },
    {
      "id": "7b7ecf58-980e-416c-b20c-698d9dd2cb3d",
      "name": "Mettre à jour les lignes",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -448,
        304
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $('Step 1 Results').item.json.id }}",
            "newTitle": "={{ $('YouTube Title Generator').item.json.choices[0].message.content.newTitle }}",
            "newOutline": "={{ $json.choices[0].message.content }}",
            "thumbnailText": "={{ $('YouTube Title Generator').item.json.choices[0].message.content.thumbnailText }}",
            "videoTranscript": "={{ $('HTTP Request').item.json.captions }}",
            "thumbnailDescription": "={{ $('Analyze Thumbnail').item.json.choices[0].message.content }}"
          },
          "schema": [
            {
              "id": "input",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "input",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "fromYTUrl",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "fromYTUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnailUrl",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "thumbnailUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "channelName",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "channelName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "channelUrl",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "channelUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "duration",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "duration",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "likes",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "likes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "numberOfSubscribers",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "numberOfSubscribers",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "viewCount",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "viewCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "videoTranscript",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "videoTranscript",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnailDescription",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "thumbnailDescription",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnailText",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "thumbnailText",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "newTitle",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "newTitle",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "newOutline",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "newOutline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1531469275,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk/edit#gid=1531469275",
          "cachedResultName": "Step 1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XXb4bHq2Dmdj9a0suVa9TzyC2RiSw_npTRHbQUKpeSk/edit?usp=drivesdk",
          "cachedResultName": "YouTube Videos"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "7a835dcc-5b53-4a53-b95a-540c59d0a0de",
      "name": "YouTube Scraping vidéo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1424,
        80
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/h7sDV53CddomktSi5/run-sync-get-dataset-items",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "jsonBody": "={\n  \"dateFilter\": \"month\",\n  \"downloadSubtitles\": false,\n  \"hasCC\": false,\n  \"hasLocation\": false,\n  \"hasSubtitles\": false,\n  \"is360\": false,\n  \"is3D\": false,\n  \"is4K\": false,\n  \"isBought\": false,\n  \"isHD\": false,\n  \"isHDR\": false,\n  \"isLive\": false,\n  \"isVR180\": false,\n  \"lengthFilter\": \"between420\",\n  \"maxResultStreams\": 0,\n  \"maxResults\": 100,\n  \"maxResultsShorts\": 0,\n  \"preferAutoGeneratedSubtitles\": false,\n  \"saveSubsToKVS\": false,\n  \"scrapeLastNDays\": 60,\n  \"searchQueries\": [\n    \"{{ $json['Keyword or Topic'] }}\"\n  ],\n  \"sortVideosBy\": \"NEWEST\",\n  \"sortingOrder\": \"date\",\n  \"videoType\": \"video\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer <token>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8ee684c9-d495-4bf2-9e1a-59c0f07ecadd",
      "name": "HTTP Requête",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1376,
        304
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/1s7eXiaukVuOr4Ueg/run-sync-get-dataset-items",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "jsonBody": "={\n  \"channelHandleBoolean\": true,\n  \"channelIDBoolean\": false,\n  \"channelNameBoolean\": true,\n  \"commentsBoolean\": false,\n  \"datePublishedBoolean\": false,\n  \"dateTextBoolean\": false,\n  \"descriptionBoolean\": false,\n  \"keywordsBoolean\": true,\n  \"likesBoolean\": false,\n  \"maxRetries\": 8,\n  \"outputFormat\": \"singleStringText\",\n  \"proxyOptions\": {\n    \"useApifyProxy\": true,\n    \"apifyProxyGroups\": []\n  },\n  \"relativeDateTextBoolean\": false,\n  \"subscriberCountBoolean\": false,\n  \"thumbnailBoolean\": false,\n  \"uploadDateBoolean\": false,\n  \"urls\": [\n    \"{{ $('Step 1 Results').item.json.url }}\"\n  ],\n  \"viewCountBoolean\": false\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer <token>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "531bdc95-5403-4abf-9c90-50569fba7f05",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2672,
        -144
      ],
      "parameters": {
        "width": 984,
        "height": 748,
        "content": "### ⚙️ Trending YouTube Videos Research Workflow\n\n### 🧑‍💻 Author: [LeeWei]\n\n---\nAutomates scraping trending videos based on a keyword, filters high-potential ones, analyzes thumbnails and transcripts with AI, generates optimized titles and outlines, and updates a Google Sheet for content ideas.\n\n### 🚀 Steps to Connect:\n\n1. **Apify API Token**\n    - Sign up for a free account at [Apify](https://apify.com/) and generate your API token.\n    - Paste the token into the two **HTTP Request** nodes (replace `<token>` in the Authorization header).\n    - 💡 This enables scraping YouTube video data and transcripts—setup takes about 5 minutes.\n\n2. **OpenAI API Key**\n    - Go to [OpenAI](https://platform.openai.com/) and generate your API key.\n    - Add it to the credentials for the **YouTube Title Generator**, **Analyze Thumbnail**, and **Outline Generator** nodes.\n    - 💡 Use models like GPT-4o-mini for thumbnail analysis and title/outline generation.\n\n3. **Google Sheets Credentials**\n    - Set up OAuth2 credentials in n8n for Google Sheets with access to your Drive.\n    - Update the `documentId` in the **Step 1 Results**, **Find Duplicate Entries**, and **Update Rows** nodes to your own Google Sheet ID (clone the provided sheet if needed).\n    - 💡 This stores filtered video data, AI-generated titles, and outlines—expect 10-15 minutes for auth setup.\n\n4. **(Optional) Customize Form Trigger**\n    - If deploying publicly, no changes needed—the form prompts for \"Keyword or Topic\" to start the search.\n    - Test with a sample keyword like \"AI automation\" to see results in your sheet.\n\n---\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b6553d58-da4d-4aba-8660-1b777018feb7",
      "name": "À la soumission du formulaire",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1648,
        80
      ],
      "webhookId": "29de0389-1bc3-46b2-8125-f2cfc5bd0d29",
      "parameters": {
        "options": {},
        "formTitle": "YouTube Topic Research",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Keyword or Topic",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Enter a keyword or topic below, and I'll find trending videos related to that topic. "
      },
      "typeVersion": 2.2
    },
    {
      "id": "05e6cf15-0652-4765-b4d7-90a80ed797b9",
      "name": "Générateur de plan",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -784,
        304
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "GPT-4.1"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=# Overview  \nYou are an AI agent responsible for analyzing high-performing YouTube video transcripts and generating improved, original video outlines with a unique perspective.  \n\n## Context  \n- The agent receives the transcript of a successful YouTube video from another creator.  \n- The goal is not to copy, but to use the structure and content as a benchmark to craft a new outline that offers a distinct angle or interpretation of the topic.  \n- The resulting outline should maintain the engaging qualities of the original while providing fresh value to the target audience.  \n\n## Instructions  \n1. Analyze the input transcript to understand the topic, flow, structure, and elements that likely contributed to its performance.  \n2. Identify opportunities to reinterpret, reframe, or expand on the topic in a unique way.  \n3. Develop a new outline that:\n   - Retains the core appeal of the original video.  \n   - Presents a different perspective, argument, or theme.  \n   - Enhances clarity, relatability, and retention where possible.  \n4. Structure the new outline into standard YouTube sections (Hook, Introduction, Main Points, Call to Action, etc.).  \n5. Ensure the tone and content are original and distinct while still appealing to a similar audience.  \n\n## Tools  \n- None (analysis and outline generation only)  \n\n## Examples  \n- Input:  \n {{ $('HTTP Request').item.json.captions }}\n\n- Output:  \n  - Hook: Challenge a commonly held belief related to the topic.  \n  - Introduction: Present your own experience or angle on the issue.  \n  - Section 1: Explore the topic using a new metaphor or real-world example.  \n  - Section 2: Address a subtopic the original did not cover.  \n  - Section 3: Offer actionable advice or a unique conclusion.  \n  - Call to Action: Encourage viewers to comment with their own experiences or thoughts.  \n\n## SOP (Standard Operating Procedure)  \n1. Review the transcript to understand key takeaways, pacing, and style.  \n2. Extract the main topic and how the original creator approached it.  \n3. Brainstorm unique takes, new angles, or opposing views that can form the basis of a fresh outline.  \n4. Draft an outline that follows a proven structure but deviates meaningfully in substance or perspective.  \n5. Return the new outline in a clean, sectioned bullet-point format ready for video scripting.  \n\n## Final Notes  \n- The goal is to differentiate while building on what worked.  \n- Avoid mirroring phrases or points from the original—reframe and rephrase.  \n- The final outline should feel original, relevant, and optimized for YouTube engagement.  \n---"
            },
            {
              "content": "=Video Transcript: {{ $('HTTP Request').item.json.captions }}"
            }
          ]
        },
        "simplify": false
      },
      "typeVersion": 1.8
    }
  ],
  "pinData": {},
  "connections": {
    "d0605ee4-1304-4fe7-b0da-55d46bca2428": {
      "main": [
        [
          {
            "node": "681b01b1-4bd5-4782-969c-286ab571db14",
            "type": "main",
            "index": 0
          },
          {
            "node": "a8006ffd-f3cd-48e9-b62c-89ae9cd4b556",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "a8006ffd-f3cd-48e9-b62c-89ae9cd4b556": {
      "main": [
        [
          {
            "node": "3980893b-c2fb-45e4-911e-2e0a10f5aeb0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8ee684c9-d495-4bf2-9e1a-59c0f07ecadd": {
      "main": [
        [
          {
            "node": "ab8658bf-c5f1-402b-99c6-0d1b6d30f63e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3980893b-c2fb-45e4-911e-2e0a10f5aeb0": {
      "main": [
        [
          {
            "node": "8c200f72-d742-4117-9291-57c52ba3b278",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8c200f72-d742-4117-9291-57c52ba3b278": {
      "main": [
        [
          {
            "node": "8ee684c9-d495-4bf2-9e1a-59c0f07ecadd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "05e6cf15-0652-4765-b4d7-90a80ed797b9": {
      "main": [
        [
          {
            "node": "7b7ecf58-980e-416c-b20c-698d9dd2cb3d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b6553d58-da4d-4aba-8660-1b777018feb7": {
      "main": [
        [
          {
            "node": "7a835dcc-5b53-4a53-b95a-540c59d0a0de",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7a835dcc-5b53-4a53-b95a-540c59d0a0de": {
      "main": [
        [
          {
            "node": "d0605ee4-1304-4fe7-b0da-55d46bca2428",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "681b01b1-4bd5-4782-969c-286ab571db14": {
      "main": [
        [
          {
            "node": "a8006ffd-f3cd-48e9-b62c-89ae9cd4b556",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ab8658bf-c5f1-402b-99c6-0d1b6d30f63e": {
      "main": [
        [
          {
            "node": "05e6cf15-0652-4765-b4d7-90a80ed797b9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Étude de marché, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Workflows recommandés

Génération de podcasts viraux avec bébés célébrités en utilisant AI, Hedra et ElevenLabs
Générer des podcasts viraux avec des bébés célébrités avec AI, Hedra et ElevenLabs
Code
Wait
Merge
+
Code
Wait
Merge
35 NœudsLeeWei
Création de contenu
Automatisation de courts métrages sans visage avec OpenAI, RunwayML et ElevenLabs
Automatisation de courts métrages sans visage : du script aux réseaux sociaux avec OpenAI, RunwayML et ElevenLabs
Set
Code
Wait
+
Set
Code
Wait
56 NœudsLeeWei
Création de contenu
Utiliser GPT-5 nano et Google Sheets pour scraper des sites web et répondre à des questions
Gratter des sites web et répondre aux questions avec GPT-5 nano et Google Sheets
If
Set
Xml
+
If
Set
Xml
44 NœudsOriol Seguí
Étude de marché
Extraction de sélections de produits à partir de n'importe quel site Web avec Dumpling AI et GPT-4o
Extraire des produits populaires de n'importe quel site web avec Dumpling AI et GPT-4o
Code
Gmail
Split Out
+
Code
Gmail
Split Out
9 NœudsYang
Étude de marché
Création et téléchargement de vidéos AI vers Instagram, TikTok et YouTube
Création de vidéos pilotée par l'IA depuis Google Drive, téléchargement sur Instagram, TikTok et YouTube
If
Set
Code
+
If
Set
Code
53 NœudsDevCode Journey
Création de contenu
Génération de prospects basée sur l'IA (Apollo, recherche LinkedIn et email de personnalisation en 4 étapes)
Génération de prospects basée sur l'IA : Utilisation d'Apollo, de la recherche LinkedIn et d'un email de personnalisation en 4 étapes
If
Set
Code
+
If
Set
Code
30 NœudsGain FLow AI
Génération de leads
Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds12
Catégorie2
Types de nœuds7
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34