Usar youtube-transcript.io para obtener subtítulos gratuitos de YouTube y guardarlos en Supabase

Avanzado

Este es unautomatización que contiene 37 nodos.Utiliza principalmente nodos como If, Set, Code, Wait, Merge. Usar youtube-transcript.io para obtener subtítulos gratuitos de YouTube y guardarlos en Supabase

Requisitos previos
  • URL y Clave de API de Supabase
  • Pueden requerirse credenciales de autenticación para la API de destino

Categoría

-
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "8bdf363d6f1444e891759be2b805fdd240d84e9615b1a1f01b8f4c91c2145754",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "dd646cab-5e67-44b8-bc0f-4732d17fa239",
      "name": "Esperar",
      "type": "n8n-nodes-base.wait",
      "position": [
        6208,
        304
      ],
      "webhookId": "e232fe90-b3f7-47b5-bb5b-92eae61a03cc",
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "e6ad7969-fc50-48e5-869a-8969f23fabe5",
      "name": "Información del Canal",
      "type": "n8n-nodes-base.set",
      "position": [
        1072,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "7f952495-fb69-43fd-a42e-518d631b7456",
              "name": "youtubeChannels",
              "type": "string",
              "value": "={{ $json.source_identifier }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "30d46acf-b6ea-4d7d-80ae-0d7b1bc2af93",
      "name": "Información del Canal + ID del Canal",
      "type": "n8n-nodes-base.set",
      "position": [
        1568,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "91bee9e2-9c54-4b87-920f-0221e6939c88",
              "name": "rssUrl",
              "type": "string",
              "value": "={{ $json.rssUrl }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e2b70f78-b995-4eb4-8b91-822d01bc416a",
      "name": "¿Transcripción Exitosa?",
      "type": "n8n-nodes-base.if",
      "position": [
        5104,
        112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "fd22fed6-00aa-4d9a-94d5-58bb78f16bd1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.statusMessage }}",
              "rightValue": "OK"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9169295f-4ad4-43a4-9c81-f94f3dc6db5c",
      "name": "Información de Nuevo Video",
      "type": "n8n-nodes-base.set",
      "notes": "TEST CONTENT:\n[\n  {\n    \"client_id\": \"80d1c63b-59d6-479b-b7f7-ee91e859987e\",\n    \"max_content_age_days\": \"60\",\n    \"author\": \"Ted Talk\",\n    \"title\": \"Mental Toughness\",\n    \"link\": \"https://www.youtube.com/watch?v=rNxC16mlO60\",\n    \"pubDate\": \"2025-08-14T01:17:49.000Z\",\n    \"isMyContent\": null,\n    \"authority_score\": null,\n    \"niche_keywords\": null\n  }\n]\n",
      "position": [
        4336,
        128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a87b5163-a235-4806-bb4a-d5795ac3634a",
              "name": "author",
              "type": "string",
              "value": "={{ $json.author }}"
            },
            {
              "id": "eb2aebb9-820b-43a8-81b7-e56d559ec8c4",
              "name": "title",
              "type": "string",
              "value": "={{ $json.title }}"
            },
            {
              "id": "6b2efe1f-c03a-4952-8599-7f9c6581699e",
              "name": "link",
              "type": "string",
              "value": "={{ $json.link }}"
            },
            {
              "id": "e31d8325-c92a-48f2-9741-024f4d4fe0fe",
              "name": "pubDate",
              "type": "string",
              "value": "={{ $json.pubDate }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "3e2bec8f-26a2-4fe2-a044-20a146ac2cd3",
      "name": "Verificar ID del Canal + Crear Enlace RSS",
      "type": "n8n-nodes-base.code",
      "position": [
        1296,
        192
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// ── Pull the fields we need from the incoming item ─────────────────────────────\nconst channelId       = $json[\"youtubeChannels\"];\nconst authorityScore  = $json[\"authority_score\"];\nconst nicheKeywords   = $json[\"niche_keywords\"];\n\nconsole.log(\n  `Channel: ${channelId}, authority: ${authorityScore}, ` +\n  `keywords: ${nicheKeywords?.length || 0}`\n);\n\n// ── Skip if the channel ID is missing or blank ────────────────────────────────\nif (!channelId || channelId.trim() === '') {\n  return null;\n}\n\n// ── Only keep well-formed YouTube channel IDs (start with “UC”, 24 chars) ─────\nif (channelId.startsWith('UC') && channelId.length === 24) {\n  return {\n    channelId,\n    rssUrl: `https://www.youtube.com/feeds/videos.xml?channel_id=${channelId}`,\n    authority_score: authorityScore,\n    niche_keywords: nicheKeywords,\n    success: true\n  };\n} else {\n  console.log(`❌ Invalid Channel ID format: ${channelId}`);\n  return null;  // Skip invalid IDs\n}"
      },
      "retryOnFail": true,
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "e6b9852b-72a0-4926-a94d-2ae76268c294",
      "name": "Intentar obtener video_id nuevamente",
      "type": "n8n-nodes-base.code",
      "position": [
        4304,
        -32
      ],
      "parameters": {
        "jsCode": "// YouTube Video ID Extractor - returns `video_id`\nfunction extractYouTubeVideoId(url) {\n  if (!url || typeof url !== 'string') {\n    return null;\n  }\n  const regex = /(?:youtube\\.com\\/(?:[^\\/\\n\\s]+\\/\\S+\\/|(?:v|e(?:mbed)?|shorts)\\/|.*[?&]v=)|youtu\\.be\\/)([a-zA-Z0-9_-]{11})/i;\n  const match = url.match(regex);\n  return match && match[1] ? match[1] : null;\n}\n\nconst input = $input.all();\nconst results = [];\n\nfor (const item of input) {\n  const url =\n    item.json.url ||\n    item.json.video_url ||\n    item.json.youtube_url ||\n    (typeof item.json === 'string' ? item.json : '');\n  const id = extractYouTubeVideoId(url);\n  results.push({\n    original_url: url,\n    video_id: id,\n    is_valid: id !== null,\n    clean_url: id ? `https://www.youtube.com/watch?v=${id}` : null,\n  });\n}\n\nreturn results;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "1331abca-fcc2-46de-9144-2f89be68213d",
      "name": "Iterar sobre Cada Canal",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1840,
        192
      ],
      "parameters": {
        "options": {}
      },
      "retryOnFail": true,
      "typeVersion": 3,
      "waitBetweenTries": 3000
    },
    {
      "id": "c04ca824-9f49-44e1-a9b4-db579ef796b9",
      "name": "Iterar sobre Nuevos Videos",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2512,
        -96
      ],
      "parameters": {
        "options": {}
      },
      "retryOnFail": true,
      "typeVersion": 3
    },
    {
      "id": "17a7a2fe-e3ac-44b2-8d06-5b9df4b32dc7",
      "name": "¿Se encontró el ID del Video?",
      "type": "n8n-nodes-base.if",
      "position": [
        3920,
        -96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ddb872f1-00b7-45e4-9d9c-02fbcacc8173",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.is_valid }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4d7a1a8d-bbd5-4563-bbe8-48e0b8f6e57a",
      "name": "Agregar Transcripción a Datos del Video",
      "type": "n8n-nodes-base.merge",
      "position": [
        5568,
        -80
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "112ff980-abe2-48c5-baff-132f8112fb84",
      "name": "Transcripción Fallida",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        5360,
        288
      ],
      "parameters": {
        "errorMessage": "Transcript Failed"
      },
      "typeVersion": 1
    },
    {
      "id": "a6ed463f-8109-48d8-8732-315ac82cb7ab",
      "name": "Combinar ID del Video con Datos del Video",
      "type": "n8n-nodes-base.merge",
      "position": [
        4544,
        -96
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "45bc327e-e5b3-49bc-b844-b7f45d971de7",
      "name": "Renombrar URL",
      "type": "n8n-nodes-base.set",
      "position": [
        4112,
        -32
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "6e3e0929-a6d9-44a8-85f8-aab2a863b15b",
              "name": "url",
              "type": "string",
              "value": "={{ $json.original_url }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c06e03b7-61c2-44af-a700-791a742e0fb5",
      "name": "Renombrar URL Original",
      "type": "n8n-nodes-base.set",
      "position": [
        3024,
        -96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "78fb6dce-dd95-4d98-9df6-436a1491683a",
              "name": "original_url",
              "type": "string",
              "value": "={{ $json.link }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "363eb243-6ccb-4fbb-80f5-b12ea716fd73",
      "name": "Encontrar ID del Video",
      "type": "n8n-nodes-base.set",
      "position": [
        3248,
        -96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f5928422-6fb1-44d8-9c7e-4e3c3fc643ae",
              "name": "video_id",
              "type": "string",
              "value": "={{ $json.original_url.match(/(?:youtube\\.com\\/(?:[^\\/\\n\\s]+\\/\\S+\\/|(?:v|e(?:mbed)?|shorts)\\/|.*[?&]v=)|youtu\\.be\\/)([a-zA-Z0-9_-]{11})/i)?.[1] || null }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "502e8cf5-4f21-4f5c-aa23-d9ca3ca6c3db",
      "name": "¿Es válido el ID del Video?",
      "type": "n8n-nodes-base.set",
      "position": [
        3472,
        -96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b0a840da-4cef-4a4c-bfd2-14e0afa06f5d",
              "name": "is_valid",
              "type": "boolean",
              "value": "={{ $json.original_url.match(/(?:youtube\\.com\\/(?:[^\\/\\n\\s]+\\/\\S+\\/|(?:v|e(?:mbed)?|shorts)\\/|.*[?&]v=)|youtu\\.be\\/)([a-zA-Z0-9_-]{11})/i) !== null }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "85381b7a-8d37-4a7c-913c-12b358be8050",
      "name": "Limpiar URL",
      "type": "n8n-nodes-base.set",
      "position": [
        3696,
        -96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3add2b91-4a26-4a33-b982-bd90a3bf2790",
              "name": "clean_url",
              "type": "string",
              "value": "={{ $json.video_id ? `https://www.youtube.com/watch?v=${$json.video_id}` : null }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "7db930ef-f892-45fa-836b-012657b70df0",
      "name": "Nota Adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -240
      ],
      "parameters": {
        "color": 3,
        "width": 2016,
        "height": 768,
        "content": "## **Part 1: Get Recent Videos**\n\nThis section fetches the list of specified YouTube channels. It then loops through each channel, constructs an RSS feed URL, and pulls the list of videos."
      },
      "typeVersion": 1
    },
    {
      "id": "4c5f0b41-f6df-49cd-b0e7-98d59006ecbc",
      "name": "Nota Adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2416,
        -240
      ],
      "parameters": {
        "color": 5,
        "width": 3984,
        "height": 768,
        "content": "## **Part 2: Video Transcription**\n\nThis section extracts a clean YouTube Video ID from the link, then sends it to the `youtube-transcript.io` API. If the API call is successful, the JSON response is parsed to get a clean text transcript. If it fails, the workflow stops for that item."
      },
      "typeVersion": 1
    },
    {
      "id": "c2a1b787-4f13-4723-9836-36dba96e6173",
      "name": "Nota Adhesiva4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5744,
        -192
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 560,
        "content": "## **Part 3: Save Your Transcripts Somewhere!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### Place a node here of the location that you want to save your transcripts.\n\n**Popular nodes to save data**: \n1. Google Sheets\n2. Airtable\n3. Data Table\n4. Supabase"
      },
      "typeVersion": 1
    },
    {
      "id": "90ae1bb6-9422-41ab-85d7-e82e18f088c1",
      "name": "Encontrar Videos del Canal",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        2080,
        288
      ],
      "parameters": {
        "url": "={{ $json.rssUrl }}",
        "options": {}
      },
      "retryOnFail": true,
      "typeVersion": 1.1
    },
    {
      "id": "60253e86-9d4f-4963-8b57-8d699da9b085",
      "name": "Canales a Rastrear",
      "type": "n8n-nodes-base.set",
      "position": [
        544,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "71df3a21-e1b2-4906-b0ef-dd0d93f6cca5",
              "name": "source_identifier",
              "type": "array",
              "value": "={{ ['UCaEkuhQejDMyindRnUbISIg', 'UCIPPMRA040LQr5QPyJEbmXA'] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6a613354-f29e-4bc4-9684-207ef19d5b7d",
      "name": "Separar",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        816,
        192
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "source_identifier"
      },
      "typeVersion": 1
    },
    {
      "id": "59f43f15-dbbc-4dac-8162-4dc367996503",
      "name": "Nota Adhesiva6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -80
      ],
      "parameters": {
        "color": 4,
        "width": 256,
        "height": 448,
        "content": "## Splits all of the websites into their own items so that they go into the loop one at a time\n"
      },
      "typeVersion": 1
    },
    {
      "id": "019d5e36-c365-48b2-bdb3-665dc5051708",
      "name": "Nota Adhesiva7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -80
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 448,
        "content": "## Stores the Channel IDs of the youtube channels you are tracking\n\nFind channel IDs for free by using a website such as https://www.tunepocket.com/youtube-channel-id-finder"
      },
      "typeVersion": 1
    },
    {
      "id": "3ea72eea-053f-4d93-8bbe-05734648f4af",
      "name": "Nota Adhesiva9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -240
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 448,
        "content": "## How often do you want this to run?\n\n**PRO TIP**: Replace this with a schedule node!"
      },
      "typeVersion": 1
    },
    {
      "id": "6719410f-abdf-4c94-a471-a31fb9d1fab5",
      "name": "Nota Adhesiva10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        80
      ],
      "parameters": {
        "color": 6,
        "width": 256,
        "height": 288,
        "content": "## Convert to a valid RSS feed link"
      },
      "typeVersion": 1
    },
    {
      "id": "f37d6a83-467e-4b9a-9890-3c2e7241444d",
      "name": "Nota Adhesiva5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2544,
        80
      ],
      "parameters": {
        "width": 688,
        "height": 384,
        "content": "## Filter Out Youtube Shorts?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n**Default = Will NOT extract transcript from Youtube Shorts.\n\nIf you want the transcripts from Youtube Shorts as well. Delete the second filter on this node.**"
      },
      "typeVersion": 1
    },
    {
      "id": "04af7999-8494-47a2-87f8-4a745c33f7ae",
      "name": "Nota Adhesiva12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4720,
        0
      ],
      "parameters": {
        "width": 336,
        "height": 464,
        "content": "## Free Youtube Transcripts\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### This website allows for 25 free Youtube transcripts per month.\n\nGet your api key here:\nhttps://www.youtube-transcript.io/\n\n### Only works on videos with CAPTIONS"
      },
      "typeVersion": 1
    },
    {
      "id": "f56930b5-6a43-4240-bbfb-65b78b4d4623",
      "name": "Nota Adhesiva13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6144,
        128
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 336,
        "content": "## Wait for a sec"
      },
      "typeVersion": 1
    },
    {
      "id": "690af084-1fc8-466a-afe4-105c431490ce",
      "name": "Nota Adhesiva14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        -240
      ],
      "parameters": {
        "width": 1088,
        "height": 448,
        "content": "## **YouTube Video Transcriptor**\n\nHey there! This workflow automatically finds new videos from your favorite YouTube channels, transcribes them, and saves the text for you.\n\n### **🚀 Quick Setup Guide**\n\n1.  **Add Channel IDs:** Go to the **\"Channels To Track\"** node and paste in the YouTube Channel IDs you want to follow.\n2.  **Set API Key:** Select the **\"Get Transcript from API\"** node. In the credentials tab, create a new **Header Auth** credential and add your API key from `youtube-transcript.io`.\n3.  **Connect Your Database:** Find the **\"Save Data to Supabase\"** node and connect your account. You can easily swap this for a Google Sheets, Airtable, or other database node.\n4.  **Go Automatic (Optional):** Replace the manual trigger with a **Schedule** node to run this workflow automatically.\n\n### **✨ Customization**\n\n* **Transcribe YouTube Shorts:** To get transcripts from Shorts, just select the **\"Filter Out YouTube Shorts\"** node and delete the second condition in its settings.\n\nThat's it! Activate the workflow and enjoy your automated transcripts. Happy automating!"
      },
      "typeVersion": 1
    },
    {
      "id": "e173f5ab-0734-42f4-b99c-cea881b6fed6",
      "name": "Al hacer clic en 'Ejecutar flujo de trabajo'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        192,
        -64
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d7803fcd-79ce-43eb-98ad-6b09f92315de",
      "name": "Obtener Transcripción desde API",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Failures:\n\n[\n  {\n    \"body\": {\n      \"error\": {\n        \"code\": 503,\n        \"message\": \"The model is overloaded. Please try again later.\",\n        \"status\": \"UNAVAILABLE\"\n      }\n    },\n    \"headers\": {\n      \"vary\": \"Origin, X-Origin, Referer\",\n      \"content-type\": \"application/json; charset=UTF-8\",\n      \"date\": \"Wed, 13 Aug 2025 18:07:09 GMT\",\n      \"server\": \"scaffolding on HTTPServer2\",\n      \"x-xss-protection\": \"0\",\n      \"x-frame-options\": \"SAMEORIGIN\",\n      \"x-content-type-options\": \"nosniff\",\n      \"server-timing\": \"gfet4t7; dur=19896\",\n      \"alt-svc\": \"h3=\\\":443\\\"; ma=2592000,h3-29=\\\":443\\\"; ma=2592000\",\n      \"connection\": \"close\",\n      \"transfer-encoding\": \"chunked\"\n    },\n    \"statusCode\": 503,\n    \"statusMessage\": \"Service Unavailable\"\n  }\n]",
      "position": [
        4832,
        112
      ],
      "parameters": {
        "url": "https://www.youtube-transcript.io/api/transcripts",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "fullResponse": true,
              "responseFormat": "text"
            }
          }
        },
        "jsonBody": "={\n  \"ids\": [\n    \"{{$json.video_id}}\"\n  ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "dXT903VZuMUSiH5L",
          "name": "video guy"
        },
        "httpHeaderAuth": {
          "id": "7WXaS18PgenWHxmi",
          "name": "youtube-transcript-io"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 5000
    },
    {
      "id": "22c1026c-1ff5-4409-ab3a-8c20e7a3ec7d",
      "name": "Analizar Transcripción de Respuesta de API",
      "type": "n8n-nodes-base.code",
      "position": [
        5360,
        96
      ],
      "parameters": {
        "jsCode": "const trackToText = (track) => track.transcript.map(t => t.text).join(' ');\n\nconst results = [];\n\nfor (const cur of $input.all()) {\n  // Parse data field if it’s a string\n  let dataArray;\n  if (typeof cur.json.data === 'string') {\n    try {\n      dataArray = JSON.parse(cur.json.data);\n    } catch {\n      continue;\n    }\n  } else {\n    dataArray = cur.json.data;\n  }\n\n  const item = Array.isArray(dataArray) ? dataArray[0] : null;\n  if (!item || !item.tracks?.[0]) continue;\n\n  results.push({\n    json: {\n      id: item.id,\n      transcript: trackToText(item.tracks[0])\n    }\n  });\n}\n\nreturn results;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "26bc1e33-ec0f-441b-919a-38ec2a168557",
      "name": "Guardar Datos en Supabase",
      "type": "n8n-nodes-base.supabase",
      "onError": "continueRegularOutput",
      "position": [
        5840,
        -80
      ],
      "parameters": {
        "tableId": "content_queue_1",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "content_type",
              "fieldValue": "youtube"
            },
            {
              "fieldId": "title",
              "fieldValue": "={{ $json.title }}"
            },
            {
              "fieldId": "source_url",
              "fieldValue": "={{ $json.link }}"
            },
            {
              "fieldId": "content_snippet",
              "fieldValue": "={{ $json.transcript }}"
            },
            {
              "fieldId": "published_date",
              "fieldValue": "={{ $json.pubDate }}"
            },
            {
              "fieldId": "creator",
              "fieldValue": "={{ $json.author }}"
            }
          ]
        }
      },
      "credentials": {
        "supabaseApi": {
          "id": "oB3fYG1lWHXnOQN6",
          "name": "Content Automation Hub"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "2d24ec43-3d00-40a8-bba3-1f67042092f6",
      "name": "Filtrar YouTube Shorts",
      "type": "n8n-nodes-base.if",
      "position": [
        2800,
        144
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "af405725-90d8-4c1a-8497-0a92e273ced7",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{$json.link}}",
              "rightValue": ""
            },
            {
              "id": "2c3a30eb-489f-4ce9-bdf2-9f63c683456e",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.link }}",
              "rightValue": "youtube.com/shorts"
            }
          ]
        }
      },
      "typeVersion": 2.2
    }
  ],
  "pinData": {},
  "connections": {
    "dd646cab-5e67-44b8-bc0f-4732d17fa239": {
      "main": [
        [
          {
            "node": "c04ca824-9f49-44e1-a9b4-db579ef796b9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6a613354-f29e-4bc4-9684-207ef19d5b7d": {
      "main": [
        [
          {
            "node": "e6ad7969-fc50-48e5-869a-8969f23fabe5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "45bc327e-e5b3-49bc-b844-b7f45d971de7": {
      "main": [
        [
          {
            "node": "e6b9852b-72a0-4926-a94d-2ae76268c294",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e6ad7969-fc50-48e5-869a-8969f23fabe5": {
      "main": [
        [
          {
            "node": "3e2bec8f-26a2-4fe2-a044-20a146ac2cd3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "85381b7a-8d37-4a7c-913c-12b358be8050": {
      "main": [
        [
          {
            "node": "17a7a2fe-e3ac-44b2-8d06-5b9df4b32dc7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "363eb243-6ccb-4fbb-80f5-b12ea716fd73": {
      "main": [
        [
          {
            "node": "502e8cf5-4f21-4f5c-aa23-d9ca3ca6c3db",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "60253e86-9d4f-4963-8b57-8d699da9b085": {
      "main": [
        [
          {
            "node": "6a613354-f29e-4bc4-9684-207ef19d5b7d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "502e8cf5-4f21-4f5c-aa23-d9ca3ca6c3db": {
      "main": [
        [
          {
            "node": "85381b7a-8d37-4a7c-913c-12b358be8050",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e2b70f78-b995-4eb4-8b91-822d01bc416a": {
      "main": [
        [
          {
            "node": "22c1026c-1ff5-4409-ab3a-8c20e7a3ec7d",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "112ff980-abe2-48c5-baff-132f8112fb84",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c06e03b7-61c2-44af-a700-791a742e0fb5": {
      "main": [
        [
          {
            "node": "363eb243-6ccb-4fbb-80f5-b12ea716fd73",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "17a7a2fe-e3ac-44b2-8d06-5b9df4b32dc7": {
      "main": [
        [
          {
            "node": "a6ed463f-8109-48d8-8732-315ac82cb7ab",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "45bc327e-e5b3-49bc-b844-b7f45d971de7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c04ca824-9f49-44e1-a9b4-db579ef796b9": {
      "main": [
        [],
        [
          {
            "node": "2d24ec43-3d00-40a8-bba3-1f67042092f6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "90ae1bb6-9422-41ab-85d7-e82e18f088c1": {
      "main": [
        [
          {
            "node": "1331abca-fcc2-46de-9144-2f89be68213d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9169295f-4ad4-43a4-9c81-f94f3dc6db5c": {
      "main": [
        [
          {
            "node": "a6ed463f-8109-48d8-8732-315ac82cb7ab",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "26bc1e33-ec0f-441b-919a-38ec2a168557": {
      "main": [
        [
          {
            "node": "dd646cab-5e67-44b8-bc0f-4732d17fa239",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1331abca-fcc2-46de-9144-2f89be68213d": {
      "main": [
        [
          {
            "node": "c04ca824-9f49-44e1-a9b4-db579ef796b9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "90ae1bb6-9422-41ab-85d7-e82e18f088c1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d7803fcd-79ce-43eb-98ad-6b09f92315de": {
      "main": [
        [
          {
            "node": "e2b70f78-b995-4eb4-8b91-822d01bc416a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "30d46acf-b6ea-4d7d-80ae-0d7b1bc2af93": {
      "main": [
        [
          {
            "node": "1331abca-fcc2-46de-9144-2f89be68213d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2d24ec43-3d00-40a8-bba3-1f67042092f6": {
      "main": [
        [
          {
            "node": "c06e03b7-61c2-44af-a700-791a742e0fb5",
            "type": "main",
            "index": 0
          },
          {
            "node": "9169295f-4ad4-43a4-9c81-f94f3dc6db5c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c04ca824-9f49-44e1-a9b4-db579ef796b9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e6b9852b-72a0-4926-a94d-2ae76268c294": {
      "main": [
        [
          {
            "node": "a6ed463f-8109-48d8-8732-315ac82cb7ab",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4d7a1a8d-bbd5-4563-bbe8-48e0b8f6e57a": {
      "main": [
        [
          {
            "node": "26bc1e33-ec0f-441b-919a-38ec2a168557",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a6ed463f-8109-48d8-8732-315ac82cb7ab": {
      "main": [
        [
          {
            "node": "d7803fcd-79ce-43eb-98ad-6b09f92315de",
            "type": "main",
            "index": 0
          },
          {
            "node": "4d7a1a8d-bbd5-4563-bbe8-48e0b8f6e57a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "22c1026c-1ff5-4409-ab3a-8c20e7a3ec7d": {
      "main": [
        [
          {
            "node": "4d7a1a8d-bbd5-4563-bbe8-48e0b8f6e57a",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "3e2bec8f-26a2-4fe2-a044-20a146ac2cd3": {
      "main": [
        [
          {
            "node": "30d46acf-b6ea-4d7d-80ae-0d7b1bc2af93",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e173f5ab-0734-42f4-b99c-cea881b6fed6": {
      "main": [
        [
          {
            "node": "60253e86-9d4f-4963-8b57-8d699da9b085",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Avanzado

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos37
Categoría-
Tipos de nodos13
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Autor

On a mission to automate all aspects of social media. Each of my templates covered more in depth in my Skool Community.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34