Introducing the Instagram APIRead more →

n8n templateTikTok, Instagram and YouTube

Viral Video Scripts with n8n: TikTok, Reels and Shorts

Find the most-viewed TikToks, Instagram Reels and YouTube Shorts under a hashtag, read their transcripts and write scripts from their hooks in n8n.

Find viral TikToks, Reels and Shorts under a hashtag and turn their hooks into scripts with SocialTap and OpenAI21 nodes, 6 SocialTap nodes

The workflow in n8n: Pick a hashtag, Settings, Create table, TikTok videos, Instagram Reels, YouTube Shorts, All videos, Rank by views, By platform, TikTok transcript, Reels transcript, Shorts transcript, All transcripts, Pair with transcripts, Write the script, Rows, Save to data table, Results page and Show the scripts 1. Find thevideos2. Keep the biggest3. Read whatthey say4. Write thescripts5. Save and showPick a hashtagPick ahashtagSettingsSettingsCreate tableCreate tableTikTok videos (TikTok Hashtag Posts API)TikTokvideosInstagram Reels (Instagram Hashtag Posts API)InstagramReelsYouTube Shorts (YouTube Search API)YouTubeShortsAll videosAll videosRank by viewsRank byviewsBy platformBy platformTikTok transcript (TikTok Transcript API)TikToktranscriptReels transcript (Instagram Reels Transcript API)ReelstranscriptShorts transcript (YouTube Transcript API)ShortstranscriptAll transcriptsAlltranscriptsPair with transcriptsPair withtranscriptsWrite the scriptWrite thescriptOpenAIOpenAIScript formatScriptformatRowsRowsSave to data tableSave to datatableResults pageResults pageShow the scriptsShow thescripts
SocialTap nodeOther n8n nodeStepOpen as image

Turn viral short videos into scripts for your brand

Give it a hashtag. It finds the most-viewed TikToks, Instagram Reels and YouTube Shorts under it, reads what each one says, and writes you a script that reuses the hook that made it work.

How it works

  1. The form takes a hashtag, a minimum view count, how recent and your brand.
  2. SocialTap gets the hashtag's videos from TikTok, Instagram and YouTube with their view counts.
  3. Videos above your minimum, posted in your window, are ranked by views per day, each platform's best in turn.
  4. SocialTap gets each one's transcript (speech-to-text when it has no captions).
  5. OpenAI names the hook, the format and why it worked, then writes your script.
  6. Rows are saved to the Viral scripts data table and shown when the form finishes.

TikTok's hashtag page lists its all-time top videos, so a short window mostly returns Reels and Shorts.

Setup

  • 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
  • Add a SocialTap API credential: create a free account and paste its API key. Each operation shows its price, and failed requests are free.
  • Add an OpenAI credential to the model node.
  • Open the form's URL and submit.

Customization

  • Change the platforms by removing a SocialTap node.
  • Swap the data table for Google Sheets or Notion.
  • Edit the prompt in Write the script to match your voice.

The SocialTap operations it runs

Each SocialTap node is one request to its endpoint, with your API key. Failed requests are free.

Get the API key this workflow needs.

Create a free account, paste the key into the SocialTap credential and run it.

100free credits
  • No credit card
  • Failed requests are free
  • Works on all 310 endpoints
Start for free Read the docs