N8N Tools - X (Twitter) Enhanced icon

N8N Tools - X (Twitter) Enhanced

Comprehensive X (Twitter) API v2 integration for N8N workflows

Overview

This node integrates with the X (Twitter) API v2 to perform various compliance-related operations, specifically allowing users to create compliance jobs and batch jobs. Compliance jobs are used to request data about tweets or users for regulatory or auditing purposes, such as retrieving deleted tweets or suspended user information. Batch jobs enable bulk processing of compliance requests.

Typical use cases include:

  • Creating a compliance job to track deleted tweets or suspended users.
  • Creating batch jobs to process large sets of user or tweet IDs for compliance checks.
  • Automating compliance workflows in social media monitoring or legal auditing systems.

For example, a user might create a "Tweets" compliance job to receive notifications about deleted tweets relevant to their application or create a batch job to check the compliance status of multiple users at once.

Properties

Name Meaning
Job Type Type of compliance or batch job to create. Options: Tweets, Users, User Lookup, Tweet Lookup, Followers, Following

Output

The node outputs JSON data representing the response from the Twitter API for the created compliance or batch job. This typically includes details such as job ID, type, status, and any metadata returned by the API about the job creation.

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

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for the external service called "N8N Tools API" to validate subscription and access.
  • Requires valid Twitter API credentials (OAuth2 or API key) configured in n8n to interact with Twitter endpoints.
  • The node uses an internal helper class to communicate with Twitter's API v2 endpoints.

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 for the external validation service is correctly set up and active.
  • API rate limits or permission errors: Twitter API may return errors if the authenticated user lacks permissions or exceeds rate limits. Ensure proper Twitter API access levels and handle retries accordingly.
  • Malformed input: Providing invalid or empty job types may cause the API call to fail. Always select a valid job type from the provided options.
  • Batch job data format: When creating batch jobs, ensure that user IDs or other data are properly formatted as comma-separated strings without extra spaces.

Links and References

Discussion