Actions74
- Lists Actions
- Tweets Actions
- Users Actions
- Timelines Actions
- Media Actions
- Spaces Actions
- Direct Messages Actions
- Analytics Actions
- Compliance Actions
Overview
This node integrates with the X (Twitter) API v2 to perform various Twitter-related operations within n8n workflows. Specifically, for the Timelines resource and the Get Retweets operation, it retrieves a list of users who have retweeted a specified tweet. This is useful for social media monitoring, analytics, or engagement tracking scenarios where you want to understand the reach and audience interaction of a particular tweet.
Practical examples include:
- Fetching retweeters of a marketing campaign tweet to analyze audience demographics.
- Monitoring retweet activity on breaking news tweets.
- Automating reports on tweet engagement by collecting retweet data.
Properties
| Name | Meaning |
|---|---|
| Tweet ID | The unique identifier of the tweet for which to retrieve retweets. |
| Max Results | Maximum number of retweet results to return (1 to 100). |
| Pagination Token | Token used for paginating through large result sets. |
| Include Private Metrics | Whether to include private metrics in the response (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 additional related objects in the response. |
Output
The node outputs JSON data representing the retweets of the specified tweet. The structure typically includes:
- An array of user objects who retweeted the tweet, including their public profile information.
- Metadata about the pagination state if more results are available.
- Optional additional fields and expansions as requested via input properties.
If private metrics are included, the output may also contain detailed engagement statistics not publicly visible.
The node does not output binary data for this operation.
Dependencies
- Requires an active subscription and valid API key for the "N8N Tools API" service, which acts as a proxy/validation layer for Twitter API requests.
- Requires OAuth2 or API key credentials configured in n8n for authenticating with Twitter's API.
- The node uses the bundled
twitter-apihelper class to interact with Twitter 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.
- Permission Errors: Including private metrics requires elevated Twitter API access; ensure your Twitter developer account has the necessary permissions.
- Pagination Issues: When retrieving large numbers of retweets, use the pagination token properly to fetch subsequent pages.
- Rate Limits: Twitter API enforces rate limits; excessive requests may cause temporary blocking. Implement delays or handle errors gracefully.
- Malformed Tweet ID: Ensure the Tweet ID provided is valid and corresponds to an existing tweet.
Links and References
- Twitter API v2 Documentation - Tweets and Retweets
- n8n Documentation - Creating Custom Nodes
- X (Twitter) Developer Portal
This summary focuses on the Timelines resource with the Get Retweets operation, describing its inputs, outputs, dependencies, and common troubleshooting tips based on static analysis of the provided source code and property definitions.