Apify + Google Sheets: Instagram scripts ready to post
Scrolling competitor Reels “for research” feels productive… until you realize you’ve burned an hour and still have no script you can actually post. Then you start over tomorrow. Same tabs, same guessing, same messy notes.
This Instagram script automation hits content marketers first, but founders and agency leads feel it too. You need a reliable way to turn what’s trending into original scripts in your voice, without living inside Instagram all day.
This workflow uses Apify, Google Sheets, and OpenAI to pull trending Reels, transcribe what’s working, research the tools mentioned, and draft fresh scripts ready for your next post. You’ll see how it works, what you need, and what to watch out for.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Apify + Google Sheets: Instagram scripts ready to post
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Run Actor Synchronously"]
n1@{ icon: "mdi:cog", form: "rounded", label: "Limit", pos: "b", h: 48 }
n2@{ icon: "mdi:robot", form: "rounded", label: "Filter & Generate Suggestions", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Search for Entries", pos: "b", h: 48 }
n4["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/merge.svg' width='40' height='40' /></div><br/>Drop Duplicates"]
n5@{ icon: "mdi:database", form: "rounded", label: "Add Entries", pos: "b", h: 48 }
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Download Video"]
n7@{ icon: "mdi:robot", form: "rounded", label: "Transcribe Video", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Search Perplexity"]
n9@{ icon: "mdi:robot", form: "rounded", label: "Write New Script", pos: "b", h: 48 }
n10@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n11@{ icon: "mdi:database", form: "rounded", label: "Update Entries", pos: "b", h: 48 }
n1 --> n3
n1 --> n4
n5 --> n6
n6 --> n7
n4 --> n5
n10 --> n0
n7 --> n2
n9 --> n11
n8 --> n9
n3 --> n4
n0 --> n1
n2 --> n8
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n10 trigger
class n2,n7,n9 ai
class n3,n5,n11 database
class n0,n6,n8 api
classDef customIcon fill:none,stroke:none
class n0,n4,n6,n8 customIcon
The Problem: Trend Research Eats the Time You Need to Post
Keeping up with trending Instagram Reels sounds simple until you do it consistently. You check a few competitor accounts, open a Reel, try to capture the hook, maybe write down the CTA, then you forget where you saw it. Next you hunt for the tool they mentioned, but the caption is vague, comments are noisy, and the “one quick idea” turns into a rabbit hole. Then there’s the worst part: you do all that work and still end up with a script that doesn’t match your voice, so you rewrite it from scratch anyway.
It adds up fast. Here’s where it usually breaks down.
- Manual competitor monitoring turns into daily scrolling that can easily cost about 5 hours a week.
- You lose track of what you already “processed,” which means you repeat research or accidentally recycle the same idea.
- Transcribing hooks and structure by hand is slow, and small mistakes change the meaning.
- Tool research is scattered across tabs, so sources don’t get logged and claims can’t be checked later.
The Solution: Apify Finds Reels, AI Turns Them Into New Scripts
This workflow runs on a schedule and automatically watches the Instagram accounts you care about. It pulls new Reels data from Apify, limits the batch so you’re not processing hundreds at once, then checks your Google Sheet to see what’s already been handled. New items get appended to the sheet for tracking, and the workflow downloads the Reel video so it can extract the audio and transcribe it with OpenAI. From there, AI analyzes the transcript to spot the tools, technologies, and monetizable angles, then Perplexity is queried for extra context and sources. Finally, OpenAI generates a brand-voice script you can film, and the workflow writes that new script back into Google Sheets alongside the original info.
The workflow starts with a scheduled pull from Apify. After deduping against your “Reels” sheet, it transcribes the Reel, researches the tools mentioned, then generates an original script and logs it back to the same row. One sheet becomes your running content pipeline.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you track 10 competitor accounts and aim to publish 5 reels a week. Manually, it’s easy to spend about 15 minutes per account just to “check what’s new” (around 2.5 hours), then another 20 minutes per chosen reel to transcribe, research, and outline (about 1.5 hours). With this workflow, you set the schedule, let it process a small batch automatically, and you come back to Google Sheets with 5 drafted scripts plus sources. Your hands-on time becomes a quick review and minor edits, not a research marathon.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Apify to scrape competitor Reels datasets
- Google Sheets to store IDs, transcripts, scripts
- OpenAI API key (get it from the OpenAI API dashboard)
Skill level: Intermediate. You’ll connect a few accounts, paste API keys, and confirm your Google Sheet headers match the workflow’s expectations.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A schedule kicks it off. n8n runs daily (or however you set it) and triggers an Apify dataset fetch for the Instagram accounts you’re monitoring.
New items are separated from repeats. The workflow limits how many Reels it processes per run, looks up existing rows in Google Sheets, then merges on the id column so anything already handled gets dropped.
The Reel becomes usable text and context. For each fresh Reel, it downloads the video, transcribes the audio with OpenAI, then analyzes the transcript to identify tools, technologies, and angles worth repurposing. Perplexity is queried next to pull extra details you can reference or sanity-check.
A new script is generated and logged. OpenAI drafts your “newTranscript” in your style, and n8n writes it back into the same Google Sheets row so your pipeline stays organized.
You can easily modify the competitor account list and filtering criteria to match your niche. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Scheduled Trigger
Set when the workflow runs and kick off the data collection from Apify.
- Add and open Scheduled Run Trigger.
- Set the schedule rule to run daily at
triggerAtHour: 6. - Connect Scheduled Run Trigger to Apify Dataset Fetch.
Step 2: Connect Apify Fetching and Item Limiting
Pull a batch of reels from Apify and limit processing to the most recent items.
- In Apify Dataset Fetch, set URL to
https://api.apify.com/v2/acts/xMc5Ga1oCONPmWJIa/run-sync-get-dataset-itemsand Method toPOST. - Enable Send Body and Send Headers, then set JSON Body to the provided payload (usernames list and
"resultsLimit": 5). - In Header Parameters, keep
Accept: application/jsonand replaceAuthorization: Bearer [CONFIGURE_YOUR_TOKEN]with your Apify API token. - Open Restrict Items and set Keep to
lastItemsand Max Items to2. - Connect Apify Dataset Fetch → Restrict Items.
Restrict Items outputs to both Lookup Sheet Records and Remove Duplicate Items in parallel.
[CONFIGURE_YOUR_TOKEN], the request will fail with a 401 error.Step 3: Connect Google Sheets for De-duplication and Appends
Check if the reel already exists and only append new items to your sheet.
- In Lookup Sheet Records, select Document
Instagram Reel Databaseand SheetReels. - Set the filter to lookupColumn
idand lookupValue to{{ $json.id }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Lookup Sheet Records.
- In Remove Duplicate Items, set Mode to
combine, Join Mode tokeepNonMatches, and Fields To Match toid. - In Append Sheet Rows, set Operation to
appendand map columns to expressions like{{ $json.id }},{{ $json.url }},{{ $json.videoUrl }}, and{{ $json.likesCount }}(use the full mapping list from the node). - Credential Required: Connect your googleSheetsOAuth2Api credentials in Append Sheet Rows.
- Connect Lookup Sheet Records → Remove Duplicate Items and Remove Duplicate Items → Append Sheet Rows.
Reels sheet and is unique to avoid mismatched updates.Step 4: Fetch Video and Transcribe Audio
Download the reel video and generate a transcript for analysis.
- In Fetch Reel Video, set URL to
{{ $json.videoUrl }}. - Connect Append Sheet Rows → Fetch Reel Video → Audio Transcription.
- In Audio Transcription, set Resource to
audioand Operation totranscribe. - Credential Required: Connect your openAiApi credentials in Audio Transcription.
Step 5: Analyze, Research, and Generate the New Script
Use AI to determine relevance, enrich with research, and craft a new script.
- In Analyze Transcript, select model
gpt-4o, keep JSON Output enabled, and ensure the transcript input uses{{ $json.text }}. - Credential Required: Connect your openAiApi credentials in Analyze Transcript.
- In Query Perplexity, set URL to
https://api.perplexity.ai/chat/completions, Method toPOST, and keep the JSON Body that uses{{ $json.message.content.searchPrompt }}. - Replace the Perplexity Authorization header
Bearer [CONFIGURE_YOUR_TOKEN]with your API token. - In Generate New Script, keep JSON Output enabled and ensure the message inputs reference:
{{ $('Analyze Transcript').item.json.message.content.tools.join() }},{{ $('Audio Transcription').all().first().json.text }}, and{{ $json.choices[0].message.content }}. - Credential Required: Connect your openAiApi credentials in Generate New Script.
- Connect Audio Transcription → Analyze Transcript → Query Perplexity → Generate New Script.
verdict: false, downstream prompts may be empty. Handle this by ensuring your transcript quality is good.Step 6: Update the Sheet with Results
Write the final script and transcript back into the Google Sheet.
- Open Modify Sheet Rows and set Operation to
update. - Map id to
{{ $('Append Sheet Rows').item.json.id }}, newTranscript to{{ $json.message.content.script }}, and scrapedTranscript to{{ $('Audio Transcription').item.json.text }}. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Modify Sheet Rows.
- Connect Generate New Script → Modify Sheet Rows.
Step 7: Test and Activate Your Workflow
Validate the full run, then enable it for scheduled automation.
- Click Execute Workflow to run the flow manually from Scheduled Run Trigger.
- Confirm new rows appear in the
Reelssheet and that scrapedTranscript and newTranscript columns are updated by Modify Sheet Rows. - Check the output of Query Perplexity and Generate New Script for valid JSON structure.
- Toggle the workflow to Active so it runs on the scheduled interval.
Common Gotchas
- Google Sheets credentials can expire or need specific permissions. If things break, check the n8n credential connection and the target spreadsheet sharing settings first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- OpenAI prompts are generic by default. Add your brand voice early (examples, banned phrases, CTA style), or you will be editing outputs forever.
Frequently Asked Questions
About 1–2 hours if your accounts and sheet are ready.
No. You’ll connect Apify, Google Sheets, and OpenAI, then paste a few IDs and keys.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in API usage; this workflow is often around $30/month for OpenAI and Perplexity depending on how many Reels you process.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you should. Swap the competitor usernames in the Apify fetch step, then adjust the “Analyze Transcript” and “Generate New Script” prompts to match your niche, your offer, and your CTA style. Many teams also tighten the filtering so only Reels mentioning specific tools or workflows make it into the sheet. If you want a different destination, you can replace the final “Modify Sheet Rows” write-back with Google Docs for long-form scripts.
Usually it’s OAuth permissions or the spreadsheet ID changed. Reconnect the Google Sheets credential in n8n, confirm the target file is shared with the same Google account, and double-check the sheet tab is actually named “Reels.” Also make sure your header row matches the required columns (especially id), because missing headers can look like a “connection” issue when it’s really a write error.
It depends mostly on your n8n plan and how hard you cap each run with the Limit step.
Often, yes, because this pipeline needs deduping logic, file downloads, transcription, and multi-step AI work in one run. n8n handles branching and merges cleanly, and self-hosting avoids per-task pricing when you scale. Zapier or Make can work if you’re only logging links to a sheet, but the moment you add “download video, transcribe, analyze, research, then generate,” it gets clunky and expensive. Frankly, the biggest win is control: you can see every step and tweak it without rebuilding five separate zaps. Talk to an automation expert if you want help choosing the simplest stack for your volume.
Once this is running, your “research” turns into a living script library that updates itself. The workflow handles the repetitive stuff. You handle the creative decisions that actually move the channel.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.