Apify to Google Sheets, qualified Instagram leads
Manual Instagram lead research is a time sink. You copy usernames from hashtag posts, open profiles one-by-one, guess who’s relevant, and still end up with a messy list you don’t trust.
This Instagram lead automation hits growth marketers first, but founders and agency operators feel it too. When you’re doing outreach, you need a clean, qualified sheet, not a pile of “maybe” profiles.
This workflow pulls hashtags from Google Sheets, uses Apify to collect real profiles from Instagram hashtag posts, then filters, dedupes, and qualifies leads by language and follower range. You’ll see how it works, what you need, and where teams usually get stuck.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Apify to Google Sheets, qualified Instagram leads
flowchart LR
subgraph sg0["When clicking ‘Execute workflow’ Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "When clicking ‘Execute workf..", pos: "b", h: 48 }
n1["<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/code.svg' width='40' height='40' /></div><br/>make hashtag links"]
n2["<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/>Scrape instagram hashtag posts"]
n3@{ icon: "mdi:swap-horizontal", form: "rounded", label: "IF — Hashtags Only", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "IF — English Only", pos: "b", h: 48 }
n5@{ icon: "mdi:cog", form: "rounded", label: "Aggregate Hashtags", 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/code.svg' width='40' height='40' /></div><br/>Format captions, usernames a.."]
n7@{ icon: "mdi:cog", form: "rounded", label: "Combine all usernames", pos: "b", h: 48 }
n8@{ icon: "mdi:cog", form: "rounded", label: "Remove Duplicate Usernames", pos: "b", h: 48 }
n9["<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/>Scrape instagram Profiles"]
n10@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If followers are in a certai..", pos: "b", h: 48 }
n11@{ icon: "mdi:database", form: "rounded", label: "Get list of Hashtags", pos: "b", h: 48 }
n5 --> n1
n1 --> n2
n4 --> n8
n11 --> n5
n3 --> n8
n3 --> n4
n7 --> n9
n9 --> n10
n8 --> n7
n2 --> n6
n6 --> n3
n0 --> n11
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 n0 trigger
class n3,n4,n10 decision
class n11 database
class n2,n9 api
class n1,n6 code
classDef customIcon fill:none,stroke:none
class n1,n2,n6,n9 customIcon
Why This Matters: Hashtag leads get messy fast
Hashtag research sounds simple until you do it at scale. You check a hashtag, skim posts, click into profiles, then try to remember which ones looked promising. Ten minutes here, ten minutes there, and suddenly you’ve burned an afternoon without a usable list. Worse, manual research makes you inconsistent. Some days you’re strict about follower count, other days you’re tired and add “close enough” accounts. Then outreach performance drops and you don’t know if the offer is the issue, or the targeting.
The friction compounds. Here’s where it usually breaks down.
- You lose time jumping between hashtag feeds, posts, and profile pages for every single candidate.
- Your list fills with duplicates because the same creator appears under multiple hashtags.
- Language mismatch sneaks in, so outreach gets ignored because the audience isn’t actually your market.
- Follower counts get checked “later,” which means they often never get checked at all.
What You’ll Build: Hashtags in, qualified leads out
This workflow turns a simple hashtag list into a structured lead database you can actually use. It starts by reading hashtags from a Google Sheet, then automatically generates the right Instagram explore URLs for each tag. From there, it calls Apify (via HTTP Request) to scrape posts for each hashtag and pulls key data like captions and usernames. Next comes the “cleanup” part: captions are normalized to remove links and hashtags, then the workflow checks that the post isn’t just hashtag spam and validates the language (English is built in, and the workflow description notes French and Spanish can be supported too). Finally, usernames are merged, duplicates are removed, each profile is scraped for details like follower count, and only profiles inside your target range are kept as qualified leads.
The workflow begins with your existing Google Sheet. Apify collects post and profile data at speed, while n8n handles the filtering logic so you don’t have to second-guess every lead. Your output is a deduped set of profiles that match your language and follower criteria, ready for outreach or analysis.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you research 20 hashtags per week and grab 15 profiles per hashtag. Manually, if you spend maybe 2 minutes per profile to open the page, check language cues, and eyeball follower count, that’s about 10 hours of work. With this workflow, you can trigger the run from your hashtag sheet, let Apify collect posts and profiles in the background, then review the qualified output in one pass. Most teams get that weekly job down to about an hour of oversight.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Apify for scraping hashtag posts and profiles.
- Google Sheets to store hashtags and lead output.
- Apify API key (get it from your Apify account settings).
Skill level: Beginner. You’ll connect accounts, paste an API key, and edit a couple of filter values like min/max followers.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
Hashtags are pulled from Google Sheets. The workflow reads your hashtag column so you can keep everything in one place and update it anytime without touching n8n.
Instagram tag URLs are generated automatically. A small code step formats each hashtag into the correct explore/feed URLs so the scraper has a consistent input.
Apify scrapes hashtag posts, then captions get cleaned and checked. HTTP Request nodes call Apify actors, then n8n normalizes caption text, removes hashtags/links, filters “hashtag-only” posts, and runs language validation so you keep the right market.
Usernames are merged, deduped, and enriched with profile details. The workflow compiles unique usernames, scrapes each profile for follower count and other fields, then keeps only accounts inside your min/max follower range (your definition of “qualified”).
You can easily modify the follower range and language checks to match your niche. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Set up the workflow to run on demand so you can test and iterate before scheduling or deploying.
- Add the Manual Execution Start node as the trigger.
- Leave all fields in Manual Execution Start at their defaults.
- Optionally keep Flowpast Branding as a visual reference note; it does not affect execution.
Step 2: Connect Google Sheets
Load your hashtag list from Google Sheets so the workflow can build tag URLs dynamically.
- Add Retrieve Tag Sheet and set Document to the spreadsheet ID in
SPREADSHEET_ID. - Set Sheet to the sheet ID in
SHEET_ID. - Credential Required: Connect your googleSheetsOAuth2Api credentials.
- Connect Manual Execution Start → Retrieve Tag Sheet.
Hashtag, Collect Tag List will aggregate it automatically.Step 3: Set Up Tag Processing and Feed Retrieval
Aggregate tags, generate URLs, call the hashtag feed API, and normalize caption data for filtering.
- Add Collect Tag List and set Fields to Aggregate to
Hashtag. - Connect Retrieve Tag Sheet → Collect Tag List → Generate Tag URLs.
- In Generate Tag URLs, keep the provided JavaScript that builds
startUrlsfrom$input.first().json.Hashtag. - Configure Hashtag Feed API Call with Method set to
POSTand URL set tohttps://api.apify.com/v2/acts/culc72xb7MP3EbaeX/run-sync-get-dataset-items. - Set JSON Body to
={ "maxItems": 300, "startUrls": [ {{ $json.startUrls }} ], "until": "2025-06-20" }and keep Send Headers enabled. - Update the Authorization header to replace
Bearer [CONFIGURE_YOUR_TOKEN]with your Apify token. - Connect Generate Tag URLs → Hashtag Feed API Call → Normalize Caption Data.
- Keep the JavaScript in Normalize Caption Data to enrich each item with
textNoTags, language hit counts, and flags.
Step 4: Configure Filtering, Deduplication, and Profile Enrichment
Filter for hashtag-only or English captions, remove duplicates, and enrich usernames with follower data.
- In Check Hashtag Only, set the condition to
{{ $json.hasHashtags && ($json.textNoTags || '').trim() === '' }}. - Connect Normalize Caption Data → Check Hashtag Only. The true output goes to Eliminate Duplicate Users, and the false output goes to Validate English Text.
- In Validate English Text, set the condition to
{{ $json.enHits > 0 && $json.frHits === 0 && $json.esHits === 0 }}. - Connect Validate English Text → Eliminate Duplicate Users.
- Configure Eliminate Duplicate Users with Compare set to
selectedFieldsand Fields to Compare set toowner.username. - Connect Eliminate Duplicate Users → Merge Username Sets, and set Fields to Aggregate to
owner.username. - Configure Profile Details API Call with URL
https://api.apify.com/v2/acts/dSCLg0C3YEZ83HzYX/run-sync-get-dataset-itemsand JSON Body set to={ "usernames": [ {{ $json.username.map(u => `\"${u}\"`).join(", ") }} ] }. - Replace the Authorization header value
Bearer [CONFIGURE_YOUR_TOKEN]with your Apify token. - Connect Merge Username Sets → Profile Details API Call → Validate Follower Range.
- In Validate Follower Range, set conditions to
{{ $json.followersCount }}gte10000and{{ $json.followersCount }}lte100000.
Step 5: Test and Activate Your Workflow
Run a manual test to verify tag ingestion, API calls, and filtering before enabling the workflow for production use.
- Click Execute Workflow in n8n to trigger Manual Execution Start.
- Confirm Retrieve Tag Sheet outputs a list of hashtags and Hashtag Feed API Call returns items.
- Verify that Eliminate Duplicate Users reduces repeated
owner.usernamevalues and Validate Follower Range keeps only accounts within your target range. - When results look correct, save the workflow and keep it ready for manual execution as needed.
Hashtag, Collect Tag List will output empty values and the API call will fail to find tags.Troubleshooting Tips
- Apify credentials can expire or the actor may require access. If things break, check your Apify token and actor permissions in your Apify console first.
- If you’re using Wait nodes or external scraping, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Google Sheets nodes often fail because the spreadsheet, tab name, or header column changed. Confirm the Sheet name and hashtag column still match what the “Retrieve Tag Sheet” node expects.
Quick Answers
About 30 minutes once your Apify and Google credentials are ready.
No. You’ll mostly pick accounts, paste an API key, and tweak a couple of filters.
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 Apify usage costs based on how many hashtags and profiles you scrape.
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. The fastest wins are swapping the language logic in the “Validate English Text” checks, adjusting the min/max values in “Validate Follower Range,” and changing what gets written back to your sheet (add email guessers, niche tags, or “do-not-contact” flags). If you want different data entirely, replace the “Profile Details API Call” Apify actor with another actor that returns the fields you care about. Same workflow shape, different output.
Most of the time it’s an invalid or expired Apify API token, so regenerate it and update the credential in n8n. Also check that you have access to the specific Instagram Scraper actor you selected, because some actors require enabling or a paid plan. If the run starts and then fails mid-way, you may be hitting rate limits or pulling too many items at once; reduce hashtag volume per run or add batching with Split in Batches.
On n8n Cloud Starter, you’re typically fine for small weekly runs; bigger prospecting teams usually move up a plan or self-host to avoid execution limits. If you self-host, there’s no execution cap, but your server and Apify limits will still matter. Practically, this workflow can churn through hashtags quickly, but profile enrichment is the slower part because it’s one profile per username. Start with 10–20 hashtags per run, then increase once you’re confident it’s stable.
Often, yes, because this kind of lead qualification needs branching logic, deduping, and multi-step enrichment. n8n makes that easier to manage without paying extra for every filter and path. It also plays nicely with HTTP Request calls to tools like Apify, which is the core of this workflow. Zapier or Make can still work if you keep it very simple, but you’ll usually hit limitations once you add “clean caption, detect language, merge sets, dedupe, then enrich.” If you want help choosing, Talk to an automation expert and describe your volume and targeting rules.
Once this is running, hashtag research stops being a weekly chore and becomes a repeatable system. Let the workflow do the sorting so you can focus on the outreach that actually moves revenue.
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.