1. Overview
The X tool in GoInsight lets you automate common X platform workflows from a single node set. It supports profile lookup, recent-post search, posting, engagement actions, direct messaging, and list membership management.
With the GoInsight X node, you can build workflows for social publishing, basic monitoring, reversible engagement tests, and lightweight account operations. This includes:
- Look up users and posts: Resolve a user by username or numeric ID, and search recent posts with query operators and pagination.
- Publish and clean up posts: Create a post or reply, then delete your own post when you need a reversible test flow.
- Manage engagement: Like, unlike, retweet, and unretweet a target post as the authenticated user.
- Handle account-level actions: Send a one-to-one direct message and add or remove members from a managed X list.
2. Prerequisites
Before using this node, you should prepare the following:
- You need a valid X account and an X developer app or project that is allowed to access the required endpoints.
- You need a GoInsight credential configured for either X OAuth 1.0a user context or X OAuth 2.0 user access.
- Some endpoints may require additional X app permissions, active developer-plan access, available quota, or DM/list-management permissions on the authenticated account.
3. Credentials
For detailed instructions on how to configure and manage credentials, please refer to our official documentation: Credentials Configuration Guide.
This tool currently supports both of the following credential styles in GoInsight:
- X OAuth1.0a API: Uses API key, API secret, access token, and access token secret.
- X OAuth2 API: Uses an OAuth 2.0 user access token.
4. Supported Operations
This node provides operations for working with X users, posts, engagement state, list memberships, and direct messages.
Summary
| Resource | Operation | Description |
|---|---|---|
| User | Get User | Retrieve a detailed X user profile by user ID or by username without the at-sign prefix. |
| Tweet | Search Tweets | Search recent X posts with a query string and optional pagination token for multi-page retrieval. |
| Tweet | Create Tweet | Create a new X post or reply to an existing post when you provide a parent post ID. |
| Tweet | Delete Tweet | Delete one of the authenticated user's own X posts after explicit confirmation. |
| Engagement | Like Tweet | Like a specific X post on behalf of the authenticated user after resolving that user ID. |
| Engagement | Unlike Tweet | Remove an existing like from a specific X post on behalf of the authenticated user after resolving that user ID. |
| Engagement | Retweet Tweet | Retweet a specific X post on behalf of the authenticated user after resolving that user ID. |
| Engagement | Unretweet Tweet | Remove an existing retweet for a specific X post on behalf of the authenticated user after resolving that user ID. |
| List Membership | Add Member to List | Add a specific X user to a managed list by providing both the list ID and the user ID. |
| List Membership | Remove Member from List | Remove a specific X user from a managed list by providing both the list ID and the user ID. |
| Direct Message | Create a Direct Message | Send a new one-to-one direct message to a specific X user by participant ID using user-context credentials. |
Operation Details
Get User
Retrieve a detailed X user profile by user ID or by username without the at-sign prefix.
Input Parameters:
- UserId: Optional user ID lookup target. Provide this when you already have the numeric X user ID.
- Username: Optional username lookup target without @. Provide this when you only know the public handle.
Output:
- Id (string): The unique X user ID.
- Name (string): The display name returned by X.
- Username (string): The handle returned by X, without @.
- MatchedBy (string): Whether the lookup matched by id or username.
- User (object): Detailed user object containing core profile data such as Description, CreatedAt, ProfileImageUrl, Verified, ReceivesYourDm, ReceivesYourDmPresent, and PublicMetrics.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Search Tweets
Search recent X posts with a query string and optional pagination token for multi-page retrieval.
Input Parameters:
- Query: The X recent-search query string. Use standard X operators such as from:, has:, or keywords.
Options:
- MaxResults: Maximum number of posts to return in one page. Allowed values are 10 through 100.
- NextToken: Optional pagination token from the previous response. Leave empty for the first page.
Output:
- Results (array): Matched post list. Each item includes TweetId, Text, AuthorId, ConversationId, CreatedAt, Lang, PublicMetrics, and ReferencedTweets.
- Pagination (object): Pagination metadata containing NextToken, NewestId, OldestId, and ResultCount.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Create Tweet
Create a new X post or reply to an existing post when you provide a parent post ID.
Input Parameters:
- TweetText: The post body to publish. The action sends this text exactly as provided.
Options:
- ReplyToTweetId: Optional parent post ID for reply mode. Leave empty to create a standalone post.
Output:
- TweetId (string): The ID of the newly created post.
- TweetText (string): The text returned by X for the created post.
- ReplyToTweetId (string): The parent post ID used for reply mode, or an empty string for a standalone post.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Delete Tweet
Delete one of the authenticated user's own X posts after explicit confirmation.
Input Parameters:
- TweetId: The target post ID to delete. In most workflows, this comes from Create Tweet or another trusted upstream record.
- Confirm: Safety confirmation flag. Set it to true to allow deletion.
Options:
- Reason: Optional plain-text audit note describing why this deletion is being performed.
Output:
- Deleted (bool): Whether X confirmed the deletion.
- TweetId (string): The post ID that the action attempted to delete.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Like Tweet
Like a specific X post on behalf of the authenticated user after resolving that user ID.
Input Parameters:
- TweetId: The target post ID to like. Obtain it from Search Tweets or another trusted upstream record.
Output:
- Liked (bool): Whether X confirmed the like action.
- AuthenticatedUserId (string): The resolved user ID that performed the like operation.
- TweetId (string): The post ID that the action attempted to like.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Unlike Tweet
Remove an existing like from a specific X post on behalf of the authenticated user after resolving that user ID.
Input Parameters:
- TweetId: The target post ID to unlike. Obtain it from Search Tweets or another trusted upstream record.
Output:
- Unliked (bool): Whether X confirmed the unlike action.
- AuthenticatedUserId (string): The resolved user ID that performed the unlike operation.
- TweetId (string): The post ID that the action attempted to unlike.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Retweet Tweet
Retweet a specific X post on behalf of the authenticated user after resolving that user ID.
Input Parameters:
- TweetId: The target post ID to retweet. Obtain it from Search Tweets or another trusted upstream record.
Output:
- Retweeted (bool): Whether X confirmed the retweet action.
- AuthenticatedUserId (string): The resolved user ID that performed the retweet operation.
- TweetId (string): The post ID that the action attempted to retweet.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Unretweet Tweet
Remove an existing retweet for a specific X post on behalf of the authenticated user after resolving that user ID.
Input Parameters:
- TweetId: The target post ID to unretweet. Obtain it from Search Tweets or another trusted upstream record.
Output:
- Unretweeted (bool): Whether X confirmed the unretweet action.
- AuthenticatedUserId (string): The resolved user ID that performed the unretweet operation.
- TweetId (string): The post ID that the action attempted to unretweet.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Add Member to List
Add a specific X user to a managed list by providing both the list ID and the user ID.
Input Parameters:
- ListId: The target list ID that the authenticated user can manage.
- UserId: The user ID to add. Obtain it from Get User or another trusted upstream record.
Output:
- MemberAdded (bool): Whether X confirmed the membership change.
- ListId (string): The target list ID used for the update.
- UserId (string): The user ID that was added to the list.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Remove Member from List
Remove a specific X user from a managed list by providing both the list ID and the user ID.
Input Parameters:
- ListId: The target list ID that the authenticated user can manage.
- UserId: The user ID to remove. Obtain it from Get User or another trusted upstream record.
Output:
- MemberRemoved (bool): Whether X confirmed the membership removal.
- ListId (string): The target list ID used for the update.
- UserId (string): The user ID that was removed from the list.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
Create a Direct Message
Send a new one-to-one direct message to a specific X user by participant ID using user-context credentials.
Input Parameters:
- ParticipantId: The recipient user ID. Obtain it from Get User or a trusted upstream record.
- Text: The direct message body to send. The action posts the text exactly as provided.
Output:
- DmConversationId (string): The one-to-one DM conversation ID returned by X.
- DmEventId (string): The newly created DM event ID.
- ParticipantId (string): The recipient user ID used for this send operation.
- MessageText (string): The message text that was sent.
- Summary (string): One-sentence success summary for agents and logs.
- Hint (string): Recovery guidance shown only when the action fails.
- Retryable (bool): Whether the same request is safe to retry immediately after failure.
- OriginalStatusCode (number): The raw HTTP status code returned by the X API.
- StatusCode (number): System operation status code. 200 = request completed, -1 = local validation error, 500 = local system or network error.
- ErrorMessage (string): Primary success or failure signal. Empty string means success.
5. Example Usage
This example walks through a simple lookup-first workflow that resolves an X user profile from a public handle.
The workflow consists of three nodes: Start -> Get User -> Answer.
Step-by-Step Guide
- Add the X Node
- In the workflow canvas, click the + button to add a new node.
- In the tool picker, search for X.
- Select the Get User operation.
- Configure Credentials
- Open the X node configuration panel.
- Choose an existing X credential.
- You can use either an X OAuth1.0a API credential or an X OAuth2 API credential, depending on how your app is configured.
- Fill the Lookup Parameters
- Leave UserId empty when you only know the public handle.
- Set Username to a handle without @, for example XDevelopers or elonmusk.
- Run and Inspect the Result
- Click Try Run to execute the workflow.
- Inspect the output fields such as Id, Username, MatchedBy, and User.
- Reuse the returned Id in downstream actions such as Create a Direct Message, Add Member to List, or Remove Member from List.
6. FAQs
Q: Which credential type should I use for X?
A: This tool supports both user-context patterns:
- OAuth 1.0a for traditional user-context requests with API key, API secret, access token, and access token secret.
- OAuth 2.0 user access token for X apps configured with OAuth 2.0 user scopes.
Q: Why do I get 401 Unauthorized?
A: Check the following:
- The selected GoInsight credential is still valid and not expired.
- Your X app is using the correct auth mode for the endpoint.
- The token belongs to the same user context you expect to act on.
Q: Why do I get 402 or quota-related errors on read endpoints?
A: Some X API endpoints may require an eligible developer plan, active quota, or credits on the linked X developer project. The credential alone is not always sufficient when the upstream project has no available quota.
Q: Why does direct message sending fail with 403?
A: Direct messages can fail even when user lookup works. Confirm:
- The X app has DM-related permission or scopes.
- The recipient account allows DMs from the sender account.
- The recipient ParticipantId is a valid numeric user ID, not a username.
Q: How do I obtain UserId, TweetId, ParticipantId, or ListId?
A:
- Use Get User to resolve a numeric UserId from a public username.
- Use Search Tweets or Create Tweet to obtain a TweetId.
- ParticipantId is the same numeric user ID returned by Get User for the DM recipient.
- ListId must come from a list the authenticated user can manage in X.
Leave a Reply.