Détecteur d'anomalies YTB

Avancé

Ceci est uncontenant 16 nœuds.Utilise principalement des nœuds comme If, Set, Code, Wait, Airtable. Découvrir des tendances YouTube/videos anormales cachées dans votre niche (Apify + Airtable)

Prérequis
  • Clé API Airtable
  • Peut nécessiter les informations d'identification d'authentification de l'API cible

Catégorie

-
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
{
  "id": "",
  "meta": {
    "instanceId": "",
    "templateCredsSetupCompleted": true
  },
  "name": "YTB Outlier Finder",
  "tags": [],
  "nodes": [
    {
      "id": "Attente-0",
      "name": "Attente",
      "type": "n8n-nodes-base.wait",
      "position": [
        0,
        -460
      ],
      "webhookId": "",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "Condition-1",
      "name": "Condition",
      "type": "n8n-nodes-base.if",
      "position": [
        -160,
        -640
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "SUCCEEDED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "V-rifier-si-termin--2",
      "name": "Vérifier si terminé",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -440,
        -640
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/streamers~youtube-scraper/runs/last?token=[YOUR_API_TOKEN]",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "Obtenir-donn-es-vid-os-3",
      "name": "Obtenir données vidéos",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        -660
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/streamers~youtube-scraper/runs/last/dataset/items?token=[YOUR_API_TOKEN]",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "Cr-er-jeu-de-donn-es-vid-os-4",
      "name": "Créer jeu de données vidéos",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -700,
        -640
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/streamers~youtube-scraper/runs?token=[YOUR_API_TOKEN]",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"dateFilter\": \"week\",\n    \"downloadSubtitles\": true,\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\": 3,\n    \"maxResultsShorts\": 0,\n    \"preferAutoGeneratedSubtitles\": false,\n    \"saveSubsToKVS\": false,\n    \"searchQueries\": [\n        \"{{ $json.keyword1 }}\",\n        \"{{ $json.keyword2 }}\",\n        \"{{ $json.keyword3 }}\"\n    ],\n    \"sortingOrder\": \"relevance\",\n    \"subtitlesLanguage\": \"en\"\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "Boucle-sur-l-ments-5",
      "name": "Boucle sur éléments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        400,
        -660
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "Mistral-Cloud-Chat-Model-6",
      "name": "Mistral Cloud Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        980,
        -300
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "mistralCloudApi": {
          "id": "",
          "name": "Mistral Cloud account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "Aucune-op-ration-7",
      "name": "Aucune opération",
      "type": "n8n-nodes-base.noOp",
      "position": [
        900,
        -680
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "Airtable-8",
      "name": "Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1460,
        -320
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://airtable.com/[YOUR_DB]",
          "cachedResultName": "YTB Trend Finder"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://airtable.com/[YOUR_DB]",
          "cachedResultName": "Listing"
        },
        "columns": {
          "value": {
            "Link": "={{ $('Loop Over Items').item.json.url }}",
            "Title": "={{ $('Loop Over Items').item.json.title }}",
            "Duration": "={{ $('Loop Over Items').item.json.duration }}",
            "Structure": "={{ $json.text }}",
            "SubsCount": "={{ $('Loop Over Items').item.json.numberOfSubscribers }}",
            "Thumbnail": "={{ [{ \"url\": $('Loop Over Items').item.json.thumbnailUrl }] }}",
            "ViewsCount": "={{ $('Loop Over Items').item.json.viewCount }}",
            "ChannelName": "={{ $('Loop Over Items').item.json.channelName }}",
            "CommentsCount": "={{ $('Loop Over Items').item.json.commentsCount }}"
          },
          "schema": [
            {
              "id": "Link",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ChannelName",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ChannelName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Thumbnail",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Thumbnail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ViewsCount",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ViewsCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SubsCount",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "SubsCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "CommentsCount",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "CommentsCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Duration",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Duration",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Structure",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Structure",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "VSC Ratio",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "VSC Ratio",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "D-clencheur-planifi--9",
      "name": "Déclencheur planifié",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1220,
        -640
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ]
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "Note-adh-sive2-10",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1300,
        -900
      ],
      "parameters": {
        "color": 7,
        "width": 780,
        "height": 440,
        "content": "## SETUP\n\n**Scheduled Trigger :** Select the Frequency you want. If you change it, update the data accordingly in the \"Create Videos Dataset\" HTTP Request Node in Body ➡️ JSON ➡️ dateFilter.\n\n\n**Setup Keywords :** Enter Keyword Related to the niche you want. If you change the number of keywords, update the data accordingly in the \"Create Videos Dataset\" HTTP Request Node in Body ➡️ JSON ➡️ searchQueries.\n\n**Create Videos Dataset :** Refer to the Apify Documentation for more https://docs.apify.com/api/v2/getting-started\n\n**APIs :** For all HTTP Request node in the URL field, replace [YOUR_API_TOKEN] with your API Token. "
      },
      "typeVersion": 1
    },
    {
      "id": "Nettoyage-de-texte-11",
      "name": "Nettoyage de texte",
      "type": "n8n-nodes-base.code",
      "position": [
        700,
        -500
      ],
      "parameters": {
        "jsCode": "// Assume input is a single string like SRT format\nconst input = $input.first().json.subtitles[0].srt; // or wherever your caption string is\n\n// Step-by-step cleanup\nconst cleaned = input\n  // Remove caption numbers (lines with only digits)\n  .replace(/^\\d+\\s*$/gm, \"\")\n  // Remove timing lines\n  .replace(/^\\d{2}:\\d{2}:\\d{1,2},\\d{1,3} --> \\d{2}:\\d{2}:\\d{1,2},\\d{1,3}\\s*$/gm, \"\")\n  // Remove leftover newlines\n  .replace(/\\n{2,}/g, \"\\n\")\n  // Trim and flatten everything to single paragraph\n  .replace(/\\n/g, \" \")\n  .trim();\n\nreturn [{ cleanedText: cleaned }];"
      },
      "typeVersion": 2
    },
    {
      "id": "Synth-se-de-texte-12",
      "name": "Synthèse de texte",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        960,
        -500
      ],
      "parameters": {
        "text": "={{ $json.cleanedText }}",
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "message": "=You are a summarization assistant.  Given a transcript of a YouTube video, your task is to summarize the content using only information found in the transcript, do not invent, infer, or add anything beyond what is said.  Structure your output as follows: \n\n1. Intro how the video begins or introduces the topic.  Don't do any modification on this part. \n\n2. Structure of the Video A breakdown of the video’s flow using bullet points: \nMajor Points: The main topics or arguments discussed.  \nSubpoints: Supporting details, examples, or smaller elements related to each major point. Use indentation or clear labeling to distinguish between major points and their related subpoints. \n"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.5
    },
    {
      "id": "Configurer-mots-cl-s-13",
      "name": "Configurer mots-clés",
      "type": "n8n-nodes-base.set",
      "position": [
        -960,
        -640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "",
              "name": "keyword1",
              "type": "string",
              "value": "Healthy food"
            },
            {
              "id": "",
              "name": "keyword2",
              "type": "string",
              "value": "Meal prep healthy"
            },
            {
              "id": "",
              "name": "keyword3",
              "type": "string",
              "value": "High Protein Snack"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "Note-adh-sive-14",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1300,
        -1140
      ],
      "parameters": {
        "color": 7,
        "width": 780,
        "height": 220,
        "content": "## How this is Working ?\n**1 -** Every Week retrieve Keywords you want to track\n**2 -** Thanks to Apify, scrap video from Youtube Search related to these Keywords filtered by relevance\n**3 -** Wait until the Dataset is completed\n**4 -** Get the Information contained in the Dataset\n**5 -** For each Video, clean and summarize the script\n**6 -** Upload everything in your Airtable Database\n\n**Youtube Video Tutorial : https://youtu.be/pH2hVaij3FY**\n**Need Help with Your Workflows ? https://tally.so/r/wayeqB**"
      },
      "typeVersion": 1
    },
    {
      "id": "Note-adh-sive1-15",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        -700
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 620,
        "content": "## Airtable DB Fields\n**1 -** Video Link (ID)\n**2 -** Video Title\n**3 -** Channel Name\n**4 -** Thumbnail ⬇️\nTo Upload an Image on Airtable Attachement Field you need an Array of the URL in this format : {{ [{ \"url\": $json.thumbnail}] }}\n**5 -** Views Count\n**6 -** Subs Count\n**7 -** Comments Count\n**8 -** Duration\n**9 -** Structure\n**10 -** VSC Ratio ⬇️\nFormula :(ViewsCount/SubsCount)*0.7 + (CommentsCount/ViewsCount)*0.3)\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "Condition-1": {
      "main": [
        [
          {
            "node": "Obtenir-donn-es-vid-os-3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Attente-0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Attente-0": {
      "main": [
        [
          {
            "node": "V-rifier-si-termin--2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Airtable-8": {
      "main": [
        [
          {
            "node": "Boucle-sur-l-ments-5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nettoyage-de-texte-11": {
      "main": [
        [
          {
            "node": "Synth-se-de-texte-12",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configurer-mots-cl-s-13": {
      "main": [
        [
          {
            "node": "Cr-er-jeu-de-donn-es-vid-os-4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Obtenir-donn-es-vid-os-3": {
      "main": [
        [
          {
            "node": "Boucle-sur-l-ments-5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Boucle-sur-l-ments-5": {
      "main": [
        [
          {
            "node": "Aucune-op-ration-7",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Nettoyage-de-texte-11",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Synth-se-de-texte-12": {
      "main": [
        [
          {
            "node": "Airtable-8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "D-clencheur-planifi--9": {
      "main": [
        [
          {
            "node": "Configurer-mots-cl-s-13",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "V-rifier-si-termin--2": {
      "main": [
        [
          {
            "node": "Condition-1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cr-er-jeu-de-donn-es-vid-os-4": {
      "main": [
        [
          {
            "node": "V-rifier-si-termin--2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral-Cloud-Chat-Model-6": {
      "ai_languageModel": [
        [
          {
            "node": "Synth-se-de-texte-12",
            "type": "ai_languageModel",
            "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é ?

Avancé

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.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds16
Catégorie-
Types de nœuds12
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Nasser

Nasser

@nasser

Data Engineer, now automating processes mostly with n8n, Make and code

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34