X

Interact with X (Twitter) API

User → Follow User

AI-generated

Overview

This node enables interaction with the X (formerly Twitter) API, specifically allowing users to follow another user by their user ID. It supports two authentication methods: OAuth 1.0a and Bearer Token. The "Follow User" operation is useful for automating social media engagement workflows, such as automatically following new leads, influencers, or customers based on external triggers.

Practical example:

  • Automatically follow a user when a new contact is added in your CRM.
  • Follow back users who mention your brand on X.
  • Build a curated list of followed users based on specific criteria from other data sources.

Properties

Name Meaning
Authentication Method used to authenticate with the X API. Options: OAuth1.0a, Bearer Token
Target User ID The unique identifier of the user you want to follow

Output

The node outputs the JSON response returned by the X API after attempting to follow the specified user. This typically includes details about the follow action's success or failure. The output is structured as a JSON object under the json key.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the X API using either OAuth 1.0a or a Bearer Token credential.
  • Properly configured credentials must be set up in n8n for authentication.
  • Network access to the X API endpoints is necessary.

Troubleshooting

  • Common issues:

    • Invalid or expired authentication tokens will cause authorization errors.
    • Providing an incorrect or non-existent target user ID will result in an error from the API.
    • Rate limits imposed by the X API may temporarily block requests.
  • Error messages and resolutions:

    • Unauthorized / 401 Error: Check that the API credentials are valid and have not expired.
    • User Not Found / 404 Error: Verify the target user ID is correct and exists.
    • Rate Limit Exceeded: Wait before retrying or implement rate limiting in your workflow.
    • Network Errors: Ensure stable internet connectivity and that the X API is reachable.

Links and References

Discussion