Actions74
- Lists Actions
- Tweets Actions
- Users Actions
- Timelines Actions
- Media Actions
- Spaces Actions
- Direct Messages Actions
- Analytics Actions
- Compliance Actions
Overview
The node provides an enhanced integration with the X (formerly Twitter) API v2, enabling users to perform a wide range of operations related to tweets, users, timelines, media, spaces, lists, bookmarks, direct messages, analytics, and compliance. Specifically, for the Analytics resource with the Get Top Performing Tweets operation, the node fetches data about the user's top performing tweets over a specified time period.
This node is beneficial for social media managers, marketers, and analysts who want to automate the retrieval of detailed Twitter analytics within their workflows. For example, it can be used to automatically generate reports on which tweets have the highest engagement in the last 7 days or to monitor performance trends over different periods.
Properties
| Name | Meaning |
|---|---|
| Period | Time period for analysis. Options: "1 Day", "7 Days", "30 Days", "90 Days". |
Output
The node outputs JSON data containing the results of the requested Twitter API operation. For the Get Top Performing Tweets operation under the Analytics resource, the output JSON includes analytics data about the user's top tweets during the selected period. This typically includes metrics such as impressions, engagements, likes, retweets, replies, and other relevant performance indicators.
If multiple input items are processed, the output is an array where each element corresponds to the analytics result of one item.
No binary data output is indicated for this operation.
Dependencies
- Requires an active subscription and valid API key credential for the external "N8N Tools API" service.
- Requires OAuth2 or API credentials for authenticating with the Twitter API v2.
- The node internally uses a helper class to interact with the Twitter API.
- The node performs a validation request to the external API before executing the main operation.
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 configured and active.
- API rate limits: Twitter API has rate limits; exceeding them may cause errors or incomplete data. Consider adding delays or handling rate limit errors gracefully.
- Missing or incorrect parameters: Ensure the "Period" property is set correctly. Invalid values may cause the API call to fail.
- Network or connectivity issues: Failures in HTTP requests to either the N8N Tools API or Twitter API will cause errors. Check network connectivity and proxy settings if applicable.
- Continue on Fail: If enabled, the node will continue processing subsequent items even if some fail, collecting error messages in the output.
Links and References
- Twitter API v2 Documentation
- X (Twitter) Analytics Overview
- n8n Documentation - Creating Custom Nodes
- N8N Tools API (Generic Reference) (Note: Replace with actual URL if available)