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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rizkifirmansyah/n8n-nodes-threads-api

v1.0.9

Published

n8n community node for the official Meta Threads API

Readme

@rizkifirmansyah/n8n-nodes-threads-api

Threads Node

An official community node package for n8n to interact with the Meta Threads API.

Manage your Threads presence at scale: create posts (text, images, videos, carousels), moderate replies, fetch user profiles, retrieve insights/analytics, search posts, and listen to webhook events.


Table of Contents


Features

  • Seamless Post Creation: Auto-handles the 2-step media container creation & publishing workflow in a single action.
  • 🖼️ Multi-Format Support: Create Text, Single Image, Single Video, and multi-media Carousels (2–10 items).
  • 💬 Reply & Conversation Management: Create replies, view full discussion threads, and hide/unhide replies.
  • 📊 Rich Analytics: Retrieve engagement metrics (views, likes, replies, reposts, quotes) for posts and user accounts.
  • 🔍 Keyword & Topic Tag Search: Discover and monitor public Threads conversations by keyword or topic tag (#), with ordering (TOP / RECENT) and media/author filters.
  • 📬 User Mentions & REST API: Retrieve posts and replies mentioning a user.
  • Webhook Trigger: Receive real-time events (threads_mentions, threads_replies) with automated Meta Hub challenge verification.

Installation

Community Nodes (Recommended)

  1. Go to Settings > Community Nodes in your n8n instance.
  2. Select Install.
  3. Enter @rizkifirmansyah/n8n-nodes-threads-api in the npm Package Name field.
  4. Agree to the risks and select Install.

Manual Installation (Self-Hosted / Docker)

Inside your n8n root directory or custom nodes directory:

npm install @rizkifirmansyah/n8n-nodes-threads-api

Credentials & Authentication

The node supports two authentication methods:

1. OAuth2 Authentication

Best for multi-user apps or standard OAuth authorization flows.

  1. Create an App in the Meta Developer Dashboard.
  2. Add the Threads API use case.
  3. Configure your OAuth redirect URI (found in the n8n credential setup).
  4. Enter the Client ID and Client Secret into n8n.
  5. Click Connect my account to authorize with your Threads profile.

2. User Access Token Authentication

Best for personal automation and bot accounts using Long-Lived User Tokens (valid for 60 days).

  1. Generate a Threads User Access Token via the Meta Graph API Explorer or Token Exchange endpoint.
  2. Paste the Access Token into the n8n Threads API credential.

Available Resources & Operations

Post

| Operation | Description | | :--- | :--- | | Create and Publish | Creates media container (Text, Image, Video, Carousel) and immediately publishes it | | Create Media Container | Creates a media container ID without publishing | | Publish Container | Publishes a previously created media container using its creation_id | | Get | Retrieves details of a specific post or media by ID | | Get Many | Lists posts published by the user with pagination and date filters | | Delete | Deletes a post by its ID |

Reply

| Operation | Description | | :--- | :--- | | Create | Replies to a specific post or reply | | Get Many | Retrieves direct replies made to a post | | Get Conversation | Retrieves all replies in a conversation thread | | Manage (Hide/Unhide) | Toggles visibility of a reply on your post (hide=true/false) |

User

| Operation | Description | | :--- | :--- | | Get Me | Retrieves the authenticated user's profile info (id, username, name, profile picture, bio, recently searched keywords) | | Get Mentions | Retrieves posts and replies where a user has been mentioned (/{userId}/mentions) | | Get Profile | Retrieves profile details for a given Threads User ID | | Get Publishing Limit | Retrieves current rate limit and quota usage (/me/threads_publishing_limit) | | Exchange for Long-Lived Token | Exchanges a short-lived token (1 hour) for a 60-day long-lived token | | Refresh Long-Lived Token | Refreshes an unexpired long-lived token to reset its 60 days validity |

Insight

| Operation | Description | | :--- | :--- | | Get Media Insights | Retrieves post performance (views, likes, replies, reposts, quotes) | | Get User Insights | Retrieves account-level metrics over time with optional date range (since/until) |

Search

| Operation | Description | | :--- | :--- | | Keyword / Topic Tag Search | Searches public Threads posts matching a keyword or topic tag (#) with ordering (TOP / RECENT) and filters (mediaType, authorUsername, since, until) |

Threads Trigger (Webhook)

Listens for incoming webhooks from Meta:

  • Automatic Challenge Verification: Responds to Meta GET challenge requests with hub.challenge.
  • Event Filtering: Supports All Events, threads_mentions, and threads_replies.
  • Payload Extraction: Cleanly separates changes or passes the full JSON payload.

Meta Threads API Requirements

  • Media URLs: Any image or video URL passed to Threads API must be publicly accessible on the web.
  • Publishing Limits: Meta enforces a standard quota of 250 posts per 24-hour window per user.
  • Scopes Required:
    • threads_basic (profile reading & general API access)
    • threads_content_publish (posting content)
    • threads_read_replies / threads_manage_replies (reply management)
    • threads_manage_insights (analytics)
    • threads_keyword_search (search)

Development & Contributing

To contribute or build locally:

# Clone repository
git clone https://github.com/legenhand/n8n-nodes-threads.git
cd n8n-nodes-threads

# Install dependencies
npm install

# Build
npm run build

# Lint
npm run lint

# Start n8n in dev mode with live reload
npm run dev

License

MIT © Rizki Firmansyah