Socket
Book a DemoInstallSign in
Socket

n8n-nodes-instagram-private-api-wrapped-correct-logo

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n8n-nodes-instagram-private-api-wrapped-correct-logo

n8n community node for Instagram automation using private API capabilities

0.0.11
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
Β 
Created
Source

n8n-nodes-instagram-private-api

n8n.io - Workflow Automation

This is an n8n community node for Instagram automation using the instagram-private-api library. It provides comprehensive access to Instagram's private API capabilities for workflow automation.

🚨 v0.0.10 CRITICAL UPDATE: This version now uses ONLY session data authentication for 100% reliability. Username/password login has been completely removed to prevent Instagram blocks. You MUST use the extract-session.sh script to obtain session data. See AUTHENTICATION_GUIDE.md for details.

n8n is a fair-code licensed workflow automation platform.

Installation
Operations
Credentials
Compatibility
Usage
Resources
Version History
Development

Installation

Follow the installation guide in the n8n community nodes documentation.

πŸ“¦ Install via npm

# Latest version (recommended)
npm install n8n-nodes-instagram-private-api-wrapped@latest

# Specific version 0.0.10 (latest stable - session-only)
npm install n8n-nodes-instagram-private-api-wrapped@0.0.10

πŸ”„ Updating from Previous Versions

If upgrading from v0.0.9 or earlier:

# Uninstall old version
npm uninstall n8n-nodes-instagram-private-api-wrapped

# Install latest version
npm install n8n-nodes-instagram-private-api-wrapped@latest

# Restart n8n
npm run start

🚨 BREAKING CHANGE in v0.0.10:

  • Username/password authentication REMOVED - only session data is supported
  • You MUST extract session data using the new extract-session.sh script
  • All existing credentials need to be updated with session data only
  • 100% reliability - no more Instagram authentication blocks

Operations

This node provides the following operations organized by resource type:

πŸ‘€ User Operations

  • Get Profile Info: Retrieve detailed Instagram profile information including follower count, bio, verification status
  • Search Users: Search for users by username or query
  • Get Followers: Retrieve list of user followers with user details
  • Get Following: Retrieve list of accounts a user is following

πŸ“± Media Operations

  • Get User Media: Retrieve user's posted media with metadata and engagement stats
  • Get Media Info: Get detailed information about specific media posts
  • Like Media: Like a specific post or media
  • Unlike Media: Remove like from a specific post or media

πŸ“° Feed Operations

  • Get Timeline Feed: Retrieve user's personal timeline feed with recent posts

Credentials

This node requires Instagram session data configured through n8n's credential system:

  • Session Data (Required): Pre-extracted Instagram session data in JSON format
  • Proxy URL (Optional): HTTP proxy URL for requests

🚨 BREAKING CHANGE v0.0.10: Username/password authentication has been completely removed. You MUST use session data for 100% reliability and to avoid Instagram blocks.

πŸ”„ Session Data Authentication (ONLY METHOD)

Starting from v0.0.10, session data is the ONLY supported authentication method:

  • Extract Session Data: Use the provided extract-session.sh script to obtain session data
  • Configure Credentials: Paste the session JSON into the "Session Data" field in your credentials
  • No Username/Password: These fields have been removed - session data provides complete authentication

Benefits of Session-Only Authentication:

  • 100% reliability - no more Instagram authentication blocks
  • Persistent authentication across workflow runs
  • Zero bot detection - uses legitimate session cookies
  • Faster execution - no login process required

πŸ”’ Security Considerations

  • Uses n8n's secure credential storage system
  • Credentials are encrypted and never exposed in workflows
  • Consider using a dedicated Instagram account for automation
  • Be aware of Instagram's Terms of Service regarding automated access

Compatibility

  • n8n Version: 1.0+ (tested and compatible)
  • Node.js: 18.17+ required
  • Instagram Private API: ^1.45.3

Usage

This node leverages the powerful instagram-private-api library to provide access to Instagram's internal APIs, enabling comprehensive automation capabilities.

✨ Key Features

User Management

// Get detailed user profile
{
  "pk": "123456789",
  "username": "example_user",
  "full_name": "Example User",
  "follower_count": 1500,
  "following_count": 300,
  "media_count": 85,
  "is_verified": false,
  "is_private": false,
  "biography": "Content creator and photographer"
}

