
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
n8n-nodes-instagram-integrations
Advanced tools
N8N nodes for Instagram API integration with OAuth2 authentication
Professional N8N community nodes for seamless Instagram Messaging API integration with OAuth2 authentication.
Installation β’ Features β’ Prerequisites β’ Quick Start β’ Documentation β’ Support
This package provides comprehensive Instagram integration for n8n workflows, enabling automated messaging, media management, and webhook-based event handling through the official Instagram Graph API.
Perfect for:
Message Types:
Interactive Templates:
User Management:
Post Creation:
Advanced Features:
Media Management:
Webhook Events:
Dual Output System:
Security Features:
For Messaging:
instagram_basic
- Basic profile accessinstagram_manage_messages
- Send and receive messagespages_manage_metadata
- Webhook subscriptionspages_read_engagement
- Read engagement dataFor Content Publishing (NEW):
instagram_content_publish
- Create and publish posts, reels, and storiespages_show_list
- List Facebook pagescatalog_management
- Product tagging (optional, for Instagram Shopping)n8n-nodes-instagram-integrations
cd ~/.n8n/nodes
npm install n8n-nodes-instagram-integrations
Add to your docker-compose.yml
:
services:
n8n:
environment:
- N8N_COMMUNITY_PACKAGES=n8n-nodes-instagram-integrations
Using OAuth2 (Recommended):
Using Access Token:
Messaging:
Content Publishing:
Message Operations:
sendTextMessage
- Send text contentsendImageMessage
- Send image via URLsendAudioMessage
- Send audio filesendVideoMessage
- Send video contentsendButtonTemplate
- Interactive buttonssendGenericTemplate
- Carousel cardssendQuickReplies
- Quick response optionsuploadMedia
- Upload media filesPost Operations (NEW):
createSinglePost
- Create image/video postscreateCarouselPost
- Multi-media carouselscreateReel
- Short-form videospublishPost
- Publish created contentStory Operations (NEW):
createStory
- Create and publish storiesMedia Operations (NEW):
listMedia
- Get your media listgetMedia
- Get media detailsgetMediaChildren
- Get carousel childrenUser Operations:
getUserProfile
- Fetch user informationgetMyProfile
- Get authenticated account infoWebhook Events:
messages
- Incoming messagesmessaging_postbacks
- Button interactionsmessaging_optins
- Consent eventsInstagram uses a two-tier token system that this package automatically manages for you:
Token Type | Validity | Management |
---|---|---|
Short-lived | 1 hour | Received from OAuth |
Long-lived | 60 days | Auto-exchanged on first use |
Refreshed | 60 days | Auto-refreshed before expiration |
OAuth Authentication (User action)
β
Short-lived Token (1 hour)
β
First API Call (automatic)
β
Long-lived Token Exchange (automatic)
β
Token Valid for 60 Days
β
Auto-refresh at 53 Days (automatic)
β
Another 60 Days of Validity
β
Zero Configuration - Everything happens automatically
β
No More Errors - "refreshToken is required" error is eliminated
β
Smart Refresh - Tokens refresh when at least 24 hours old and expiring within 7 days
β
Fallback Protection - If refresh fails, attempts to exchange current OAuth token
β
Secure Storage - All tokens encrypted in N8N credential system
continueOnFail
for robust error handling// Day 1: OAuth authentication
User authenticates β Short-lived token (expires in 1 hour)
// Day 1: First workflow run
First API call β Automatic exchange β Long-lived token (expires in 60 days)
// Day 53: Automatic refresh (7 days before expiry)
API call β Token check β Auto-refresh β New long-lived token (expires in 60 days)
// Repeat cycle every ~53 days as long as workflows are active
If a workflow is inactive for 60+ days:
π TOKEN_MANAGEMENT.md - Comprehensive token management guide
π§ TOKEN_MANAGEMENT_IMPLEMENTATION.md - Technical implementation details
messages
fieldhttps://your-n8n.com/webhook/instagram
"Invalid OAuth Access Token"
"Webhook Verification Failed"
"User Cannot Receive Messages"
"Rate Limit Exceeded"
Enable n8n debug logging:
export N8N_LOG_LEVEL=debug
n8n start
Contributions are welcome! Please:
See CODE_OF_CONDUCT.md for guidelines.
MIT License - see LICENSE.md for details.
Copyright Β© 2025 Mohammad Mahdi Samei
FAQs
N8N nodes for Instagram API integration with OAuth2 authentication
The npm package n8n-nodes-instagram-integrations receives a total of 1,684 weekly downloads. As such, n8n-nodes-instagram-integrations popularity was classified as popular.
We found that n8n-nodes-instagram-integrations demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checksβbuilt on trusted open source tools, ready to run out of the box.