Quick overview
This workflow collects public Instagram usernames through an n8n form, scrapes profile and recent post metrics using Apify’s Instagram Profile Scraper, then upserts the results (including engagement rate and a high-profile flag) into a Google Sheets table.
How it works
- Receives Instagram usernames submitted through an n8n form (comma- or newline-separated).
- Normalizes the input into a clean username list and sets run parameters like the Apify actor and how many recent posts to analyze.
- Sends a single batched request to the Apify Instagram Profile Scraper API to retrieve profile details and latest post stats.
- Detects whether each returned item contains valid profile data and formats records into a consistent schema for scraped vs. private/not-found outcomes.
- Captures Apify request failures and formats an error record with a clear status and timestamp.
- Merges all outcomes and appends or updates rows in Google Sheets so reruns update existing usernames instead of creating duplicates.
Setup
- Add an Apify API token as an HTTP Header Auth credential (Authorization: Bearer <token>) and select it in the Apify request step.
- Connect a Google Sheets OAuth2 credential, then select the target spreadsheet and the “Profiles” sheet (or create them).
- Ensure the sheet has columns matching the logged fields (for example: username, fullName, followersCount, followsCount, biography, profilePicUrl, externalUrl, isPrivate, isVerified, postsCount, latestPostCaption, latestPostLikes, latestPostComments, engagementRatePercent, isHighProfile, status, scrapedAt).
- Review the configuration values (Apify actor slug, resultsLimit/max posts, and the follower threshold used to flag high-profile accounts) to match your needs.
Additional info
Scrape Instagram profiles and log them to Google Sheets
Need help customizing?
Contact me for consulting and support : Linkedin
MY NEW YOUTUBE CHANNEL
👉 Subscribe to my new YouTube channel. Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.
