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 operations related to Twitter Spaces, specifically including retrieving buyers of a given Space. The "Get Space Buyers" operation fetches information about users who have purchased access or tickets to a specified Twitter Space.

This node is beneficial for social media managers, marketers, or developers who want to analyze engagement and monetization aspects of Twitter Spaces. For example, you can use it to track paying participants in a live audio event, gather data for audience insights, or automate reporting workflows involving Twitter Spaces.

Properties

Name Meaning
Space ID The unique identifier of the Twitter Space for which to retrieve buyer information.

Output

The output JSON contains detailed information about the buyers of the specified Twitter Space. This typically includes user details such as user IDs, usernames, and possibly metadata related to their purchase or participation status in the Space.

The node does not output binary data for this operation.

Example output structure (simplified):

{
  "data": [
    {
      "user_id": "123456789",
      "username": "buyer_username",
      "purchase_details": {
        "ticket_type": "paid",
        "purchase_time": "2024-01-01T12:00:00Z"
      }
    },
    ...
  ],
  "meta": {
    "result_count": 10,
    "next_token": "abc123"
  }
}

Dependencies

  • Requires an active subscription and valid API key for the external N8N Tools API service.
  • Requires OAuth2 or API key credentials configured in n8n for authenticating with the Twitter API.
  • The node uses the bundled twitter-api helper class to interact with Twitter's API endpoints.
  • Proper permissions/scopes on the Twitter API are necessary to access Spaces and buyer information.

Troubleshooting

  • Invalid subscription or API key error: If you receive errors indicating invalid subscription or API key, verify that your API key credential is correct and has an active subscription with the external N8N Tools API.
  • Permission errors from Twitter API: Ensure that your Twitter API credentials have the required scopes to access Spaces and buyer data.
  • Missing or incorrect Space ID: The Space ID must be provided and valid; otherwise, the API call will fail.
  • Network or rate limit issues: Twitter API enforces rate limits; if exceeded, wait before retrying or handle rate limit errors gracefully.
  • Unhandled exceptions: Enable "Continue On Fail" in the node settings to allow partial processing when some items fail.

Links and References

Discussion