Actions74
- Lists Actions
- Tweets Actions
- Users Actions
- Timelines Actions
- Media Actions
- Spaces Actions
- Direct Messages Actions
- Analytics Actions
- Compliance Actions
Overview
The node provides enhanced integration with the X (formerly Twitter) API v2, enabling workflows to interact with various Twitter resources including Tweets, Users, Timelines, Media, Spaces, Lists, Bookmarks, Direct Messages, Analytics, and Compliance features. Specifically for the Media resource with the Get Media operation, the node retrieves detailed information about a specific media object on Twitter by its Media ID.
This is useful in scenarios where you need to fetch metadata or details about images, videos, or GIFs that have been uploaded or attached to tweets. For example, you might want to verify media properties before processing or displaying them elsewhere, or gather alt text and other accessibility metadata.
Properties
| Name | Meaning |
|---|---|
| Media ID | The unique identifier of the media object to retrieve details for. |
| Custom Fields | Optional comma-separated list of additional custom fields to include in the response. |
Output
- The output JSON contains the detailed data of the requested media object as returned by the Twitter API.
- This includes standard media metadata such as type, URL, alt text, duration (for videos), and any other fields specified via "Custom Fields".
- The node does not output binary data for this operation; it only returns JSON metadata about the media.
Dependencies
- Requires an active subscription and valid API key for the external "N8N Tools API" service used for validation.
- Requires Twitter API credentials configured in n8n to authenticate requests to Twitter's API v2.
- The node uses an internal helper class to communicate with Twitter's API endpoints.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that your API key credential for the external validation service is correct and active.
- Media ID not found or invalid: Ensure the provided Media ID exists and is accessible with your Twitter API credentials.
- Unsupported file upload method: For media upload operations (not Get Media), base64 encoded data must be used; URLs are not supported yet.
- API rate limits: Twitter API enforces rate limits; if you encounter rate limit errors, consider adding delays or reducing request frequency.