N8N Tools - X (Twitter) Enhanced icon

N8N Tools - X (Twitter) Enhanced

Comprehensive X (Twitter) API v2 integration for N8N workflows

Overview

The node provides enhanced integration with the X (formerly Twitter) API v2, enabling a wide range of operations on tweets, users, timelines, media, spaces, lists, bookmarks, direct messages, analytics, and compliance jobs. Specifically for the "Tweets" resource and the "Unlike Tweet" operation, this node allows you to remove a previously liked tweet by its ID.

This is useful in scenarios where you want to programmatically manage your Twitter likes, such as unliking tweets that no longer interest you or automating cleanup of liked content. For example, you could build a workflow that automatically unlikes tweets older than a certain date or based on specific criteria.

Properties

Name Meaning
Tweet ID The unique identifier of the tweet to unlike.
Include Private Metrics Whether to include private metrics in responses (requires elevated access).
Custom Fields Comma-separated list of additional custom fields to include in the response.
Custom Expansions Comma-separated list of expansions to include in the response for richer data.

Note: For the "Unlike Tweet" operation, only the "Tweet ID" property is required and used directly.

Output

The output JSON contains the response from the Twitter API after attempting to unlike the specified tweet. This typically includes confirmation of the unlike action or relevant metadata about the tweet's like status.

If an error occurs (e.g., invalid Tweet ID or insufficient permissions), the node can return an error object describing the issue if "Continue On Fail" is enabled.

No binary data is output by this operation.

Dependencies

  • Requires valid credentials for accessing the Twitter API via OAuth2 or API key.
  • Requires a subscription and valid API key for the external N8N Tools API service, which validates usage before making Twitter API calls.
  • The node uses an internal helper class to interact with Twitter API endpoints.

Troubleshooting

  • Invalid Subscription or API Key: If the node throws an error indicating invalid subscription or API key, verify that your N8N Tools API credentials are correct and active.
  • Invalid Tweet ID: Errors related to the Tweet ID usually mean the provided ID does not exist or is inaccessible. Double-check the Tweet ID value.
  • Permission Issues: Ensure the authenticated Twitter account has permission to unlike the specified tweet.
  • Network or API Rate Limits: Temporary failures may occur due to network issues or Twitter API rate limits; retry after some time.
  • Unsupported File Uploads: Not applicable for this operation but relevant for media uploads.

Links and References


This summary focuses on the "Tweets" resource and the "Unlike Tweet" operation as requested.

Discussion