N8N Tools - X (Twitter) Enhanced icon

N8N Tools - X (Twitter) Enhanced

Comprehensive X (Twitter) API v2 integration for N8N workflows

Overview

This node provides enhanced integration with the X (formerly Twitter) API v2, enabling users to perform a wide range of operations related to tweets, users, timelines, media, spaces, lists, bookmarks, direct messages, analytics, and compliance. Specifically, for the Analytics resource and the Get Hashtag Analytics operation, the node fetches analytical data about a specified hashtag over a selected time period.

Use cases include:

  • Monitoring the performance and reach of a specific hashtag on X.
  • Tracking hashtag trends over different periods (1 day, 7 days, 30 days, or 90 days).
  • Informing marketing strategies by analyzing hashtag engagement metrics.

Example: A social media manager wants to analyze how a campaign hashtag performed over the last week to adjust their content strategy accordingly.

Properties

Name Meaning
Hashtag The hashtag to analyze, entered without the leading # symbol.
Period The time period over which to analyze the hashtag. Options: 1 Day, 7 Days, 30 Days, 90 Days.

Output

The node outputs JSON data containing the analytics results for the specified hashtag and period. This typically includes metrics such as usage volume, engagement statistics, and trend information relevant to the hashtag's performance on X.

If multiple input items are processed, the output is an array where each element corresponds to the analytics result of one input item.

No binary data output is produced by this operation.

Dependencies

  • Requires an active subscription and a valid API key credential for the external "N8N Tools API" service that acts as a proxy or enhancer for the Twitter API.
  • The node internally uses a helper class to interact with the Twitter API v2 endpoints.
  • Proper configuration of the API key and workflow credentials in n8n is necessary for successful execution.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API key credential is correctly set up and has the required permissions.
  • HTTP request failures: Network issues or incorrect API endpoint configurations can cause failures. Ensure stable internet connectivity and correct API URL settings.
  • Hashtag format errors: The hashtag should be provided without the # prefix; including it may lead to unexpected results or errors.
  • Period value issues: Use only the allowed period options (1d, 7d, 30d, 90d). Invalid values will likely cause the API call to fail.

Links and References

Discussion