n8nflow.net logo

Instagram Full Profile Scraper with Apify and Google Sheets

by Msaid Mohamed el hadiโ€ขUpdated: Last update 2 months agoโ€ขSource: n8n.io
Loading workflow viewer...

Getting Started

๐Ÿ“ธ Instagram Full Profile Scraper with Apify and Google Sheets

This n8n workflow automates the process of scraping full Instagram profiles using a custom Apify actor, and logs the results into a Google Sheet. It is designed to run at scheduled intervals and process a list of usernames by calling the API, appending the results, and marking them as processed.


๐Ÿš€ Features

  • โฑ Scheduled Execution โ€“ Runs automatically every few minutes.
  • ๐Ÿ“„ Google Sheets Integration โ€“ Reads a list of Instagram usernames and updates the same sheet.
  • ๐Ÿง  Apify Actor โ€“ Fetches full public Instagram profile data.
  • ๐Ÿงฎ Aggregation โ€“ Batches usernames for bulk scraping.
  • โœ๏ธ Data Logging โ€“ Appends scraped data to a second sheet.
  • โœ… Tracking โ€“ Marks usernames as processed once scraped.

๐Ÿ“ Workflow Structure

graph TD;
    ScheduleTrigger --> GetUsernames;
    GetUsernames --> LimitItems;
    LimitItems --> AggregateUsernames;
    AggregateUsernames --> CallApifyActor;
    CallApifyActor --> AppendToSheet;
    CallApifyActor --> MarkAsScraped;

๐Ÿ›  Setup

  1. Google Sheet

Create a Google Sheet with:

 * **Sheet 1** named `Usernames` (GID: 0)  

Columns: username, scraped

 * **Sheet 2** named `fullprofiles` (GID: 458127000)

Sample sheet:
๐Ÿ”— Instagram Profile Sheet

  1. n8n Configuration

    • Import this workflow into your n8n instance.
    • Set up your Google Sheets credentials (googleSheetsOAuth2Api).
    • Replace apify_api_your token in the HTTP Request node with your Apify API token.

๐Ÿ“ฆ Required Credentials

  • Google Sheets OAuth2 โ€“ For reading and writing sheet data.
  • Apify API Token โ€“ To call the custom actor for profile scraping.

๐Ÿ“Š Sheets Used

Sheet NamePurpose
UsernamesSource of usernames to scrape
fullprofilesDestination of full profile data

๐Ÿ“Œ Apify Actor Info

Instagram Full Profile Scraper
This actor fetches extended profile information from public Instagram profiles.

๐Ÿ”— View on Apify


๐Ÿ” Workflow Nodes Overview

NodePurpose
Schedule TriggerTriggers the workflow periodically.
Get UsernamesReads usernames from the Usernames sheet.
LimitLimits processing to 20 usernames per run.
AggregateGroups usernames into a batch for the API call.
Call Apify ActorSends the usernames to the Apify actor and receives profile data.
Append Full ProfilesAppends the scraped data to the fullprofiles sheet.
Mark Username as ScrapedMarks the processed usernames as scraped = TRUE.
Sticky NoteProvides a reference link to the Apify actor used.

๐Ÿ“Œ Example Sheet Structure

Usernames Sheet

usernamescraped
exampleuser1
exampleuser2TRUE

fullprofiles Sheet

usernamefull_namebiographyfollower_count...

๐Ÿ” Security & Notes

  • This workflow does not bypass any Instagram privacy restrictions.
  • It works only with public Instagram profiles.
  • You are responsible for ensuring that scraping complies with Instagramโ€™s terms of service and any applicable laws.

๐Ÿ“ฌ Support

For any issues, feel free to reach out:
๐Ÿ‘ค @mohamedgb00714
๐Ÿ“ง [email protected]