AutomationFlowsAI & RAG › Generate Viral Instagram Scripts from Trending Reels

Generate Viral Instagram Scripts from Trending Reels

Original n8n title: Generate Viral Instagram Scripts by Analyzing Trending Reels with Apify and Gpt-4

ByNitin Dixit @growthdesignstudio on n8n.io

This n8n template demonstrates how to leverage AI to analyze trending short-form video content and automatically generate original, high-engagement video scripts inspired by proven viral formats.

Event trigger★★★★☆ complexityAI-powered19 nodesForm TriggerHTTP RequestGoogle SheetsAgentOpenAI ChatGmail
AI & RAG Trigger: Event Nodes: 19 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Agent → Form Trigger 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
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "831e0095-3e8b-42f6-9e90-12919fe7f132",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        160,
        -16
      ],
      "parameters": {
        "options": {},
        "formTitle": "Viral Trending Reels Script Generator",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Hashtag",
              "placeholder": "aiautomation",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "number of reels to scrape",
              "placeholder": "20",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Enter details below to get complete ready to shoot video reel scripts from Instagram"
      },
      "typeVersion": 2.3
    },
    {
      "id": "5c57a174-f51e-404d-a847-9330efaa23cc",
      "name": "Scrape Hashtag",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        -16
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/reGe1ST3OBgYZSsZJ/run-sync-get-dataset-items",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "jsonBody": "={\n  \"hashtags\": [\n    \"{{ $json.Hashtag }}\"\n  ],\n  \"keywordSearch\": false,\n  \"resultsLimit\": {{ $json['number of reels to scrape'] }},\n  \"resultsType\": \"stories\"\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer [your api key]"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f666f6d0-818d-4f80-91bf-8f9963f49a56",
      "name": "Filter out from list",
      "type": "n8n-nodes-base.filter",
      "position": [
        608,
        -16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "68cb54ea-e865-4720-b17c-9ebd3337c742",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.likesCount }}",
              "rightValue": 1000
            },
            {
              "id": "ce4409ee-284c-462d-94aa-c8b5da74fc2c",
              "operator": {
                "type": "dateTime",
                "operation": "before"
              },
              "leftValue": "={{ $json.timestamp.toDateTime() }}",
              "rightValue": "={{ $now.minus({ days: 7 }) }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "21953832-59b0-4d6f-a580-d2099871039e",
      "name": "Add to the sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        880,
        -16
      ],
      "parameters": {
        "columns": {
          "value": {
            "url": "={{ $json.url }}",
            "caption": "={{ $json.caption }}",
            "songName": "={{ $json.musicInfo.song_name }}",
            "thumbnail": "={{ $json.displayUrl }}",
            "timestamp": "={{ $json.timestamp.toDateTime() }}",
            "likesCount": "={{ $json.likesCount }}",
            "download url": "={{ $json.videoUrl }}",
            "commentsCount": "={{ $json.commentsCount }}",
            "ownerFullName": "={{ $json.ownerFullName }}",
            "ownerUsername": "=@{{ $json.ownerUsername }}",
            "primaryHashtag": "={{ $('On form submission').item.json.Hashtag }}"
          },
          "schema": [
            {
              "id": "primaryHashtag",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "primaryHashtag",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ownerFullName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ownerFullName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ownerUsername",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ownerUsername",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentsCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "commentsCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "likesCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "likesCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "timestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnail",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "thumbnail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "download url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "download url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "songName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "songName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Transcript",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Transcript",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI Generated Inspired Script",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI Generated Inspired Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk/edit?usp=drivesdk",
          "cachedResultName": "Viral Reel Script Generator"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "29d5b354-e86a-4bb6-a341-46c7cb8575ec",
      "name": "Transcribe Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        432,
        416
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/CVQmx5Se22zxPaWc1/run-sync-get-dataset-items",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "jsonBody": "={\n    \"start_urls\": \"{{ $json.url }}\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer [your api key]"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f32760f4-af01-4458-91a1-37fc9728af87",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        96,
        400
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "6eddfe4e-bc88-4787-afd0-82059d7815b4",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        560,
        864
      ],
      "parameters": {
        "text": "={{ $json.Transcript }}",
        "options": {
          "systemMessage": "You are an AI Video Script Creator trained to craft high-retention, short-form video scripts for platforms like Instagram Reels, TikTok, and YouTube Shorts.\n\n## Objective\nAnalyze the given **trending video transcript** and extract its underlying structure \u2014 including pacing, tone, character dialogue style, pattern of curiosity, punchlines, and CTA timing. Then, generate **one unique and original script** that follows the same engagement structure but uses a new topic or use case.\n\n## Guidelines\n- **Do not copy** or reuse sentences from the input transcript. Only mirror its structure and energy.\n- Maintain **natural dialogue flow** between characters or narrator(s).\n- Keep **each line short** (1\u20132 sentences max) for easy reading and caption syncing.\n- Include **timestamps or pacing cues** in brackets (e.g., [0.00\u20131.00s]) to reflect rhythm.\n- Build **curiosity early**, deliver rapid **value moments**, and end with a **clear call-to-action**.\n- Use **modern, relatable, and scroll-stopping hooks**.\n- Keep tone **conversational, fast-paced, and Gen-Z/social-media friendly**.\n- If the source transcript includes humor, surprise, or banter \u2014 preserve that emotional pattern in the new script.\n\n## Output Format\nReturn only the new **video script**, structured with approximate timestamps and speaker labels where relevant.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "475968cd-7471-4ff0-97ea-d2598652b91f",
      "name": "If error",
      "type": "n8n-nodes-base.if",
      "position": [
        624,
        416
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "74c3ceaf-5166-417e-b67d-7fa06beaafb3",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.transcript }}",
              "rightValue": "no speech found (unexpected error)"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "749cc8ee-21ff-4874-aa32-700a4ec04b2f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        560,
        1072
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c81d904e-91fe-4451-80ed-645056a9027b",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        336,
        1264
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n  <title>AI Script Report</title>\n  <style>\n    body {\n      background-color: #f8fafc;\n      font-family: \"Inter\", sans-serif;\n      color: #111827;\n      margin: 0;\n      padding: 40px;\n    }\n    .container {\n      background: #ffffff;\n      max-width: 500px;\n      margin: 0 auto;\n      padding: 30px;\n      border-radius: 16px;\n      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n      text-align: center;\n    }\n    h1 {\n      font-size: 22px;\n      margin-bottom: 10px;\n      color: #111827;\n    }\n    .count {\n      font-size: 48px;\n      font-weight: 700;\n      color: #2563eb;\n      margin: 15px 0;\n    }\n    .message {\n      font-size: 16px;\n      color: #374151;\n    }\n    .footer {\n      margin-top: 25px;\n      font-size: 12px;\n      color: #9ca3af;\n    }\n  </style>\n</head>\n<body>\n  <div class=\"container\">\n    <h1>AI Script Generation Report</h1>\n    <div class=\"count\">{{ $json.count_AI_Generated_Inspired_Script }}</div>\n    <div class=\"message\">\n      Scripts generated successfully from your latest workflow run!\n    </div>\n    <div class=\"footer\">\n      Powered by n8n \u2022 AI Automation Workflow\n    </div>\n  </div>\n</body>\n</html>\n",
        "options": {
          "appendAttribution": false
        },
        "subject": "\ud83d\ude80 All Scripts Generated \ud83d\udc4b"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "148470d5-b44b-4913-a47a-cba24b9f35b2",
      "name": "Summarize",
      "type": "n8n-nodes-base.summarize",
      "position": [
        160,
        1264
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "AI Generated Inspired Script"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "d0c118d8-f300-4525-869e-cec141d55b8b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -32
      ],
      "parameters": {
        "color": 6,
        "width": 384,
        "height": 528,
        "content": "## AI Reel Writer\n### How it works\n1. Scrapes reels from a given hashtag\n2. Filters out trending reels from it\n3. Add to the google sheet\n4. Transcribe videos\n5. AI agent analyses and writes a unique script from it using the same proven structure.\n\n### Requirements\n- Apify API key - [Create Free Account](https://apify.com?fpr=eg224f)\n- Google Sheet - [Make a copy of this](https://docs.google.com/spreadsheets/d/1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk/edit?usp=sharing)\n- Gmail (Optional step)\n\n## Steps to Setup\n1. Update API Keys of Apify in the 'Scrape Hashtag' & 'Transcribe Video' nodes\n2. Update Google Sheet saved in your google account in the 'Add to the sheet', 'Update sheet' and 'Add AI Script' nodes.\n3. You're good to go."
      },
      "typeVersion": 1
    },
    {
      "id": "c8c8d6cb-da8b-46cb-80a4-1424b8bd6dc8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 1056,
        "height": 336,
        "content": "## Step 1: Scrape Hashtags\n- Scrape given hashtag from n8n form\n- Filters our trending ones\n- Add to the google sheet"
      },
      "typeVersion": 1
    },
    {
      "id": "1132d737-670f-41d5-9094-d964e9c35910",
      "name": "Add AI script",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        912,
        864
      ],
      "parameters": {
        "columns": {
          "value": {
            "url": "={{ $('Update sheet').item.json.url }}",
            "AI Generated Inspired Script": "={{ $json.output }}"
          },
          "schema": [
            {
              "id": "primaryHashtag",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "primaryHashtag",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ownerFullName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ownerFullName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ownerUsername",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ownerUsername",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentsCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "commentsCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "likesCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "likesCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "timestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnail",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "thumbnail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "download url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "download url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "songName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "songName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Transcript",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Transcript",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI Generated Inspired Script",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "AI Generated Inspired Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "url"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk/edit?usp=drivesdk",
          "cachedResultName": "Viral Reel Script Generator"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e043ad0e-8616-4cfa-8a48-51c77b5a4deb",
      "name": "Update sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        336,
        864
      ],
      "parameters": {
        "columns": {
          "value": {
            "url": "={{ $json.sourceUrl }}",
            "Transcript": "={{ $json.transcript }}"
          },
          "schema": [
            {
              "id": "primaryHashtag",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "primaryHashtag",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ownerFullName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ownerFullName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ownerUsername",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ownerUsername",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentsCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "commentsCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "likesCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "likesCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "timestamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "timestamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "thumbnail",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "thumbnail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "download url",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "download url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "songName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "songName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Transcript",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Transcript",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "AI Generated Inspired Script",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "AI Generated Inspired Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "url"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1XupKy-R6zPvCfeh5q9co5O-wPMI64D7xvavFkz0yQqk/edit?usp=drivesdk",
          "cachedResultName": "Viral Reel Script Generator"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "0c37e2fc-402a-468c-9ac2-b700f88f697f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        288
      ],
      "parameters": {
        "color": 7,
        "width": 784,
        "height": 336,
        "content": "## Step 2: Transcribe Video\n- Transcribe all the videos one by one\n- Add the scripts in the sheet"
      },
      "typeVersion": 1
    },
    {
      "id": "f99c5852-87ad-40b7-b996-30c7f889de5b",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        864,
        400
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e8ce96ea-4f35-4ca9-83b3-cec30e223275",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        736
      ],
      "parameters": {
        "color": 7,
        "width": 784,
        "height": 336,
        "content": "## Step 3: Analyse and Rewrite\n- AI analyses each script and rewrites in the same emotional tone and narrative structure while creating entirely new storylines\n- New AI Script added to the sheet"
      },
      "typeVersion": 1
    },
    {
      "id": "81e28863-b0fd-440b-aee5-f851b37dc96b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        1120
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 320,
        "content": "## Step 4: Final Reporting\n- Counts all the successful scripts\n- Sends to the gmail inbox"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Transcribe Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Add AI script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If error": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update sheet": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add AI script": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Hashtag": {
      "main": [
        [
          {
            "node": "Filter out from list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Summarize",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Transcribe Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add to the sheet": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe Video": {
      "main": [
        [
          {
            "node": "If error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Scrape Hashtag",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter out from list": {
      "main": [
        [
          {
            "node": "Add to the sheet",
            "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 n8n template demonstrates how to leverage AI to analyze trending short-form video content and automatically generate original, high-engagement video scripts inspired by proven viral formats.

Source: https://n8n.io/workflows/10303/ — 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

The workflow runs every hour with a randomized delay of 5–20 minutes to help distribute load. It records the exact date and time a lead is emailed so you can track outreach. Follow-ups are automatical

Google Sheets, Agent, OpenAI Chat +5
AI & RAG

This n8n workflow automates turning short user ideas into production-ready real-estate marketing assets (photorealistic images and optional 360° videos). A form submission seeds a prompt board → an LL

Form Trigger, Google Sheets, Agent +6
AI & RAG

Transform your manual hiring process into an intelligent evaluation system that saves 15-20 minutes per candidate! This workflow automates the entire candidate assessment pipeline - from CSV/XLSX uplo

Form Trigger, Google Sheets, Google Drive +8
AI & RAG

This workflow automates the entire Calendly onboarding and offboarding process for company users. It relies on form submissions, Google Sheets as a source of truth, AI-generated HR emails, man-in-the-

OpenAI Chat, Google Sheets, Form Trigger +4
AI & RAG

This n8n workflow is designed for e-commerce businesses, digital marketers, and content creators who want to automatically generate professional 3D product videos from product images. It's perfect for

Form Trigger, Google Drive, HTTP Request +9