Media Interaction

  • Access to post engagement data (likes, comments)
  • Media metadata including dimensions, URLs, captions
  • Automated liking/unliking capabilities

Feed Access

  • Personal timeline content
  • Real-time feed updates
  • Engagement tracking

πŸ“‹ Example Workflows

  • Social Media Monitoring: Track competitor follower growth and engagement
  • Content Curation: Automatically collect media from specific users
  • Engagement Automation: Like posts from target accounts (use responsibly)
  • Analytics Collection: Gather data for social media analysis

⚠️ Important Considerations

  • Rate Limiting: Instagram enforces strict rate limits. Use appropriate delays between requests
  • Terms of Service: Ensure compliance with Instagram's ToS when automating
  • Account Safety: Consider using test accounts for development
  • API Stability: Private APIs may change without notice

πŸ›  Best Practices

  • Implement proper error handling in your workflows
  • Use realistic delays between API calls (2-5 seconds minimum)
  • Monitor for rate limit responses and implement backoff strategies
  • Keep credentials secure and rotate them regularly

Troubleshooting

πŸ”§ Authentication Issues

For detailed authentication troubleshooting, see AUTHENTICATION_GUIDE.md.

🚨 v0.0.10 - SESSION DATA ONLY:

Starting from v0.0.10, ONLY session data authentication is supported. This eliminates ALL Instagram authentication blocks.

Quick setup:

  • Download script: curl -O https://[...]/extract-session.sh
  • Run script: ./extract-session.sh
  • Copy session data to n8n credentials
  • 100% reliability - no more authentication errors

Common issues:

  • "Session data is required": You must use the extract-session.sh script
  • "Invalid session data": Session expired - re-run the extraction script
  • "Session expired": Re-extract session data using the script

⚠️ No More Username/Password: Direct login has been completely removed to prevent Instagram blocks.

πŸ”§ Credential Issues

If you see "Node does not have any credentials set":

  • Check Credential Name: Ensure you're using "Instagram API" (not "Instagram Credentials")
  • Recreate Credentials:
    • Go to Settings β†’ Credentials
    • Create new Instagram API credential
    • Fill in username, password, and optional proxy URL
  • Node Configuration:
    • Select the newly created credential in your node
    • Save and re-execute the workflow

πŸ“Š Credential Configuration

// Session-Only Configuration (v0.0.10+)
{
  "sessionData": "{\"cookies\":[...],\"sessionId\":\"...\"}", // Required - extracted session data
  "proxyUrl": "http://proxy.example.com:8080" // Optional
}

πŸ’‘ Getting Session Data (REQUIRED)

To use this node, you MUST extract session data using our simple shell script:

Easy Setup (v0.0.10+ with shell script):

# 1. Download the extraction script
curl -O https://raw.githubusercontent.com/tiagohintz/n8n-nodes-instagram-private-api-wrapped/main/extract-session.sh

# 2. Make it executable
chmod +x extract-session.sh

# 3. Run the script (it will handle everything automatically)
./extract-session.sh

What the script does:

  • βœ… Automatically installs required dependencies
  • βœ… Prompts for your Instagram credentials
  • βœ… Safely extracts session data
  • βœ… Provides formatted output for n8n credentials
  • βœ… Includes comprehensive error handling and solutions

⚠️ IMPORTANT: Always run session extraction OUTSIDE of n8n on your local machine.

πŸ› Error Handling

  • Authentication Failed: Check username/password, consider 2FA issues
  • Rate Limited: Add delays between requests (2-5 seconds)
  • API Changes: Update to latest version if Instagram API changes

Resources

