Actions4
- User Actions
- Search Actions
Overview
This node integrates with the Horizon Data Wave Twitter (X) API, enabling users to interact with Twitter data programmatically. It supports operations such as retrieving user profiles, fetching user posts, and performing searches for users or posts based on queries and advanced filters.
Common scenarios where this node is beneficial include:
- Gathering profile information of specific Twitter users.
- Collecting recent tweets from a user for analysis or monitoring.
- Searching Twitter for users or posts matching certain keywords, hashtags, or other criteria.
- Filtering tweets by language, date range, engagement metrics, or mentions.
Practical examples:
- A marketing team could use it to monitor brand mentions or competitor activity by searching tweets containing relevant keywords.
- A social media analyst might fetch user profiles and their posts to analyze influencer impact.
- A developer could automate alerts when tweets matching specific conditions appear.
Properties
| Name | Meaning |
|---|---|
| Timeout | Timeout in seconds for API requests; valid range is 20 to 1500 seconds (default: 300 seconds). |
Note: The provided input properties JSON only includes the "Timeout" property. However, the node also supports other properties depending on the selected Resource and Operation, such as:
- Resource: Select between "User" and "Search".
- Operation (varies by Resource):
- For "User":
- Get Profile: Requires "User" (Twitter username/handle/URL).
- Get Posts: Requires "User" and "Count" (max number of posts).
- For "Search":
- Search Users: Requires "Query" and "Count".
- Search Posts: Requires "Query", "Count", and optional advanced search options like exact phrase, hashtags, language, date range, minimum replies/likes/retweets, and search type (Top or Latest).
- For "User":
These additional properties are dynamically shown based on the selected Resource and Operation.
Output
The node outputs an array of items, each containing a json field with the response data from the Horizon Data Wave Twitter API.
- For user profile retrieval, the output JSON contains the user's profile details.
- For user posts, the output JSON contains individual tweet objects.
- For search operations, the output JSON contains matched users or tweets according to the query and filters.
If the API returns multiple results as an array, each element is output as a separate item. If a single object is returned, it is output as one item.
The node does not output binary data.
Dependencies
- Requires an API key credential for authentication with the Horizon Data Wave Twitter API.
- The base URL for API requests is
https://api.horizondatawave.ai. - The node uses HTTP POST requests with JSON bodies to interact with the API.
- Proper configuration of the API key credential within n8n is necessary for successful operation.
Troubleshooting
Common Issues
- Missing Credentials: The node throws an error if no API credentials are provided or if the account ID is missing in the credentials.
- API Errors: Errors returned by the API include HTTP status codes and detailed messages in headers or response body.
- Timeouts: Setting the timeout value outside the allowed range (20-1500 seconds) may cause unexpected behavior.
Error Messages and Resolutions
"No credentials provided!": Ensure that the API key credential is configured and assigned to the node."Account ID is missing in credentials!": Verify that the credential includes a valid account identifier.- API error responses include detailed information such as HTTP status, API error message, request ID, execution time, and token usage points. Review these details to diagnose issues like rate limits, invalid parameters, or server errors.
- To continue processing despite errors, enable the node's "Continue On Fail" option; otherwise, errors will stop execution.
Links and References
- Horizon Data Wave API Documentation (assumed base URL)
- Twitter API concepts for user profiles, tweets, and search queries
- n8n documentation on creating and using custom nodes and credentials
