Back to Templates

Instagram Full Profile Scraper with Apify and Google Sheets

Last update

Last update a day ago

Categories

Share


📸 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

  2. 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 Name Purpose
Usernames Source of usernames to scrape
fullprofiles Destination 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

Node Purpose
Schedule Trigger Triggers the workflow periodically.
Get Usernames Reads usernames from the Usernames sheet.
Limit Limits processing to 20 usernames per run.
Aggregate Groups usernames into a batch for the API call.
Call Apify Actor Sends the usernames to the Apify actor and receives profile data.
Append Full Profiles Appends the scraped data to the fullprofiles sheet.
Mark Username as Scraped Marks the processed usernames as scraped = TRUE.
Sticky Note Provides a reference link to the Apify actor used.

📌 Example Sheet Structure

Usernames Sheet

username scraped
exampleuser1
exampleuser2 TRUE

fullprofiles Sheet

username full_name biography follower_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]