Skip to content

X Poster

X Poster is a component that lets you post, like, retweet, delete, or modify tweets directly from your Nappai dashboard. It connects to the X (formerly Twitter) API, so you can automate social media actions as part of larger workflows.

How it Works

When you add X Poster to a workflow, you first choose an Operation (e.g., Post Tweet, Like Tweet). The component then uses the X API credentials you set up in Nappai to call the appropriate X endpoint. If you enable Mapping Mode, you can feed a list of tweet IDs or texts and the component will process each item in turn, returning a result for every record. The component handles authentication, request formatting, and error handling so you can focus on building the logic of your automation.

Operations

This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:

  • Post Tweet: Publish a new tweet or reply to an existing one.
  • Like Tweet: Add a like to a specified tweet.
  • Retweet: Share a tweet with your followers.
  • Delete Tweet: Remove a tweet you previously posted.
  • Unlike Tweet: Remove a like from a tweet.
  • Delete Retweet: Remove a retweet you made.

To use the component, first select the operation you need in the “Operation” field.

Inputs

Mapping Mode

This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:

  • Fixed: You type the value directly into the field.
  • Mapped: You connect the output of another component to use its result as the value.
  • Javascript: You write Javascript code to dynamically calculate the value.

This flexibility allows you to create more dynamic and connected workflows.

Input Fields

The following fields are available to configure this component. Each field may be visible in different operations:

  • Operation: Choose the action you want to perform (Post Tweet, Like Tweet, Retweet, Delete Tweet, Unlike Tweet, Delete Retweet).

    • Visible in: Post Tweet, Like Tweet, Retweet, Delete Tweet, Unlike Tweet, Delete Retweet
  • Mapping Mode: Enable mapping mode to process multiple data records in batch.

    • Visible in: Post Tweet, Like Tweet, Retweet, Delete Tweet, Unlike Tweet, Delete Retweet
  • Mode: Choose between a simplified setup with default options or full control with advanced settings.

    • Visible in: Post Tweet
  • Tweet ID: Optional ID of an existing Tweet to reply to. If set, the new Tweet will be posted as a reply.

    • Visible in: Post Tweet
  • Tweet ID: The ID of the Tweet targeted by the operation (Like, Retweet, Delete, Unlike, Unretweet).

    • Visible in: Like Tweet, Retweet, Delete Tweet, Unlike Tweet, Delete Retweet
  • Tweet Text: The text content of the Tweet to publish.

    • Visible in: Post Tweet
  • Username: The username of the user performing the action. Used to resolve the user ID required by the API.

    • Visible in: Like Tweet, Retweet, Unlike Tweet, Delete Retweet
  • Tool Name: The name of the tool that will be used when this component is connected as a tool. This name will be displayed to the agent when it selects tools to use.

    • Visible in: Post Tweet, Like Tweet, Retweet, Delete Tweet, Unlike Tweet, Delete Retweet
  • Tool Description: A detailed description of what this tool does. This description will help the agent understand when and how to use this tool effectively.

    • Visible in: Post Tweet, Like Tweet, Retweet, Delete Tweet, Unlike Tweet, Delete Retweet
  • Tools arguments metadata: Defines the arguments metadata for the tools.

    • Visible in: Post Tweet, Like Tweet, Retweet, Delete Tweet, Unlike Tweet, Delete Retweet

Credential
This component requires a credential of type X API.

  1. Configure the X API credential in the Nappai credentials section.
  2. Select that credential in the component’s Credential field.
    The credential must contain the following data: X API Key, X API Secret Key, X Bearer Token, X Access Token, and X Access Token Secret.

Outputs

  • Tweet Data: The raw data returned from the X API after performing the chosen operation. This can be used to confirm success, log details, or feed into other components.
  • Tool: A tool representation that can be passed to an AI agent, allowing the agent to call this operation programmatically.

Usage Example

Posting a Tweet

  1. Drag X Poster into your workflow.
  2. Set Operation to Post Tweet.
  3. In Mode, choose Simplified (or Advanced if you need custom headers).
  4. Enter the text you want to tweet in Tweet Text.
  5. (Optional) If you want to reply to an existing tweet, enter its ID in the first Tweet ID field.
  6. Connect the Credential field to your X API credential.
  7. Run the workflow. The Tweet Data output will contain the tweet’s ID, timestamp, and other metadata.

Liking a Tweet

  1. Set Operation to Like Tweet.
  2. Enter the tweet’s ID in the second Tweet ID field.
  3. Provide the username of the account that will like the tweet in Username.
  4. Run the workflow. The Tweet Data output will confirm the like action.
  • X API Connector – Manages X API credentials and basic authentication.
  • X Search – Retrieves tweets based on search queries, which can then be fed into X Poster for further actions.

Tips and Best Practices

  • Use Mapping Mode when you need to process many tweets at once (e.g., bulk retweets).
  • Double‑check tweet IDs before deleting or unliking to avoid accidental data loss.
  • Keep your X API credentials secure; never expose them in public workflows.
  • If you need advanced request customization, switch to Advanced Mode and add custom headers or query parameters.

Security Considerations

  • Store X API credentials in Nappai’s secure credential store; never hard‑code them in the workflow.
  • Limit the scope of the X API token to only the permissions required for your operations.
  • Monitor API usage to detect any unexpected activity.