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 (Twitter) API v2 to provide enhanced functionality for managing Twitter media and other resources within n8n workflows. Specifically, the "Get Media Upload Status" operation under the "Media" resource allows users to check the current upload status of a media item previously uploaded to Twitter.

This is useful in scenarios where media uploads are asynchronous or take time to process, such as uploading videos or large images. By checking the upload status, workflows can programmatically determine when media is ready for use in tweets or other operations.

Practical example:

  • After uploading a video file to Twitter using the node's media upload operation, you can use this operation to poll the upload status until it is complete before proceeding to create a tweet referencing that media.

Properties

Name Meaning
Tweet ID The unique identifier of the tweet. Required for some media-related operations but not for this one specifically.
Custom Fields Comma-separated list of additional custom fields to include in the response. Optional.
Media ID The unique identifier of the media whose upload status you want to retrieve. This is required.

Output

The node outputs JSON data representing the media upload status information returned by the Twitter API. This typically includes details such as:

  • The current state of the upload (e.g., pending, succeeded, failed).
  • Any progress or error messages related to the upload.
  • Metadata about the media item.

If the media upload is still processing, the output helps determine whether to wait or retry later.

The node does not output binary data for this operation; it only returns JSON metadata about the media upload status.

Dependencies

  • Requires an active connection to the Twitter API v2 via OAuth2 or API key credentials configured in n8n.
  • Uses an external validation API ("N8N Tools API") to verify subscription and API key validity before making Twitter API calls.
  • The node depends on the bundled twitter-api helper class for interacting with Twitter endpoints.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that your API credentials are correct and have the necessary permissions.
  • Media ID missing or incorrect: Ensure the Media ID provided is valid and corresponds to an existing media upload.
  • Network or API errors: Temporary network issues or Twitter API rate limits may cause failures. Implement retry logic or check Twitter API status.
  • Unsupported file upload URL: For media upload operations (not this one), URLs are not supported yet; base64 encoded data must be used.

Links and References

Discussion