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

n8n-nodes-twitter-auth

v2.6.0

Published

Custom n8n node to post tweets (with photos/videos) to your profile and X (Twitter) Communities using auth_token cookie authentication.

Readme

n8n-nodes-twitter-auth

Custom n8n community node to interact with X (Twitter) using auth_token cookie authentication. Post tweets with media to your profile and Communities — no official API keys required.

n8n License

Features

| Feature | Method | Description | |---------|--------|-------------| | Post to Profile | GraphQL API | Fast, direct tweet creation via internal API | | Post to Community | Browser (Puppeteer) | Navigates to community page and posts via UI | | Upload Photos | Chunked Upload API | JPEG, PNG, WebP, GIF support | | Upload Videos | Chunked Upload API | MP4 with automatic processing wait | | Like Tweet | GraphQL API | Like any tweet by ID | | Retweet | GraphQL API | Retweet any tweet by ID | | Follow / Unfollow | REST API | Follow or unfollow users by ID | | Account Info | GraphQL API | Get authenticated account details |

Installation

Via n8n UI (Recommended)

  1. Go to Settings → Community Nodes
  2. Click Install a community node
  3. Enter: n8n-nodes-twitter-auth
  4. Click Install

Via npm

npm install n8n-nodes-twitter-auth

Then set the environment variable to load it:

export N8N_CUSTOM_EXTENSIONS="/path/to/node_modules/n8n-nodes-twitter-auth"

Setup

Getting your auth_token

  1. Open x.com in your browser and log in
  2. Open Developer Tools (F12) → Application tab → Cookieshttps://x.com
  3. Find the cookie named auth_token
  4. Copy its value

Configuring in n8n

  1. Add the Twitter Auth Tweet node to your workflow
  2. Create new credentials → Twitter Auth Token API
  3. Paste your auth_token value
  4. Save

Usage

Post a Tweet (Profile)

  1. Set Operation to Criar Tweet
  2. Type your tweet text
  3. Execute

Post to a Community

  1. Set Operation to Criar Tweet
  2. Enable Postar em Comunidade
  3. Enter the Community ID (find it in the community URL: x.com/i/communities/XXXXXXXXX)
  4. Execute

Note: Community posting uses Puppeteer with bundled Chromium (downloaded automatically on install). No need to have Google Chrome installed.

Post with Media

  1. Use an HTTP Request or Read Binary File node to load your image/video
  2. Connect it to the Twitter Auth Tweet node
  3. Enable Incluir Mídia
  4. Set the Binary Property Name (default: data). For multiple files, separate with commas: photo1,photo2

Supported formats: JPEG, PNG, WebP, GIF, MP4

Limits: Up to 4 images or 1 video per tweet.

Requirements

  • n8n v1.0.0 or later
  • Valid X (Twitter) auth_token
  • Chromium is bundled automatically — no need to install Chrome

How It Works

This node uses Twitter's internal GraphQL API (the same one the website uses) with cookie-based authentication. No official API keys or developer account needed.

  • Profile tweets: Direct GraphQL CreateTweet mutation
  • Community tweets: Puppeteer with bundled Chromium navigates to the community page and posts through the UI, since the API ignores community_id
  • Media upload: Chunked upload to upload.twitter.com (INIT → APPEND → FINALIZE → STATUS)
  • Session management: Each execution creates a fresh session with full cookie collection to avoid rate limiting

License

MIT