N8N Tools - X (Twitter) Enhanced icon

N8N Tools - X (Twitter) Enhanced

Comprehensive X (Twitter) API v2 integration for N8N workflows

Overview

The "Mute User" operation in the Users resource allows you to mute a specified user on X (formerly Twitter) via the API. Muting a user means their tweets and retweets will no longer appear in your timeline, but you remain connected (unlike blocking). This node is useful for managing your social media feed by filtering out unwanted content without severing connections.

Practical scenarios include:

  • Automatically muting users who post spam or irrelevant content.
  • Managing your timeline during events or campaigns by muting certain accounts temporarily.
  • Integrating with workflows that monitor user behavior and mute based on specific triggers.

Properties

Name Meaning
User ID The unique identifier or @username of the user to mute.
Include Private Metrics Whether to include private metrics in responses (not applicable for mute operation here).
Custom Fields Comma-separated list of additional custom fields to include in API requests (not used in mute).
Custom Expansions Comma-separated list of expansions to include in API requests (not used in mute).

For the "Mute User" operation specifically, only User ID is required and relevant.

Output

The output JSON contains the response from the Twitter API confirming the mute action. It typically includes details about the muted user or a success status. Each item corresponds to one input execution.

No binary data is produced by this operation.

Example output structure (simplified):

{
  "data": {
    "muting": true,
    "user_id": "123456789"
  }
}

Dependencies

  • Requires an active connection to the Twitter API v2.
  • Requires valid API credentials with appropriate permissions to mute users.
  • Uses an external validation call to a third-party API service ("N8N Tools API") to verify subscription and API key before executing Twitter API calls.
  • The node depends on the bundled TwitterApi helper class for making API requests.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that your API key credential is correct and has an active subscription.
  • Permission errors: Ensure the Twitter API credentials have the necessary scopes/permissions to mute users.
  • User not found or invalid User ID: Confirm the User ID or username is correct and exists.
  • Rate limits: Twitter API enforces rate limits; hitting these may cause errors. Implement retry logic or reduce request frequency.
  • Unsupported input format: User ID must be a string representing either the numeric ID or the @username.

Links and References

Discussion