π¬ Generate YouTube, Reels, and TikTok scripts from one topic with GPT-4o-mini, Google Sheets, and Gmail
β‘ 223 views Β· π¬ Content Creation & Video
π‘ Pro Tip β Since TikTok doesnβt have a public API, getting data usually means fragile HTTP scraping. ScraperNode is a community node that gives you clean JSON for TikTok profiles, videos, and comments β drop it into your workflow and skip the parsing.
Description
Description
Submit one video topic using a simple form and GPT-4o-mini generates three platform-ready scripts in a single AI call. You get a structured 700β900 word YouTube long-form script, a fast-paced 100β130 word Instagram Reels script with visual cues, and a punchy 50β70 word TikTok script that ends with a comment question. All three scripts are logged to Google Sheets and delivered to your inbox in one email ready to record. Built for content creators, social media managers, and marketing agencies who want to repurpose one topic across three platforms without writing anything manually.
What This Workflow Does
- Generates all three scripts in one API call β YouTube, Instagram Reels, and TikTok are written simultaneously by a single GPT-4o-mini request so you get all three in seconds
- Writes platform-specific script formats β YouTube gets a structured long-form script with intro, three main points, and conclusion; Reels gets visual cues in brackets; TikTok gets one punchy idea ending with a comment question
- Includes a hook for every platform β Each script starts with a standalone attention-grabbing opening line under 20 words, ready to use as the first thing you say on camera
- Adds platform-appropriate CTAs β YouTube asks to subscribe and comment, Instagram Reels asks to save and follow, TikTok asks to follow for more β automatically matched to each platform
- Attaches 8 hashtags per platform β Each script includes 8 relevant hashtags with a mix of broad and niche tags specific to your industry
- Logs all three scripts to Google Sheets β Appends one row per platform β three rows per submission β with hook, script, CTA, tags, and metadata
- Sends all three scripts in one Gmail β All three platforms arrive in a single clearly sectioned plain-text email ready to copy and record
Setup Requirements
Tools Needed
- n8n instance (self-hosted or cloud)
- OpenAI account with GPT-4o-mini API access
- Google Sheets (one sheet with a tab named Video Scripts)
- Gmail account (the account you want to receive the scripts)
Credentials Required
- OpenAI API key
- Google Sheets OAuth2
- Gmail OAuth2
Estimated Setup Time: 10β15 minutes
Step-by-Step Setup
-
Import the workflow β Open n8n β Workflows β Import from JSON β paste the workflow JSON β click Import
-
Fill in Config Values β Open node 2. Set β Config Values β replace all three placeholders:
| Field | What to enter |
|---|---|
PASTE_YOUR_GOOGLE_SHEET_ID_HERE | The ID from your Google Sheet URL (the string between /d/ and /edit) |
PASTE_YOUR_EMAIL_HERE | The email address where the three scripts should be sent |
PASTE_YOUR_NAME_HERE | Your name for the email greeting and sign-off |
-
Connect OpenAI β Open node 4. OpenAI β GPT-4o-mini Model β click the credential dropdown β add your OpenAI API key β test the connection
-
Create your Google Sheet tab β Open your Google Sheet β add a tab named exactly Video Scripts β add these 9 column headers in row 1:
Date,Topic,Platform,Script Length,Hook,Script,CTA,Tags,Submitted By -
Connect Google Sheets β Open node 7. Google Sheets β Log Video Scripts β click the credential dropdown β add Google Sheets OAuth2 β sign in with your Google account β authorize access
-
Connect Gmail β Open node 10. Gmail β Send Scripts Email β click the credential dropdown β add Gmail OAuth2 β sign in with the Gmail account that matches your email address β authorize access
-
Activate the workflow β Toggle the workflow to Active β copy the Form URL from node 1. Form β Multi-Platform Video Topic β open it in a browser to submit your first topic
How It Works (Step by Step)
Step 1 β Form: Multi-Platform Video Topic You open the form URL in a browser and fill in five fields: the video topic, target audience, your niche or industry, tone of voice (optional, defaults to βeducational and engagingβ), and your name. Submitting the form starts the workflow.
Step 2 β Set: Config Values Your Google Sheet ID, recipient email, sender name, and all five form inputs are stored here. Todayβs date is auto-generated. Tone of voice defaults to βeducational and engagingβ if left blank on the form. Your niche is passed to the AI so all three scripts are personalized for your industry.
Step 3 β AI Agent: Write 3 Platform Scripts
GPT-4o-mini receives the video topic, target audience, niche, and tone. In one call it generates all three scripts simultaneously. The YouTube script is 700β900 words with intro, three main points, and conclusion. The Instagram Reels script is 100β130 words, fast-paced, with visual cues in brackets (e.g. [hold up phone]). The TikTok script is 50β70 words, covers one idea only, and ends with a question for viewers to answer in the comments. Every script includes a hook, full spoken script, platform-specific CTA, and 8 hashtags.
Step 4 β OpenAI: GPT-4o-mini Model This is the language model powering the script generation. It runs at temperature 0.7 for natural, varied language and is capped at 2,500 tokens to comfortably fit all three scripts in one response.
Step 5 β Parser: Structured Scripts Output
This step enforces the exact nested schema GPT-4o-mini must return: a top-level object with three keys (youtube, reels, tiktok), each containing four fields (hook, script, cta, tags). All twelve fields are validated before any logging or emailing begins.
Step 6 β Code: Split Scripts for Sheets
The three-platform object is converted into three separate rows β one for YouTube, one for Instagram Reels, one for TikTok β so each can be written to Google Sheets as its own row. An isLastRow flag is set to true only on the TikTok row (the third). The full scripts object is attached to the TikTok row only, so the email builder has all three scripts available when it fires.
Step 7 β Google Sheets: Log Video Scripts Each of the three rows is appended to your Video Scripts tab. All 9 columns are populated: date, topic, platform, script length label, hook, full script, CTA, tags as a space-separated hashtag string, and submitter name.
Step 8 β IF: All Scripts Logged?
After each row is written, this check reads the isLastRow flag. If true (YES path β the TikTok row was the last one), the workflow moves to build and send the Gmail. If false (NO path β the YouTube or Reels row was just logged), the workflow routes to 11. Set β More Scripts and the loop continues to the next row.
Step 9 β Code: Build Email The full scripts object (carried on the TikTok row) is used to build one complete email. The body is organized into three clearly labeled sections β YOUTUBE, INSTAGRAM REELS, and TIKTOK β each with hook, script, CTA, and tags. The email subject includes the video topic and todayβs date.
Step 10 β Gmail: Send Scripts Email The complete email is sent to your configured address with no attribution footer. All three platform scripts arrive in one clean message organized by section, ready to copy and record.
Step 11 β Set: More Scripts This step handles non-final rows (YouTube and Reels) during the logging loop. It sets a brief in-progress message and the loop continues to the next row.
Key Features
β
All three scripts in one GPT call β One API request generates YouTube, Reels, and TikTok simultaneously β faster and cheaper than three separate calls
β
Visual cues built into the Reels script β Instagram Reels includes on-screen action prompts in brackets so you know exactly what to do in front of the camera
β
TikTok ends with a comment prompt β Every TikTok script closes with a specific question designed to drive comments β built into the prompt structure, not added manually
β
Niche personalization across all three β Your industry is passed to GPT so the examples, language, and hashtags are relevant to your actual audience on every platform
β
Gmail fires exactly once β The isLastRow flag ensures you receive one email with all three scripts after all three rows are logged β never one email per platform
β
Structured output enforced β A nested schema parser validates all 12 fields across three platforms before any logging or emailing begins
β
Permanent script library in Sheets β Every submission adds three rows to your Video Scripts tab β over time you build a searchable library of scripts organized by topic and platform
β
Tone defaults to educational if blank β Leaving the Tone of Voice field empty on the form triggers a sensible default instead of failing the workflow
Customisation Options
Add a fourth platform β LinkedIn β In node 3. AI Agent β Write 3 Platform Scripts, edit the prompt to request a fourth platform object with a linkedin key β a 150β200 word professional text post β and update the schema parser in node 5 to require it.
Change the YouTube script length β In node 3. AI Agent β Write 3 Platform Scripts, change the youtube script instruction from β700 to 900 wordsβ to a longer or shorter target β and update maxTokens in node 4. OpenAI β GPT-4o-mini Model from 2500 to accommodate longer output.
Send scripts to a Slack channel β After node 10. Gmail β Send Scripts Email, add a Slack step that posts the video topic, all three hooks, and a note that scripts are ready to a #content-team channel so your team sees new scripts without checking email.
Log to separate sheet tabs per niche β In node 2. Set β Config Values, make sheetName dynamic using the niche value (e.g. Video Scripts β Legal Marketing) so different niche batches automatically sort into their own dedicated tabs.
Add a Google Docs save for each script β After node 7. Google Sheets β Log Video Scripts, add a Google Docs create step that saves each platformβs full script as its own document in a Drive folder β giving you editable individual files alongside the sheet log.
Troubleshooting
Form submission not starting the workflow:
- Confirm the workflow is Active β inactive workflows do not receive form submissions
- Copy the Form URL fresh from node 1. Form β Multi-Platform Video Topic after activating β URLs copied before activation will not work
- Make sure Video Topic, Target Audience, and Your Niche or Industry are all filled in β these three fields are required
GPT not returning all three scripts:
- Confirm the API key is connected in node 4. OpenAI β GPT-4o-mini Model and your account has available credits
- Check the execution log of node 3. AI Agent β Write 3 Platform Scripts for the raw GPT response
- If the schema parser in node 5. Parser β Structured Scripts Output throws an error, one or more platforms have missing fields β re-run the submission to see if it is consistent, or increase
maxTokensfrom 2500 to 3000 in node 4
Google Sheets not logging all three rows:
- Confirm the Google Sheets OAuth2 credential in node 7. Google Sheets β Log Video Scripts is connected and not expired β re-authorize if needed
- Check that
PASTE_YOUR_GOOGLE_SHEET_ID_HEREin node 2. Set β Config Values is replaced with your actual sheet ID from the URL - Confirm the tab is named Video Scripts exactly and all 9 column headers in row 1 match exactly:
Date,Topic,Platform,Script Length,Hook,Script,CTA,Tags,Submitted By
Gmail not arriving after all three rows are logged:
- Confirm the Gmail OAuth2 credential in node 10. Gmail β Send Scripts Email is connected and authorized
- Check that
PASTE_YOUR_EMAIL_HEREin node 2. Set β Config Values is replaced with your actual email address - Check the execution log of node 8. IF β All Scripts Logged? to confirm
isLastRowreached true β if it never fires YES, the TikTok row may have failed to process correctly - Check your spam or promotions folder on the first send
Email arrives but scripts are missing or empty:
- The
allScriptsobject is only carried on the TikTok (third) row β if the TikTok row failed to log, the email builder will receive a null object and throw an error - Check node 6. Code β Split Scripts for Sheets execution log to confirm
isLastRowwas set correctly on the third item andallScriptsis not null
Support
Need help setting this up or want a custom version built for your team or agency?
π§ Email: info@isawow.com π Website: https://isawow.com/
π Nodes Used
Google Sheets, Gmail, AI Agent, OpenAI Chat Model, Structured Output Parser, n8n Form Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File