Resources · n8n integration

X n8n integrationAutomate X (Formerly Twitter) with n8n.

How far can a workflow run an X account on its own? The X n8n integration exposes 8 operations across 4 resources: tweets, direct messages, lists and users. No trigger node, the block that starts a workflow, listens to X, so the run begins elsewhere and then posts, searches or likes on demand.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the X n8n integration actually cover?

The X n8n integration is the node shipped with n8n that talks to the X API, the programmatic door into the network, on behalf of one connected account. It publishes and deletes tweets, likes and retweets them, searches public posts from the last seven days, sends direct messages, adds a member to a list and looks up a user by handle. Eight operations, four resources, one OAuth2 credential, the connection saved once in n8n and reused in every workflow.

Start with the publishing side. A workflow that reads an editorial calendar in Google Sheets, keeps the rows due today and runs tweet.create on each one turns a spreadsheet into a posting queue. The same shape works from a CMS: when an article goes live in Wordpress, the workflow assembles the announcement and publishes it, with the article URL in the Text field.

The second use is listening. tweet.search pulls public tweets from the last seven days that match a query, on whatever rhythm you set, and the result can land anywhere: one row per mention in a sheet, a message in Slack for whoever is on duty, or a filter that keeps only what deserves an answer. Since the node also likes and retweets, the same run can react instead of only reporting.

The third is curation. user.searchUser resolves a handle into the account behind it, list.add drops that account into a list, and directMessage.create opens a private conversation when a public reply is the wrong place for it. That trio keeps a list of customers, speakers or competitors current without anyone opening the app.

Everything else goes through HTTP Request. The node stops at 8 operations over 4 resources, and the X API is wider than that. When an endpoint is missing, meaning a specific address of the API, the HTTP Request node calls it directly and reuses the same X credential through predefined authentication, so the workflow keeps a single connection.

Two limits are worth knowing before building. There is no X trigger node, so every workflow starts with another kind of start block, and search never reaches further back than seven days. Ready-made templates pair X with Google Sheets, Wordpress and LinkedIn for multi-channel publishing, the n8n review covers what the platform does well and where it hurts, and the n8n training goes through credentials, expressions and error handling.

Connect

How do you connect X to n8n?

  1. 01

    Create an app in the X developer portal

    An X developer account comes first, then a project in the developer portal. On the project's Overview tab, find the Apps section and select Add App, give the app a name and continue. The default project and app created at sign-up work just as well. This app is what n8n presents to X when it authenticates.

  2. 02

    Set the permissions and the callback URL

    In User authentication settings, select Set Up. Pick Read and write and Direct message as the app permissions if you want every function of the node, then Web App, Automated App or Bot as the type of app. Copy the OAuth Redirect URL shown by n8n, paste it into Callback URI / Redirect URL, add a Website URL and save.

  3. 03

    Paste the keys into an n8n credential

    X then displays a Client ID and a Client Secret. Both go into the matching fields of the X credential in n8n, which runs on OAuth2; the older OAuth 1.0a method has been deprecated since version 0.236.0 and the V2 node. A credential is created once in the Credentials menu, and every workflow then finds it in the node's dropdown.

Actions

What the X node can do, operation by operation

The X (Formerly Twitter) node exposes 8 operations across 4 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.

Resources × operations matrix
ResourceCreateDeleteAdd MemberLikeRetweetSearchGet
Direct Message✓
List✓
Tweet✓✓✓✓✓
User✓

Direct Message

1 operation
01

Create Direct Message

directMessage.create

What you see in n8n

Notes & use cases

A direct message leaves the connected account and reaches one recipient privately, without ever showing on the timeline.

Key parameters

  • User: the recipient, chosen in the list or set from an expression such as {{ $json.author_id }} when the account comes out of an earlier search.
  • Text: the body of the message, URL encoded, with a ceiling of 10000 characters.
  • Attachment ID: optional, under Additional Fields, to associate an attachment with the message.
Use cases
answering a support question privately after spotting it in a public mention, or sending the file link someone asked for in a reply.

List

1 operation
02

Add Member to List

list.add

What you see in n8n

Notes & use cases

Lists gather accounts into a timeline of their own, and this operation puts one account inside one of them.

Key parameters

  • List: the list receiving the member, picked among the account's lists or given by its identifier.
  • User: the account to add, by handle or by ID, often {{ $json.id }} inherited from a Get User step.
Use cases
building a watchlist from every account that mentioned a product name this week, or keeping a list of event speakers current as confirmations arrive.

Tweet

5 operations
03

Create Tweet

tweet.create

What you see in n8n

Notes & use cases

Three outcomes hide behind a single operation: a plain post, a quote, or a reply. The option you fill in is what settles it.

