N8N Tools - X (Twitter) Enhanced icon

N8N Tools - X (Twitter) Enhanced

Comprehensive X (Twitter) API v2 integration for N8N workflows

Overview

This node integrates with the X (formerly Twitter) API v2 to perform various user-related operations, including retrieving followers of a specified user. The "Get Followers" operation fetches a list of users who follow a given user ID or username. This is useful for social media managers, marketers, or developers who want to analyze or engage with a user's audience.

Practical examples:

  • Retrieve followers of a brand's official account to analyze audience demographics.
  • Monitor new followers for influencer marketing campaigns.
  • Build custom follower lists for targeted outreach or notifications.

Properties

Name Meaning
User ID The target user's ID or @username whose followers you want to retrieve.
Max Results Maximum number of follower results to return (1 to 100).
Pagination Token Token used for paginating through large follower lists.
Include Private Metrics Whether to include private metrics in the response (requires elevated API access).
Custom Fields Comma-separated list of additional user fields to include in the response.
Custom Expansions Comma-separated list of expansions to include for richer data (e.g., related objects).

Output

The node outputs an array of JSON objects representing the followers of the specified user. Each object contains user details as returned by the Twitter API, potentially enriched with custom fields and expansions if specified.

If private metrics are included, additional sensitive data about followers may be present.

No binary data output is produced by this operation.

Dependencies

  • Requires an active subscription and valid API key credential for the external N8N Tools API service that validates usage.
  • Requires OAuth2 or API key credentials configured in n8n for authenticating with the Twitter API.
  • The node depends on the bundled twitter-api helper class to interact with Twitter endpoints.

Troubleshooting

  • Invalid subscription or API key error: Occurs if the N8N Tools API key is missing, invalid, or expired. Verify your API key and subscription status.
  • Rate limiting: Twitter API enforces rate limits; exceeding them will cause errors. Implement pagination and respect limits.
  • Invalid User ID or username: Ensure the provided user identifier is correct and exists on Twitter.
  • Missing elevated access: Including private metrics requires special API access; without it, requests will fail.
  • Pagination token issues: Using an invalid or expired pagination token will result in errors; omit or refresh tokens as needed.

Links and References

Discussion