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 a wide range of operations on various Twitter resources such as Tweets, Users, Timelines, Media, Spaces, Lists, Bookmarks, Direct Messages, Analytics, and Compliance. Specifically for the "Lists" resource and the "Unfollow List" operation, the node allows users to unfollow a specified Twitter List by its List ID.

This functionality is useful in scenarios where you want to programmatically manage your followed lists on Twitter, for example:

  • Automatically unfollowing lists that are no longer relevant.
  • Cleaning up followed lists based on certain workflow conditions.
  • Integrating list management into broader social media automation workflows.

Properties

Name Meaning
List ID The unique identifier of the Twitter List to unfollow.

Output

The node outputs JSON data representing the response from the Twitter API after attempting to unfollow the specified list. This typically includes confirmation of the action or details about the unfollowed list.

The output structure is an array of objects, each containing a json field with the API response and metadata about the item processed. If multiple inputs are processed, multiple output items will be returned.

No binary data output is involved in this operation.

Example output snippet (conceptual):

{
  "json": {
    "data": {
      "following": false,
      "list_id": "123456789"
    }
  },
  "itemData": {
    "item": 0
  }
}

Dependencies

  • Requires an active subscription and valid API key for the external N8N Tools API service used for validation.
  • Requires OAuth2 credentials or API authentication tokens configured in n8n to access the Twitter API.
  • The node depends on the bundled Twitter API client library for making requests to Twitter's endpoints.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API key credential is correctly set up and has the necessary permissions.
  • Twitter API errors: Errors from Twitter (e.g., invalid List ID, permission denied) will be surfaced. Ensure the List ID is correct and the authenticated user has permission to unfollow the list.
  • Network or connectivity issues: Failures in HTTP requests may occur due to network problems; retry or check connectivity.
  • Continue on fail: The node supports continuing execution on individual item failures if enabled, allowing partial success in batch operations.

Links and References

Discussion