超簡單!1分鐘串接 n8n 自動發布 twitter (X) 推文

原本是考慮要串接 Threads 來自動把我這個平台的貼文發佈,但因為 Meta 的風控實在太謎了,所以改串接 Twitter (X ),不虧是馬斯克,API 超級好串接,1分鐘就能從申請到串接成功,然後達到自動發文!

n8n串接Twitter自動發文的流程

  1. 申請 Twitter (X) 的API (大概10秒就能註冊成功)
  2. 串接 n8n 的 Twitter node (大概10秒就能串接成功)
  3. 好好享受自動發文吧!

Twitter (X) 的 API 要錢嗎?

首先,要申請 X 的 API。我也是申請的時候才知道,原來X的API有提供付費版,讓我對於X的好感度又增加了。

主要有三個版本,Free、Basic、Pro版。

Free免費版每個月就已經能夠自動發500則貼文了,完全是能夠滿足我的需求。

能用到 Pro版一個月費用需要5000美金的,不知道是哪種機構才會使用到哈哈。

申請 Twitter (X) 的 API

首先你要有一個Twitter (X) 的帳號,然後到 X Developer Platform 申請 API。

按照圖解,直接把規則看一下,然後填寫為什麼你要申請API,就可以送出了。

Twitter API 申請原因怎麼寫?

我的申請原因怎麼寫,我也分享在這給你。
填寫送出後,原則上是秒過。

I am applying for access to the Twitter API to integrate it with n8n, a workflow automation tool, in order to automate the posting of tweets. My primary use case involves scheduling and publishing original content such as blog updates, promotional announcements, and interactive posts to engage with my audience. All content posted via the API will be created by me and aligned with Twitter’s terms of service. I do not intend to use the API for scraping data, mass messaging, or posting repetitive or spammy content.

With the integration, specific triggers (such as a new blog post, user form submission, or newsletter publication) in n8n will automatically generate and post tweets. This will allow me to maintain a consistent presence on Twitter, improve engagement, and streamline my content distribution process without manual effort. The API keys will be securely managed, and the automation will be implemented responsibly.

This integration will help me make better use of Twitter as a communication channel with my followers and as part of my broader digital marketing strategy.

設定 Twitter (X) 的 API

接下來我們要設定 Twitter 的 API,你可以依照你的需求去設定,但如果你跟我一樣是要把API用來串n8n的,就直接跟我一樣照著做就可以設定完成了。

這樣你就能拿到 Twitter API 的 Client ID 以及 Client Secret

記得一定要複製到記事本保存下來,我們後面串接n8n需要使用到。

n8n 串接 Twitter API 自動發文

回到 n8n 的 Twitter (X) 節點,把 Client IDClient Secret 填寫上去,然後點擊 Connect my account

接下來頁面會跳出 Twitter (X) 的登入畫面。

點選 Authorize App

這樣就將 Twitter API 授權成功囉!

再來我們簡單填寫 n8n 上的測試貼文。

回到 Twitter 上看,這樣就成功發佈啦~!

2個讚

開心,這篇文3天內排名到Google關鍵字第一名。

無痕模式下,文章排名第一 :smiling_face_with_three_hearts::heart: