AutomationFlowsSocial Media › Youtube Keyword Search to Transcripts (apihq Skeleton)

Youtube Keyword Search to Transcripts (apihq Skeleton)

YouTube keyword search to transcripts (apihq skeleton). Uses httpRequest. Event-driven trigger; 9 nodes.

Event trigger★★★★☆ complexity9 nodesHTTP Request
Social Media Trigger: Event Nodes: 9 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "YouTube keyword search to transcripts (apihq skeleton)",
  "nodes": [
    {
      "parameters": {},
      "id": "trigger",
      "name": "Run workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        200,
        300
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/apihq~youtube-search-scraper/run-sync-get-dataset-items",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_APIFY_TOKEN"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"queries\": [\n    \"ai coding assistants\"\n  ],\n  \"type\": \"video\",\n  \"maxResults\": 20\n}",
        "options": {}
      },
      "id": "search-youtube",
      "name": "Search YouTube",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        430,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "success-check",
              "leftValue": "={{ $json.success }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "split-search-rows",
      "name": "Split search rows",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "mode": "runOnceForAllItems",
        "jsCode": "// The transcript actor takes up to 50 IDs per run, so batch them.\n// Dedupe first so no video is transcribed (and billed) twice.\nconst ids = [...new Set($input.all().map((i) => i.json.video_id).filter(Boolean))];\nconst batches = [];\nfor (let i = 0; i < ids.length; i += 50) {\n  batches.push({ json: { videoIds: ids.slice(i, i + 50) } });\n}\nreturn batches;"
      },
      "id": "collect-video-ids",
      "name": "Collect video IDs",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        880,
        200
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/apihq~youtube-transcript-scraper/run-sync-get-dataset-items",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_APIFY_TOKEN"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ videoIds: $json.videoIds, metadata: true }) }}",
        "options": {}
      },
      "id": "get-transcripts",
      "name": "Get transcripts",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1110,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "success-check-2",
              "leftValue": "={{ $json.success }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "split-transcript-rows",
      "name": "Split transcript rows",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        1340,
        200
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a0",
              "name": "video_id",
              "value": "={{ $json.video_id }}",
              "type": "string"
            },
            {
              "id": "a1",
              "name": "title",
              "value": "={{ $json.metadata?.title }}",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "text",
              "value": "={{ $json.transcript.map(s => s.text).join(' ') }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "transcript-text",
      "name": "Transcript text",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1570,
        100
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a0",
              "name": "video_id",
              "value": "={{ $json.video_id }}",
              "type": "string"
            },
            {
              "id": "a1",
              "name": "code",
              "value": "={{ $json.code }}",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "request_id",
              "value": "={{ $json.request_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "transcript-failure-row",
      "name": "Transcript failure row",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1570,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a0",
              "name": "search_query",
              "value": "={{ $json.search_query }}",
              "type": "string"
            },
            {
              "id": "a1",
              "name": "code",
              "value": "={{ $json.code }}",
              "type": "string"
            },
            {
              "id": "a2",
              "name": "request_id",
              "value": "={{ $json.request_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "search-failure-row",
      "name": "Search failure row",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        880,
        420
      ]
    }
  ],
  "connections": {
    "Run workflow": {
      "main": [
        [
          {
            "node": "Search YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search YouTube": {
      "main": [
        [
          {
            "node": "Split search rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split search rows": {
      "main": [
        [
          {
            "node": "Collect video IDs",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search failure row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect video IDs": {
      "main": [
        [
          {
            "node": "Get transcripts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get transcripts": {
      "main": [
        [
          {
            "node": "Split transcript rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split transcript rows": {
      "main": [
        [
          {
            "node": "Transcript text",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Transcript failure row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

YouTube keyword search to transcripts (apihq skeleton). Uses httpRequest. Event-driven trigger; 9 nodes.

Source: https://github.com/slvDev/apihq-automations/blob/main/n8n/youtube-search-transcripts.n8n.json — original creator credit. Request a take-down →

More Social Media workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Social Media

Notion__DriveDropbox_Sync. Uses notionTrigger, googleDrive, dropbox, notion. Event-driven trigger; 47 nodes.

Notion Trigger, Google Drive, Dropbox +3
Social Media

This n8n workflow automates the process of uploading video and image advertisements to Meta Ads Manager via the Meta Graph API (Facebook Ads) directly from Google Sheets and Google Drive. The workflow

Facebook Graph Api, Google Sheets, HTTP Request +2
Social Media

This workflow provides an end-to-end automation for discovering, evaluating, and optionally downloading high-quality educational YouTube videos.

HTTP Request, Google Sheets
Social Media

13-Convert_YouTube_Videos_to_Shorts_with_Klap___Auto_Post_to_Multiple_Social_Platforms. Uses httpRequest, telegramTrigger, googleSheets, telegram. Event-driven trigger; 36 nodes.

HTTP Request, Telegram Trigger, Google Sheets +1
Social Media

Template Description WDF Top Keywords: This workflow is designed to streamline keyword research by automating the process of generating, filtering, and analyzing Google and YouTube keyword data. Ensur

Noco Db, HTTP Request