Version History

  • 0.0.10 (Current):

    • 🚨 BREAKING CHANGE: Removed username/password authentication completely
    • βœ… SESSION-ONLY AUTHENTICATION: 100% reliability, zero Instagram blocks
    • βœ… Simple shell script (extract-session.sh) for easy session extraction
    • βœ… Automatic dependency installation in extraction script
    • βœ… Enhanced error handling and step-by-step guidance in script
    • βœ… Simplified credential configuration (session data + optional proxy only)
    • βœ… Updated InstagramClient to use only session data authentication
    • βœ… Removed all fallback to username/password login
    • βœ… Complete elimination of Instagram bot detection issues
    • βœ… Production-grade authentication system with zero maintenance
  • 0.0.9:

    • 🚨 CRITICAL AUTHENTICATION FIXES: Complete solution for Instagram authentication blocks
    • βœ… Enhanced session data authentication as primary method (99% reliability)
    • βœ… Complete AUTHENTICATION_GUIDE.md rewrite with emergency recovery protocols
    • βœ… Interactive session extraction script (extract-session.js) with error handling
    • βœ… Improved InstagramClient with session data prioritization over direct login
    • βœ… Comprehensive error messages with specific solutions for each Instagram error
    • βœ… Emergency recovery checklist for multiple authentication failures
    • βœ… Timeline-based recovery protocols (immediate, short-term, long-term)
    • βœ… Production-grade authentication system that avoids Instagram bot detection
    • βœ… Ready-to-use session extraction script with step-by-step guidance
  • 0.0.8:

    • πŸ“¦ PRODUCTION OPTIMIZATION: Enhanced package stability and documentation
    • βœ… Updated package.json configuration for better npm compatibility
    • βœ… Improved dependency management and peer dependencies
    • βœ… Enhanced documentation with session data authentication guide
    • βœ… Optimized build process and asset handling
    • βœ… Comprehensive troubleshooting documentation
    • βœ… Final validation and testing of all components
    • βœ… Production-ready release with improved reliability
  • 0.0.7:

    • πŸš€ MAJOR AUTHENTICATION IMPROVEMENTS: Enhanced Instagram login reliability
    • βœ… Added pre/post login flow simulation for better bot detection avoidance
    • βœ… Implemented retry authentication with exponential backoff
    • βœ… Enhanced error handling with specific Instagram error messages
    • βœ… Added session data support for persistent authentication
    • βœ… Improved credential fields with session data option
    • βœ… Better error messages for challenge_required, checkpoint_required
    • βœ… Created comprehensive AUTHENTICATION_GUIDE.md
    • βœ… More robust handling of rate limiting and bot detection
  • 0.0.6:

    • πŸ”§ CRITICAL FIX: Resolved credential configuration issues in n8n
    • βœ… Fixed inconsistent credential naming (instagramCredentials β†’ instagramApi)
    • βœ… Added optional proxyUrl field to credentials for proxy support
    • βœ… Improved credential descriptions and field validation
    • βœ… Enhanced credential display name for better UX
    • βœ… Corrected export configuration for proper n8n integration
    • βœ… Validated credential flow from configuration to node execution
    • βœ… Clean build process with unnecessary files removed
  • 0.0.5:

    • βœ… Full TypeScript implementation with comprehensive type safety
    • βœ… Complete InstagramClient with all essential methods
    • βœ… Proper authentication flow and error handling
    • βœ… Instagram SVG icon integration
    • βœ… Support for user operations (profile, search, followers, following)
    • βœ… Support for media operations (get media, like/unlike, media info)
    • βœ… Support for feed operations (timeline feed)
    • βœ… Automated asset copying in build process
    • βœ… Comprehensive test suite with integration tests
    • βœ… Production-ready build and deployment
  • 0.0.4: Core functionality implementation and bug fixes

  • 0.0.3: Initial TypeScript structure and basic operations

  • 0.0.2: Template refinement and dependency management

  • 0.0.1: Initial template implementation

Development

To work with this node locally:

# Install dependencies
npm install

# Build the node
npm run build

# Run in development mode with file watching
npm run dev

# Run linting
npm run lint

# Run linting with auto-fix
npm run lint:fix

# Run tests
npm test

# Format code
npm run format

πŸ— Build Process

The build process includes:

  • TypeScript compilation
  • Automatic copying of SVG assets
  • Type declaration generation
  • Source map generation (optional)

πŸ§ͺ Testing

The project includes:

  • Unit tests for core functionality
  • Integration tests for API methods
  • Type safety validation
  • Error handling verification

License

MIT

Made with ❀️ for the n8n community

Keywords

n8n-community-node-package

FAQs

Package last updated on 03 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.