New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@pakoor/n8n-nodes-instagram

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pakoor/n8n-nodes-instagram

n8n community node for Instagram Messaging API integration

latest
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

n8n-nodes-instagram

n8n community node for Instagram Messaging API integration. This package provides OAuth2/Access Token authentication, messaging capabilities, content publishing, comment management, and webhook-based event handling through the Instagram Graph API.

Features

  • OAuth2 & Access Token Authentication - Secure connection with automatic token refresh
  • Messaging - Send text, images, audio, video, buttons, carousels, and quick replies
  • User Management - Retrieve user profiles and account information
  • Comment Management - Get, reply, delete, and moderate comments
  • Content Publishing - Create posts, carousels, stories, and reels
  • Media Management - List and retrieve media details
  • Webhook Triggers - Receive real-time messaging and content events

Installation

  • Go to Settings > Community Nodes
  • Select Install
  • Enter n8n-nodes-instagram and confirm

Manual Installation

npm install n8n-nodes-instagram

Or in your n8n installation directory:

cd ~/.n8n/custom
npm install n8n-nodes-instagram

Prerequisites

  • Instagram Business Account or Creator Account
  • Facebook Page connected to your Instagram account
  • Meta Developer App with Instagram Graph API enabled

Required Permissions

  • instagram_basic - Basic account information
  • instagram_manage_messages - Send and receive messages
  • instagram_manage_comments - Manage comments
  • instagram_content_publish - Publish content
  • pages_show_list - Access connected Facebook pages
  • pages_read_engagement - Read page engagement data

Quick Start

1. Set Up Credentials

  • Create a Meta Developer App at developers.facebook.com
  • Add Instagram Graph API product
  • In n8n, create new Instagram OAuth2 API credentials
  • Enter your App ID and App Secret
  • Click Connect to authorize

Access Token

  • Generate a long-lived access token from Meta Developer Console
  • In n8n, create new Instagram Access Token API credentials
  • Paste your access token
  • Account ID will be auto-discovered

2. Create Your First Workflow

  • Add an Instagram node to your workflow
  • Select your credentials
  • Choose a resource and operation
  • Configure the parameters
  • Execute the workflow

Node Operations

Instagram Node

Message Operations

OperationDescription
Send TextSend a text message to a user
Send ImageSend an image message via URL
Send AudioSend an audio message via URL
Send VideoSend a video message via URL
Send Button TemplateSend interactive buttons
Send Generic TemplateSend a carousel of cards
Send Quick RepliesSend quick reply options

User Operations

OperationDescription
Get ProfileGet a user's profile by IGSID
Get My ProfileGet your Instagram Business Account info

Comment Operations

OperationDescription
Get CommentsGet comments on a media post
Get RepliesGet replies to a comment
ReplyPost a public reply to a comment
Send Private ReplySend a DM to a commenter (within 7 days)
DeleteDelete a comment
Toggle VisibilityHide or unhide a comment

Post Operations

OperationDescription
Create SingleCreate a single image/video post
Create CarouselCreate a carousel post (2-10 items)
PublishPublish a media container

Story Operations

OperationDescription
CreateCreate a story (image or video)

Reel Operations

OperationDescription
CreateCreate a reel (video up to 60 seconds)

Media Operations

OperationDescription
ListList your media with pagination
GetGet details of a specific media
Get ChildrenGet items in a carousel post

Instagram Trigger Node

Receives webhook events from Instagram with dual outputs:

OutputEvents
Messaging EventsMessages, Postbacks, Opt-ins
Content EventsComments, Mentions

Usage Examples

Send a Text Message

{
  "resource": "message",
  "operation": "sendText",
  "recipientId": "{{$json.sender_id}}",
  "text": "Hello! Thanks for reaching out."
}

Send Button Template

{
  "resource": "message",
  "operation": "sendButtonTemplate",
  "recipientId": "{{$json.sender_id}}",
  "text": "How can I help you?",
  "buttons": [
    { "type": "postback", "title": "View Products", "payload": "PRODUCTS" },
    { "type": "web_url", "title": "Visit Website", "url": "https://example.com" }
  ]
}

Create and Publish a Post

// Step 1: Create container
{
  "resource": "post",
  "operation": "createSingle",
  "mediaType": "IMAGE",
  "mediaUrl": "https://example.com/image.jpg",
  "caption": "Check out our new product! #newproduct"
}

// Step 2: Publish (use container ID from step 1)
{
  "resource": "post",
  "operation": "publish",
  "containerId": "{{$json.id}}"
}

Create Carousel Post (JSON/Expression)

When using the Create Carousel operation with Input Mode set to JSON / Expression, use the following array format for the Carousel Items (JSON) field. This is useful when mapping data from previous nodes.

[
  {
    "mediaType": "IMAGE",
    "mediaUrl": "https://example.com/image1.jpg",
    "userTags": "username1,username2" // Optional: Comma-separated usernames
  },
  {
    "mediaType": "VIDEO",
    "mediaUrl": "https://example.com/video1.mp4"
  },
  {
    "mediaType": "IMAGE",
    "mediaUrl": "https://example.com/image2.jpg"
  }
]

Note:

  • mediaType: Must be IMAGE or VIDEO.
  • mediaUrl: Must be a valid, public HTTPS URL.
  • userTags: (Optional) Users will be tagged automatically on the image.
  • Limit: 2 to 10 items per carousel.

Reply to Comments Automatically

Use the Instagram Trigger to receive comment events, then reply:

{
  "resource": "comment",
  "operation": "reply",
  "commentId": "{{$json.id}}",
  "message": "Thanks for your comment! 🙏"
}

Validation Limits

FieldLimit
Text message1000 characters
Button count3 maximum
Button title20 characters
Quick replies13 maximum
Carousel items2-10 items
User tags20 maximum
Tag position (x, y)0-1 range
Reel duration60 seconds

Webhook Setup

To use the Instagram Trigger node:

  • Deploy your n8n instance with a public URL
  • Add the Instagram Trigger node to a workflow
  • Activate the workflow
  • Configure the webhook URL in your Meta App:
    • Go to your Meta App > Webhooks
    • Subscribe to instagram webhooks
    • Enter your n8n webhook URL
    • Select events: messages, messaging_postbacks, comments, mentions

Error Handling

The node provides detailed error information:

Error CodeDescriptionSuggestion
4Rate limit exceededWait and retry
190Invalid access tokenReconnect credentials
100Invalid parameterCheck input values
10Permission deniedCheck app permissions

Enable Continue On Fail in node settings for graceful error handling in workflows.

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Lint
npm run lint

License

MIT

Keywords

n8n-community-node-package

FAQs

Package last updated on 13 Jan 2026

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