npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-instagram-dm

v0.1.0-beta.1

Published

n8n community node for Instagram Direct Messages via Meta Graph API

Readme

Banner image

n8n-nodes-instagram-dm

This is an n8n community node that provides Instagram Direct Messaging functionality via the Meta Graph API.

Features

  • Send Direct Messages: Send text messages to Instagram users
  • List Conversations: Retrieve list of conversations for your Instagram Business Account
  • Get Conversation Details: Fetch details and messages from specific conversations
  • Secure Authentication: Built-in credential management with encrypted storage
  • Error Handling: Comprehensive error handling and logging

Prerequisites

Before using this node, you need:

  1. Instagram Business Account: A verified Instagram Business Account
  2. Facebook App: A Facebook App with Instagram permissions
  3. Access Token: A valid Access Token with the following permissions:
    • instagram_basic
    • instagram_manage_messages
    • pages_messaging

Installation

To install this community node in n8n:

Via npm (when published)

npm install n8n-nodes-instagram-dm

Via n8n Community Nodes (when published)

  1. Go to Settings → Community Nodes
  2. Click "Install a community node"
  3. Enter: n8n-nodes-instagram-dm

For Development

  1. Clone this repository
  2. Run npm install
  3. Run npm run build
  4. Link to your n8n installation

Setup

1. Create Instagram DM API Credentials

  1. In n8n, go to CredentialsNew Credential
  2. Search for "Instagram DM API"
  3. Fill in:
    • Access Token: Your Instagram Graph API access token
    • Instagram Business Account ID: Your Instagram Business Account ID

2. Test Your Credentials

The credential includes a built-in test that verifies:

  • Your access token is valid
  • Your Instagram Business Account ID is accessible

Usage

Send Message

Send a direct message to an Instagram user:

Required Parameters:

  • Recipient ID: Instagram User ID of the message recipient
  • Message Text: The text content of your message

Optional Parameters:

  • Messaging Product: Set to "instagram" (default)

List Conversations

Retrieve conversations for your Instagram account:

Optional Parameters:

  • Limit: Number of conversations to return (default: 25, max: 50)
  • Fields: Comma-separated list of fields to include (default: "id,participants,updated_time")

Get Conversation

Get details of a specific conversation:

Required Parameters:

  • Conversation ID: ID of the conversation to retrieve

Optional Parameters:

  • Fields: Comma-separated list of fields to include (default: "id,participants,messages,updated_time")

Example Workflows

Basic Message Sending

Trigger → Instagram DM (Send Message)

Customer Service Bot

Webhook → Code Node (Process) → Instagram DM (Send Message)

Conversation Monitor

Schedule → Instagram DM (List Conversations) → Filter → Instagram DM (Get Conversation)

API Reference

This node uses the Meta Graph API v19.0. For detailed API documentation, visit:

Troubleshooting

Common Issues

  1. "Invalid Access Token"

    • Verify your token hasn't expired
    • Ensure proper permissions are granted
    • Check if your Facebook App is approved for production
  2. "Recipient ID not found"

    • Verify the Instagram User ID is correct
    • Ensure the user has previously interacted with your business account
  3. "Rate limit exceeded"

    • Instagram has rate limits on messaging
    • Implement delays between messages
    • Monitor your API usage

Getting Help

Development

Building the Node

npm run build

Linting

npm run lint
npm run lintfix

Testing

npm test

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Run linting and ensure builds pass
  6. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Support

If you find this node helpful, please consider:

  • ⭐ Starring this repository
  • 📢 Sharing it with others
  • 🐛 Reporting bugs and issues
  • 💡 Suggesting new features

Note: This is a community-maintained node and is not officially supported by n8n or Meta/Facebook. Use at your own discretion and ensure compliance with Instagram's Terms of Service and API policies.