N8N Tools - X (Twitter) Enhanced icon

N8N Tools - X (Twitter) Enhanced

Comprehensive X (Twitter) API v2 integration for N8N workflows

Overview

This node provides an enhanced integration with the X (formerly Twitter) API v2, enabling comprehensive interaction with various Twitter resources such as Tweets, Users, Timelines, Media, Spaces, Lists, Bookmarks, Direct Messages, Analytics, and Compliance features. Specifically, for the Lists - Create List operation, it allows users to create a new Twitter List by specifying its name, description, and privacy status.

Common scenarios where this node is beneficial include automating social media management workflows, such as creating curated lists of Twitter accounts for monitoring or marketing purposes, managing followers, scheduling tweets, analyzing engagement, or handling direct messages programmatically.

Practical example: A marketing team can use this node to automatically create a private list of influencers based on certain criteria, then add members to that list for targeted campaign monitoring.

Properties

Name Meaning
List Name The name of the Twitter List to be created.
List Description An optional description providing details about the List.
Private List Boolean flag indicating whether the List should be private (true) or public (false).

Output

The node outputs JSON data representing the response from the Twitter API after creating the List. This typically includes details of the newly created List such as its unique ID, name, description, privacy status, and other metadata returned by the API.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "data": {
    "id": "123456789",
    "name": "My New List",
    "description": "Description of my list",
    "private": true
  }
}

Dependencies

  • Requires an active subscription and valid API key for the external service referred to as "N8N Tools API" for validation.
  • Requires OAuth2 or API key credentials configured in n8n to authenticate with the Twitter API.
  • The node uses an internal Twitter API client wrapper to interact with Twitter endpoints.
  • Proper permissions/scopes must be granted to the Twitter API credentials to create Lists.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error related to invalid subscription or API key, verify that your API key credential is correct and has an active subscription for the N8N Tools API.
  • Permission errors from Twitter API: Ensure that the Twitter credentials used have the necessary permissions to create Lists.
  • Missing required parameters: The "List Name" property is mandatory; omitting it will cause the operation to fail.
  • Network or rate limit issues: Twitter API enforces rate limits; if you encounter rate limit errors, consider adding delays or handling retries in your workflow.

Links and References

Discussion