AutomationFlowsAI & RAG › Convert Youtube Transcripts in Google Sheets to X (twitter) Threads with…

Convert Youtube Transcripts in Google Sheets to X (twitter) Threads with…

Original n8n title: Convert Youtube Transcripts in Google Sheets to X (twitter) Threads with Apify, Openai and Rapidapi

ByPrakash GP @prakashgp on n8n.io

This workflow lets you scrape and convert youtube video transcript to twitter thread using Google sheets, Apify and RapidAPI Get unprocessed youtube video link from google sheet Use youtube trascript scraper to extract transcript from youtube video Feed the youtube transcript to…

Cron / scheduled trigger★★★★☆ complexityAI-powered16 nodesGoogle SheetsHTTP RequestAgentOpenAI ChatOutput Parser Structured
AI & RAG Trigger: Cron / scheduled Nodes: 16 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #14001 — we link there as the canonical source.

This workflow follows the Agent → Google Sheets recipe pattern — see all workflows that pair these two integrations.

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
{
  "id": "Yx_Ihr8jdKf9asWvG7af3",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "YouTube Transcripts to Twitter Threads from Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "b77a6784-1cd0-497c-9521-c0e7db423d5e",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -160,
        352
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-3",
              "name": "apifyApiToken",
              "type": "string",
              "value": ""
            },
            {
              "id": "5ea23270-a0dd-4f94-a075-630edc74af17",
              "name": "rapidApiKey",
              "type": "string",
              "value": ""
            },
            {
              "id": "e7ed51e2-919c-4284-b0c9-805e5325a49a",
              "name": "twitterCookie",
              "type": "string",
              "value": ""
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f0d66aa3-4463-44f8-a273-3d2ce846bf89",
      "name": "Get YouTube Links from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        352,
        352
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1976113934,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JloSmfIY_pLagMgcu1wjY44Hcs5PJXsxeKBfx6cSAQs/edit#gid=1976113934",
          "cachedResultName": "Youtbe transcripts to X"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1JloSmfIY_pLagMgcu1wjY44Hcs5PJXsxeKBfx6cSAQs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JloSmfIY_pLagMgcu1wjY44Hcs5PJXsxeKBfx6cSAQs/edit?usp=drivesdk",
          "cachedResultName": "n8n storage"
        },
        "combineFilters": "OR"
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": false
    },
    {
      "id": "8094155e-bfb0-4c7f-badc-d051ae02cd70",
      "name": "Apify YouTube Transcript Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1216,
        352
      ],
      "parameters": {
        "url": "={{ 'https://api.apify.com/v2/acts/supreme_coder~youtube-transcript-scraper/run-sync-get-dataset-items?token=' + $('Workflow Configuration').item.json.apifyApiToken }}",
        "method": "POST",
        "options": {
          "timeout": 120000
        },
        "jsonBody": "={\n  \"outputFormat\": \"text\",\n  \"urls\": [\n    {\n      \"url\": \"{{ $('Get YouTube Links from Sheet').item.json.Video }}\"\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.4
    },
    {
      "id": "d766bda8-b2b9-47a5-bd2d-9b329d6856fe",
      "name": "Convert to Twitter Thread",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1584,
        352
      ],
      "parameters": {
        "text": "=Convert this YouTube video transcript into a Twitter thread. Make sure it doesn't sound like it is direct conversion from youtube. For example do not make sentences that indicates you are perforing an activity in presense tense. \n\nCreate a thread with:\n1. A hook tweet that grabs attention. Show results first with numbers \n2. 5-10 tweets breaking down key insights\n3. A final call-to-action tweet\n\nReturn as structured JSON with the thread array.\n\nVideo Title: {{ $json.videoDetails.title }}\n\n\nTranscript:\n{{ $json.transcript }}\n",
        "options": {
          "systemMessage": "You are an expert Twitter thread creator. Your task is to convert YouTube video transcripts into engaging, viral-worthy Twitter threads. Each tweet must be under 280 characters, punchy, and valuable on its own. Use emojis sparingly for emphasis and include line breaks for readability. Always create a hook tweet, 5-10 insight tweets, and a call-to-action tweet."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "09bf8dd8-e87e-4145-b331-aee9d04ce969",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1584,
        608
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "b4ff131e-372e-4ccf-8b00-5533567e7bb4",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1728,
        608
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"thread\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n        \n          \"text\": {\"type\": \"string\"}\n         \n        }\n      }\n    },\n    \"totalTweets\": {\"type\": \"number\"},\n    \"videoTitle\": {\"type\": \"string\"},\n    \"videoUrl\": {\"type\": \"string\"}\n  }\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "e08f05ac-c109-41ba-ae26-5a065f00b1fe",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -480,
        352
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "5deeea07-61de-4c59-aa15-596f8dfad320",
      "name": "Filter Unprocessed Links",
      "type": "n8n-nodes-base.filter",
      "position": [
        704,
        352
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.Processed }}",
              "value2": "Yes",
              "operation": "notEqual"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "60a3544e-3e26-4643-b276-e1eede6a51cc",
      "name": "Get One Link Only",
      "type": "n8n-nodes-base.limit",
      "position": [
        960,
        352
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b5a8d3f5-94ca-4c1d-a37a-470f6ec00f56",
      "name": "Mark Link as Processed",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2288,
        352
      ],
      "parameters": {
        "columns": {
          "value": {
            "Video": "={{ $('Get One Link Only').item.json.Video }}",
            "Processed": "Yes",
            "row_number": 0
          },
          "schema": [
            {
              "id": "Video",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Processed",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Processed",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Video"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "1976113934",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JloSmfIY_pLagMgcu1wjY44Hcs5PJXsxeKBfx6cSAQs/edit#gid=1976113934",
          "cachedResultName": "Youtbe transcripts to X"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1JloSmfIY_pLagMgcu1wjY44Hcs5PJXsxeKBfx6cSAQs",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JloSmfIY_pLagMgcu1wjY44Hcs5PJXsxeKBfx6cSAQs/edit?usp=drivesdk",
          "cachedResultName": "n8n storage"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "8d7eab5e-0302-4704-8563-ce92ecb9dad1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -112
      ],
      "parameters": {
        "color": "#FFFFFF",
        "width": 480,
        "height": 640,
        "content": "## Google sheet template\n\nPrepare your google sheet in this format and configure this node to use that sheet. \n\n| Video | Processed |\n|-------|--------|\n| https://www.youtube.com/watch?v=example1 |No|\n| https://www.youtube.com/watch?v=example2 | No|\n| https://www.youtube.com/watch?v=example3 | No\n|"
      },
      "typeVersion": 1
    },
    {
      "id": "3761b583-7d94-4c56-84a0-789bb9442af8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -112
      ],
      "parameters": {
        "color": "#FFFFFF",
        "width": 432,
        "height": 640,
        "content": "## Setting up credentials\n\n### \ud835\udd4f Cookies\nFollow these steps to get the cookies:\n- Install [Cookie-Editor](https://chrome.google.com/webstore/detail/hlkenndednhfkekhgcdicdfddnkalmdm) chrome extension\n- Login to your \ud835\udd4f account\n- Click on the Cookie-Editor -> Export -> Header string \n- Paste the copied cookies into cookie input field \n\n### RapidAPI Key\n- Sign up to [RapidAPI](https://rapidapi.com)\n- [Click here](https://rapidapi.com/heycuriouscoder/api/x-twitter-api2/playground/apiendpoint_1a09d2c4-6c90-4bec-98ca-7f325dd3c732) to get api key, Copy from input field **X-RapidAPI-Key**\n\n### Apify API Token\n- Signup to [Apify](https://apify.com?fpr=ve081&fp_sid=n8n)\n- [Click here]() to get api token (Under section **Personal API tokens**)"
      },
      "typeVersion": 1
    },
    {
      "id": "bbe1566e-6275-4756-b8c9-7717774cd7c1",
      "name": "Publish Thread with RapidAPI/X API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1984,
        352
      ],
      "parameters": {
        "url": "https://x-twitter-api2.p.rapidapi.com/x/post-thread",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "cookies",
              "value": "={{ $('Workflow Configuration').item.json.twitterCookie }}"
            },
            {
              "name": "tweets",
              "value": "={{ $json.output.thread }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "x-rapidapi-host",
              "value": "x-twitter-api2.p.rapidapi.com"
            },
            {
              "name": "x-rapidapi-key",
              "value": "={{ $('Workflow Configuration').item.json.rapidApiKey }}"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "7a1ae79a-a2ea-422e-86db-1827288d918f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -112
      ],
      "parameters": {
        "color": "#FFFFFF",
        "width": 400,
        "height": 640,
        "content": "## Scrape youtube transcripts\nThis node uses [apify youtube transcript scraper](https://apify.com/supreme_coder/youtube-transcript-scraper?fpr=ve081) which is the cheapest transcript scraper available right now.\n\nYou can click on above link to know more about the  apify actor. \n\nYou can view the scraper input, logs and scraped dataset on apify console once this node is executed."
      },
      "typeVersion": 1
    },
    {
      "id": "5a1ddd2c-47c3-4c26-a45e-08d8bb92f57f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        -112
      ],
      "parameters": {
        "color": "#FFFFFF",
        "width": 352,
        "height": 640,
        "content": "## Create \ud835\udd4f (Twitter) Thread\nThis node calls [X-API](https://rapidapi.com/heycuriouscoder/api/x-twitter-api2/playground/apiendpoint_1a09d2c4-6c90-4bec-98ca-7f325dd3c732) service on RapidAPI  to post the converted text content to x.com using your cookies.\n\nSubscribe to Basic plan which is free "
      },
      "typeVersion": 1
    },
    {
      "id": "cfb36a6d-8c15-4515-9367-7f328ad6bcf6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1104,
        -112
      ],
      "parameters": {
        "width": 512,
        "height": 1056,
        "content": "## Youtube to \ud835\udd4f (Twitter) threads \n\nThis workflow lets you convert youtube video transcript to twitter thread using Google sheets, Apify and RapidAPI \n\n### Workflow summary\n1. Get unprocessed youtube video link from google sheet\n2. Use youtube trascript scraper to extract transcript from youtube video\n3. Feed the transcript to OpenAI model with advanced prompt to convert the transcript to twitter friendly posts/thread\n4. Post the thread to twitter from your account using your cookies for authentication \n5. Mark the video as Processed so that it won't be processed again \n\n### Features\n- Fast and cheap (mostly free) APIs \n- Advanced Prompts to avoid tweets sound like AI converted from youtube\n- Customizable AI Model\n\n### Prompt used\n\n**System:**\n\nYou are an expert Twitter thread creator. Your task is to convert YouTube video transcripts into engaging, viral-worthy Twitter threads. Each tweet must be under 280 characters, punchy, and valuable on its own. Use emojis sparingly for emphasis and include line breaks for readability. Always create a hook tweet, 5-10 insight tweets, and a call-to-action tweet.\n\n**User:**\n\nConvert this YouTube video transcript into a Twitter thread. Make sure it doesn't sound like it is direct conversion from youtube. For example do not make sentences that indicates you are perforing an activity in presense tense. \n\nCreate a thread with:\n1. A hook tweet that grabs attention. Show results first with numbers \n2. 5-10 tweets breaking down key insights\n3. A final call-to-action tweet\n\nReturn as structured JSON with the thread array.\n\nVideo Title: {{Title}}\n\n\nTranscript:\n{{Transcript}}\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "c15754c5-2ae4-4179-8597-d26305ab3fb9",
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get One Link Only": {
      "main": [
        [
          {
            "node": "Apify YouTube Transcript Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Convert to Twitter Thread",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Get YouTube Links from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Unprocessed Links": {
      "main": [
        [
          {
            "node": "Get One Link Only",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Convert to Twitter Thread",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Twitter Thread": {
      "main": [
        [
          {
            "node": "Publish Thread with RapidAPI/X API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get YouTube Links from Sheet": {
      "main": [
        [
          {
            "node": "Filter Unprocessed Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apify YouTube Transcript Scraper": {
      "main": [
        [
          {
            "node": "Convert to Twitter Thread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish Thread with RapidAPI/X API": {
      "main": [
        [
          {
            "node": "Mark Link as Processed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

This workflow lets you scrape and convert youtube video transcript to twitter thread using Google sheets, Apify and RapidAPI Get unprocessed youtube video link from google sheet Use youtube trascript scraper to extract transcript from youtube video Feed the youtube transcript to…

Source: https://n8n.io/workflows/14001/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

This n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform

Agent, OpenAI Chat, Airtable Tool +7
AI & RAG

This workflow is designed for: Content creators and marketers E-commerce and product-based businesses Agencies producing social media visuals and videos Automation builders looking for AI-powered crea

HTTP Request, Edit Image, Google Drive +7
AI & RAG

Generate product images with NanoBanana Pro to Veo videos and Blotato - vide 2 ok. Uses httpRequest, editImage, googleDrive, googleSheets. Scheduled trigger; 76 nodes.

HTTP Request, Edit Image, Google Drive +7
AI & RAG

Created by: Peyton Leveillee Last updated: October 2025

OpenAI Chat, Google Sheets, HTTP Request +5
AI & RAG

SEO Blog Article Generation Workflow. Uses outputParserStructured, httpRequest, agent, lmChatOpenAi. Scheduled trigger; 56 nodes.

Output Parser Structured, HTTP Request, Agent +4