{
  "name": "Transcribe any TikTok, YouTube, Instagram, X or Facebook video and summarize it with SocialTap and OpenAI",
  "nodes": [
    {
      "parameters": {
        "content": "## Turn any video link into a transcript, a summary or a post\n\nPaste a link to a public video from YouTube, TikTok, Instagram, X, Facebook, LinkedIn or Reddit. You get its transcript and what you asked for: a summary with key points, a blog post, an X thread or a LinkedIn post.\n\n### How it works\n1. The form takes the link and what to write.\n2. The link's host picks the platform.\n3. SocialTap gets the transcript: the captions when the video has them, speech-to-text from the audio when it doesn't.\n4. OpenAI writes from the transcript only, quoting it where it matters.\n5. The form shows the result with the full transcript under it.\n\nSocialTap fetches the video, so no proxy or cookie is needed. Private videos and videos behind a login can't be read.\n\n### Setup\n- Install the community node **n8n-nodes-socialtap** (Settings → Community nodes → Install). Tested with n8n 2.49.8 and n8n-nodes-socialtap 1.621.43. Until n8n verifies it, it runs on self-hosted n8n. [Install guide](https://socialtap.dev/docs/integrations/#n8n)\n- Add a **SocialTap API** credential: [create a free account](https://socialtap.dev/signup/?ref=n8n-transcribe-video) and paste its API key. Each operation shows its price, and failed requests are free.\n- Add an **OpenAI** credential to the model node.\n- Open the form's URL and paste a link.\n\n### Customization\n- Edit the formats in the form and in **Write it**.\n- Replace the form with a Google Sheets trigger to process a list of links.\n\n![The workflow](https://socialtap.dev/n8n/transcribe-any-video.svg)",
        "height": 920,
        "width": 600
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        0
      ],
      "id": "199dfc9c-763c-4564-8b33-40a6db651a29",
      "name": "Overview"
    },
    {
      "parameters": {
        "formTitle": "Transcribe a video",
        "formDescription": "Paste a public video link from YouTube, TikTok, Instagram, X, Facebook, LinkedIn or Reddit.",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Video link",
              "placeholder": "https://www.youtube.com/watch?v=…",
              "requiredField": true
            },
            {
              "fieldLabel": "What to write",
              "fieldType": "dropdown",
              "requiredField": true,
              "fieldOptions": {
                "values": [
                  {
                    "option": "Summary and key points"
                  },
                  {
                    "option": "Blog post"
                  },
                  {
                    "option": "X thread"
                  },
                  {
                    "option": "LinkedIn post"
                  },
                  {
                    "option": "Transcript only"
                  }
                ]
              }
            }
          ]
        },
        "responseMode": "lastNode",
        "options": {
          "path": "transcribe-video",
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        0,
        440
      ],
      "id": "b18dc066-b00a-4d47-a9c0-c33fbd53ef2a",
      "name": "Paste a video link",
      "webhookId": "8f989ecb-7ded-4dfb-b467-4763c9655919"
    },
    {
      "parameters": {
        "jsCode": "// The platform the link's host names: youtube, tiktok, instagram, x, facebook, linkedin, reddit, or none.\nconst hosts = { 'youtube.com': 'youtube', 'youtu.be': 'youtube', 'tiktok.com': 'tiktok', 'instagram.com': 'instagram',\n  'instagr.am': 'instagram', 'x.com': 'x', 'twitter.com': 'x', 'facebook.com': 'facebook', 'fb.watch': 'facebook',\n  'fb.com': 'facebook', 'linkedin.com': 'linkedin', 'reddit.com': 'reddit', 'redd.it': 'reddit' };\nconst link = String($json['Video link'] ?? '').trim();\nconst host = link.replace(/^[a-z]+:\\/\\//i, '').split(/[\\/?#]/)[0].replace(/^.*@/, '').replace(/:\\d+$/, '').toLowerCase();\nconst parts = host.split('.');\nlet platform = 'none';\nfor (let i = 0; i < parts.length - 1 && platform === 'none'; i++) platform = hosts[parts.slice(i).join('.')] ?? 'none';\nreturn { json: { link, platform, want: $json['What to write'] } };",
        "mode": "runOnceForEachItem"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        240,
        440
      ],
      "id": "f0b918be-8f4a-4a13-a732-fc95727f244f",
      "name": "Which platform"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "e9e30f04-bdb1-424b-9f0d-fc4fceb3aee5",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "youtube",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "YouTube"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "1f6d4e7d-72a6-439a-b002-945a3135ac29",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "tiktok",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "TikTok"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "47764e2c-5371-4c1d-b2dc-3bc349804356",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "instagram",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Instagram"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "a0640905-842f-470e-aeb7-77205f67406d",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "x",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "X"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "a50d7985-1dc1-428a-9c3e-ea6f199731ef",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "facebook",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Facebook"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "3c1fc410-7364-49ca-8075-9985bc8f2f2c",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "linkedin",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "LinkedIn"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "5e0d9888-5c44-49a0-9662-ed7f12aaa150",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "reddit",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Reddit"
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "renameFallbackOutput": "Not a supported link"
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        480,
        440
      ],
      "id": "68ed5c19-8b0f-4a9f-a996-4ac82677f0ed",
      "name": "By platform"
    },
    {
      "parameters": {
        "content": "## 1. Get the transcript\nThe platform's transcript operation. Captions first; speech-to-text when there are none.",
        "height": 1060,
        "width": 300,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        700,
        0
      ],
      "id": "9e517df7-aea4-4e69-9c21-ed6e91356982",
      "name": "Get"
    },
    {
      "parameters": {
        "resource": "youtube",
        "operation": "youtube.transcript",
        "url": "={{ $json.link }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        780,
        100
      ],
      "id": "a3724d02-39a3-4a33-b119-a8db90ed699f",
      "name": "YouTube transcript",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "tiktok",
        "operation": "tiktok.transcript",
        "url": "={{ $json.link }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        780,
        240
      ],
      "id": "1f0a27d2-a891-4c1e-a978-88c8f3312773",
      "name": "TikTok transcript",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "instagram",
        "operation": "instagram.transcript",
        "url": "={{ $json.link }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        780,
        380
      ],
      "id": "1c167a16-fff5-4ae8-836f-a38ced5c7a33",
      "name": "Instagram transcript",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "x",
        "operation": "x.transcript",
        "url": "={{ $json.link }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        780,
        520
      ],
      "id": "2f138c9f-f4ac-4104-be71-1539271b2c3a",
      "name": "X transcript",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "facebook",
        "operation": "facebook.transcript",
        "url": "={{ $json.link }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        780,
        660
      ],
      "id": "48a70305-8736-4e6d-8d0d-cd45bf950dae",
      "name": "Facebook transcript",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "linkedin",
        "operation": "linkedin.transcript",
        "url": "={{ $json.link }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        780,
        800
      ],
      "id": "2fb96bae-1c60-4fb6-8457-4b8e8ab4a2da",
      "name": "LinkedIn transcript",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "reddit",
        "operation": "reddit.transcript",
        "url": "={{ $json.link }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        780,
        940
      ],
      "id": "ca6220d0-ec7c-4ef4-afac-31a2b1447e14",
      "name": "Reddit transcript",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "numberInputs": 7
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1080,
        440
      ],
      "id": "3040bb4f-b66b-4f89-aff6-1818d155d82c",
      "name": "Transcript"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "has-text",
              "leftValue": "={{ $json.text }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1240,
        440
      ],
      "id": "6b5f621a-c443-4f08-a8b8-0835b13db6cf",
      "name": "Got one?"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "wants-writing",
              "leftValue": "={{ $('Which platform').first().json.want }}",
              "rightValue": "Transcript only",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1460,
        340
      ],
      "id": "f31f2b5e-bd30-4f25-87cd-f953aca67bbf",
      "name": "Write something?"
    },
    {
      "parameters": {
        "content": "## 2. Write it\nOpenAI writes what the form asked for, from the transcript only.",
        "height": 580,
        "width": 420,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1660,
        140
      ],
      "id": "5925ec78-d6bd-4f1f-90f7-65c767b65243",
      "name": "Write"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Write: {{ $('Which platform').first().json.want }}\n\nVideo: {{ $json.url }}\nLanguage: {{ $json.language || 'unknown' }}\nTranscript:\n{{ $json.text.slice(0, 60000) }}",
        "hasOutputParser": false,
        "messages": {
          "messageValues": [
            {
              "message": "You turn video transcripts into writing people can use. Work only from the transcript: never add facts it doesn't contain. Quote it exactly when you quote it. Write in the transcript's language unless it is unknown.\n- Summary and key points: a three-sentence summary, then the key points as a bulleted list in the order they come up.\n- Blog post: a title, then a post of 600 to 900 words with subheadings.\n- X thread: 5 to 8 posts of at most 280 characters each, numbered.\n- LinkedIn post: one post of 150 to 250 words with a strong first line.\nUse plain text with simple Markdown (# headings, - bullets)."
            }
          ]
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        1740,
        340
      ],
      "id": "6586e3ea-7806-4e06-9c90-693bd8744c88",
      "name": "Write it"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {
          "temperature": 0.4
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1740,
        560
      ],
      "id": "9c26165b-3e36-400e-be1f-d08d9df396d4",
      "name": "OpenAI"
    },
    {
      "parameters": {
        "jsCode": "// The page the form shows: what was written, then the transcript.\nconst esc = (s) => String(s ?? '').replace(/[&<>\"]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;' })[c]);\nconst md = (s) => {\n  let out = '';\n  let list = false;\n  for (const raw of String(s).split('\\n')) {\n    const l = raw.trim();\n    const li = l.match(/^(?:[-*•]|\\d+[.)])\\s+(.*)$/);\n    if (li) { if (!list) { out += '<ul>'; list = true; } out += '<li>' + esc(li[1]) + '</li>'; continue; }\n    if (list) { out += '</ul>'; list = false; }\n    if (!l) continue;\n    const h = l.match(/^#+\\s+(.*)$/);\n    out += h ? '<h3>' + esc(h[1]) + '</h3>' : '<p>' + esc(l) + '</p>';\n  }\n  return out + (list ? '</ul>' : '');\n};\nconst asked = $('Which platform').first().json;\nif (asked.platform === 'none') return [{ json: { html: '<h2>Not a supported link</h2><p>Paste a link to a public video on YouTube, TikTok, Instagram, X, Facebook, LinkedIn or Reddit.</p>' } }];\nconst t = $('Transcript').first().json;\nif (!t.text) return [{ json: { html: '<h2>No transcript</h2><p>' + esc(t.error || 'This video has no speech to transcribe.') + '</p>' } }];\nconst written = $('Write it').isExecuted ? $('Write it').first().json.text ?? '' : '';\n// (Results page runs once: on the fallback path the transcript nodes never ran, so it returns before reading them.)\nconst body = (written ? '<div style=\"text-align:left\">' + md(written) + '</div><hr>' : '')\n  + '<h3>Transcript</h3><div style=\"text-align:left;white-space:pre-wrap\">' + esc(t.text) + '</div>';\nreturn [{ json: { html: '<h2>' + esc(asked.want) + '</h2><p><a href=\"' + esc(t.url) + '\">' + esc(t.url) + '</a></p>' + body } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2140,
        440
      ],
      "id": "0b390c89-6bd1-4beb-8b5b-cf8ee50ae9c6",
      "name": "Results page"
    },
    {
      "parameters": {
        "operation": "completion",
        "respondWith": "showText",
        "responseText": "={{ $json.html }}"
      },
      "type": "n8n-nodes-base.form",
      "typeVersion": 1,
      "position": [
        2360,
        440
      ],
      "id": "31f87f3b-f7e6-4390-b619-43593ac23dda",
      "name": "Show the result",
      "webhookId": "6fc9faea-277a-4e82-aa69-a93ecf53716f"
    }
  ],
  "pinData": {},
  "connections": {
    "By platform": {
      "main": [
        [
          {
            "node": "YouTube transcript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "TikTok transcript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Instagram transcript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "X transcript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Facebook transcript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "LinkedIn transcript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reddit transcript",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Results page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YouTube transcript": {
      "main": [
        [
          {
            "node": "Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TikTok transcript": {
      "main": [
        [
          {
            "node": "Transcript",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Instagram transcript": {
      "main": [
        [
          {
            "node": "Transcript",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "X transcript": {
      "main": [
        [
          {
            "node": "Transcript",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Facebook transcript": {
      "main": [
        [
          {
            "node": "Transcript",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "LinkedIn transcript": {
      "main": [
        [
          {
            "node": "Transcript",
            "type": "main",
            "index": 5
          }
        ]
      ]
    },
    "Reddit transcript": {
      "main": [
        [
          {
            "node": "Transcript",
            "type": "main",
            "index": 6
          }
        ]
      ]
    },
    "OpenAI": {
      "ai_languageModel": [
        [
          {
            "node": "Write it",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Paste a video link": {
      "main": [
        [
          {
            "node": "Which platform",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Which platform": {
      "main": [
        [
          {
            "node": "By platform",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcript": {
      "main": [
        [
          {
            "node": "Got one?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Got one?": {
      "main": [
        [
          {
            "node": "Write something?",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Results page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write something?": {
      "main": [
        [
          {
            "node": "Write it",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Results page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write it": {
      "main": [
        [
          {
            "node": "Results page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Results page": {
      "main": [
        [
          {
            "node": "Show the result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}