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 interact with various Twitter resources such as Tweets, Users, Timelines, Media, Spaces, Lists, Bookmarks, Direct Messages, Analytics, and Compliance features. Specifically, for the Timelines resource and the Get Home Timeline operation, the node fetches the authenticated user's home timeline tweets.
This operation is useful when you want to retrieve the latest tweets appearing on a user's home feed, which includes tweets from accounts they follow. It supports filtering options like excluding retweets or replies, limiting the number of results, and specifying time ranges.
Practical examples:
- Automatically fetching the latest tweets from your home timeline to analyze trending topics.
- Building dashboards that display recent tweets from followed accounts.
- Filtering out retweets or replies to focus on original content in the timeline.
Properties
| Name | Meaning |
|---|---|
| Max Results | Maximum number of tweets to return (1 to 100). |
| Start Time | ISO 8601 formatted start time to filter tweets from this date/time onward. |
| End Time | ISO 8601 formatted end time to filter tweets up to this date/time. |
| Since ID | Return tweets with IDs greater than this value (used for incremental fetching). |
| Until ID | Return tweets with IDs less than this value. |
| Pagination Token | Token used for paginating through large result sets. |
| Exclude | Optionally exclude "Retweets" and/or "Replies" from the timeline results. |
| Include Private Metrics | Boolean flag to include private metrics data (requires elevated API access). |
| Custom Fields | Comma-separated list of additional tweet fields to include in the response. |
| Custom Expansions | Comma-separated list of expansions to include (e.g., user details, media attachments). |
Output
The output is an array of JSON objects representing tweets from the user's home timeline. Each item contains detailed tweet data according to the requested fields and expansions, including metadata such as author information, media attachments, and optionally private metrics if enabled.
If pagination is involved, the output may include tokens to fetch subsequent pages.
No binary data is output by this operation.
Dependencies
- Requires an API key credential for the external service providing enhanced Twitter API access.
- The node validates the subscription and API key against the external service before making requests.
- Requires proper OAuth2 authentication credentials for Twitter API access configured in n8n.
- The node depends on the bundled
twitter-apihelper class for interacting with Twitter endpoints.
Troubleshooting
- Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that the API key credential is correctly set and active.
- Permission errors: Including private metrics requires elevated access; ensure your Twitter developer account has the necessary permissions.
- Pagination issues: When using pagination tokens, ensure tokens are valid and not expired.
- Date format errors: Start Time and End Time must be in valid ISO 8601 format; otherwise, the API may reject the request.
- Excluding retweets/replies: If no results appear after applying exclusions, try removing these filters to confirm data availability.