Key parameters

  • Text: the status update itself. URLs have to be encoded, and links wrapped by the t.co shortener still weigh on the character count.
  • Reply to Tweet: points at the tweet being answered, which turns the post into a reply.
  • Quote a Tweet: hooks the quoted tweet under the new text instead.
  • Media ID and Location ID: attach a media item, or tie the post to a place.
Use cases
publishing the calendar rows that came due today, or announcing an article the minute it goes live.
04

Delete Tweet

tweet.delete

What you see in n8n

Notes & use cases

Taking a post down has its own operation, and it works from the tweet identifier, never from its text.

Key parameters

  • Tweet: the tweet to remove, selected in the list or passed as an ID, for instance {{ $json.id }} carried over from a search result.
Use cases
clearing a countdown series once the event has started, or pulling an announcement whose link turned out to be broken.
05

Like Tweet

tweet.like

What you see in n8n

Notes & use cases

One field, one public signal: the connected account likes the tweet you point it at.

Key parameters

  • Tweet: the tweet to like, chosen in the list or taken from the incoming item, which makes it easy to chain right after a search.
Use cases
acknowledging the mentions that passed a tone filter earlier in the workflow, or supporting the posts of a partner network without a human opening the app.
06

Retweet Tweet

tweet.retweet

What you see in n8n

Notes & use cases

Sharing someone else's post with the connected account's audience happens here. Same single field as Like, different effect: the tweet shows up again on the account's own timeline.

Key parameters

  • Tweet: the tweet to retweet, by ID or from the list, usually the item a filter step has just validated.
Use cases
relaying a customer post about a launch, or amplifying the announcements of a handful of accounts after a human approval step.

User

1 operation
08

Get User

user.searchUser

What you see in n8n

Notes & use cases

Handles are what people share; the rest of the node works on the account behind them. This operation bridges the two.

Key parameters

  • User: the account to retrieve, chosen in the list or built from a handle collected earlier in the workflow.
  • Me: switched on, it returns the authenticated account, which is handy to check which account the credential really opens.
Use cases
resolving a handle submitted through a form before adding it to a list, or confirming that a workflow posts from the right account.
Need help

Need help automating X (Formerly Twitter) with n8n?

A person reads every message.

FAQ

Questions that come up before connecting X to n8n

01Is the X n8n integration free?
Yes, on the n8n side. The X node ships with n8n, so there is nothing to install and nothing extra to pay, whether the workflow runs on n8n Cloud or on a self-hosted instance under the Community Edition and its Sustainable Use licence. The same workflow behaves the same way in both places. What sits outside n8n is access to the X API itself: it takes an X developer account and an app created in the developer portal, and the rate limits that apply depend on your developer access plan. What X charges for those plans is not something this page covers.
02What credentials does the X node need in n8n?
OAuth2, and nothing else. n8n used to support X's OAuth 1.0a method and deprecated it from version 0.236.0, with the release of the V2 node, so a new credential goes through OAuth2. It is created once in the Credentials menu with a Client ID and a Client Secret taken from the app in the developer portal, and every workflow reuses it afterwards. Two settings in the app decide the rest: the permissions, where Read and write and Direct message unlocks every function, and the callback URL, which has to match the OAuth Redirect URL that n8n displays.
03What are the limits of the X node in n8n?
Three of them matter in practice. Search only reaches public tweets from the last seven days, and the After and Before options have to stay inside that window without Academic Research access. Rate limits are counted per endpoint by X and depend on the developer access plan; with OAuth2 they are app limits, calculated for the app as a whole rather than per user. And the node stops at 8 operations over 4 resources, so anything the X API offers beyond those goes through the HTTP Request node, which calls any endpoint while reusing the same credential.
04Can n8n react to a new tweet in real time?
No, because the X node has no trigger. Nothing in n8n listens to the X API, so a workflow touching X always starts somewhere else: a Schedule Trigger firing at a fixed interval, an n8n Webhook called by a third-party service, or the trigger of another tool in the chain. For monitoring, the usual build pairs a Schedule Trigger with Search Tweets sorted by recency, plus a step that sets aside what has already been handled. The delay between a tweet going out and the workflow seeing it is whatever interval you set.
05n8n or Make for automating X?
It depends on where the data lives and how you pay. n8n installs on your own server through Docker or npm, or runs on n8n Cloud, and the workflow is identical either way; Make is hosted by its publisher, with no self-hosting option, and is billed per operation. For a few tweets a day the cost gap stays small; for a search that pulls everything with Return All, the operation counter climbs faster. Visual logic differs too, and that is mostly a question of habit. If keeping control over the data matters, self-hosting settles it.