Actions74
- Lists Actions
- Tweets Actions
- Users Actions
- Timelines Actions
- Media Actions
- Spaces Actions
- Direct Messages Actions
- Analytics Actions
- Compliance Actions
Overview
This node provides an enhanced integration with the X (formerly Twitter) API v2, enabling comprehensive access to various Twitter functionalities within n8n workflows. Specifically, for the Analytics resource and the Get User Analytics operation, it retrieves analytical data about a specified user's Twitter account over a defined time period.
Typical use cases include:
- Monitoring user engagement and activity trends.
- Analyzing follower growth or interaction metrics.
- Integrating Twitter analytics into broader marketing or reporting workflows.
For example, a social media manager could automate weekly reports on user analytics by setting the period to "7 Days" and retrieving key metrics without manual intervention.
Properties
| Name | Meaning |
|---|---|
| Period | Time period for analysis. Options: "1 Day", "7 Days", "30 Days", "90 Days". Default is "7 Days". |
Output
The node outputs JSON data containing the user analytics retrieved from the Twitter API. The exact structure depends on the Twitter API response but generally includes metrics such as impressions, engagements, follower counts, and other relevant statistics for the specified user and period.
The output is structured as an array of items, each with a json property holding the analytics data for the corresponding input item.
No binary data output is produced by this operation.
Dependencies
- Requires an active subscription and valid API key credential for the external service referred to as "N8N Tools API".
- Requires OAuth2 or API credentials configured in n8n to authenticate with the Twitter API.
- The node internally validates the API key against the N8N Tools API before making Twitter API calls.
- No additional environment variables are explicitly required beyond standard credential setup.
Troubleshooting
- Invalid Subscription or API Key: If the node throws an error indicating invalid subscription or API key, verify that the API key credential is correct and has the necessary permissions.
- API Rate Limits: Twitter API enforces rate limits; exceeding these may cause errors or delayed responses.
- Missing or Incorrect User ID: Ensure the user ID parameter is correctly provided; otherwise, the analytics data cannot be fetched.
- Network Issues: Connectivity problems between n8n and the Twitter or N8N Tools API endpoints can cause failures.
- Unsupported Period Values: Use only the allowed period options ("1d", "7d", "30d", "90d") to avoid errors.
If the node is set to continue on failure, errors for individual items will be returned in the output with an error message field.