Actions7
- Tweet Actions
- User Actions
Overview
This node, named "X Scraper by Lab3," allows users to scrape and interact with data from the social media platform X (formerly Twitter). It supports operations on two main resources: Tweets and Users. For the User resource, it can retrieve user profile information and fetch tweets posted by a specific user.
Common scenarios where this node is beneficial include:
- Automating the retrieval of user profile data for analysis or monitoring.
- Collecting recent tweets from a user for sentiment analysis, content aggregation, or reporting.
- Integrating social media data into workflows without manual scraping.
Practical example:
- A marketing team wants to monitor a competitor's latest tweets automatically. They configure this node to get tweets by username and feed the data into an analytics pipeline.
Properties
| Name | Meaning |
|---|---|
| User | The user you want to search. You specify the user by their username (e.g., "n8n"). This property uses a resource locator mode that currently supports searching by username only. |
Note: The provided properties JSON defines only the "User" input property relevant to the "Get" operation on the "User" resource.
Output
The node outputs JSON data representing the requested user information or tweets depending on the operation:
- For the Get User operation, the output JSON contains detailed user profile data as returned by the scraper library. This typically includes fields like username, display name, bio, follower count, etc.
- For other user-related operations (not requested here), the output would contain arrays of tweets or messages.
No binary data output is indicated for the "Get User" operation.
Dependencies
- Requires an API key credential with several authentication tokens/cookies (
guest_id,kdt,twid,ct0,auth_token) to access the X platform. - Uses an internal scraper library ("Eliza") to perform authenticated requests.
- The node expects these credentials to be configured in n8n before execution.
Troubleshooting
- Missing Credentials Error: If any required authentication tokens are missing, the node throws an error listing which tokens are absent. Ensure all required tokens are set in the API key credential.
- Failed to Initialize Scraper: Indicates issues creating the scraper instance, possibly due to invalid or expired credentials.
- Operation Not Implemented: Some user operations like "getTimeline" are not implemented yet and will return a placeholder message.
- Continue On Fail: If enabled, errors during individual item processing will be captured in the output JSON under an
errorfield instead of stopping the workflow.
Links and References
- X Platform Developer Documentation (for general API concepts; note this node uses scraping)
- n8n Documentation - Creating Custom Nodes
- Lab3 X Scraper GitHub Repository (if publicly available)
If you need details about other operations or resources, please provide their names.