Make
通过 TwexAPI 构建 Make Twitter 自动化,实现推文搜索、资料查询、热门推文、平台 webhook 与游标安全 handoff。
无需 X Developer 应用即可用 TwexAPI 构建 Make Twitter 自动化。搜索推文、查询资料、读取热门推文,并将规范化行路由到 Slack、Sheets、Airtable、Notion 或 CRM。
TwexAPI 使用单一 API 密钥与 REST 基址 https://api.twexapi.io。
选择 Make 自动化模式
标准 HTTP 模块
定时或 webhook 驱动场景下用 Make HTTP 模块直接调用 TwexAPI REST。
Custom webhook + agent handoff
接收 MCP capable AI Agent 的严格 JSON,再可视化路由行。
私有自定义集成应用
相同 TwexAPI 操作在多个场景重复时打包可复用模块。
原生 Make X 应用已下线。TwexAPI 仍可通过 HTTP 模块或私有 custom app 使用。
前置条件
- TwexAPI API 密钥
- Make 组织账号
- 可选 Slack、Sheets、Airtable、Notion 或 CRM 模块
- 可选:已连接
https://api.twexapi.io/mcp的 MCP capable AI Agent
连接
创建将 API 密钥存为密码字段的可复用连接:
| 字段 | 值 |
|---|---|
| Parameter name | apiKey |
| Header | Authorization: Bearer {{apiKey}} |
| Base URL | https://api.twexapi.io |
| Connection test | GET /balance |
用 GET /balance 验证 API 密钥且不修改数据。
基础 HTTP 模块模式
| 字段 | 值 |
|---|---|
| Method | 所选端点的 GET 或 POST |
| URL | https://api.twexapi.io 加相对路径 |
| Header | Authorization: Bearer YOUR_API_KEY |
| Body type | POST 请求用 Raw JSON |
一致处理状态码:
401
认证失败。检查 TwexAPI API 密钥。
403
访问被拒。检查账号访问与额度。
429
速率限制。重试前等待并保留游标。
5xx
服务不可用。指数退避重试。
入门模块
| 模块 | TwexAPI 路由 |
|---|---|
| 搜索推文 | POST /twitter/advanced_search/page |
| 获取资料 | GET /twitter/{screen_name}/about |
| 搜索用户 | GET /twitter/search-user/{keyword}/{target_count} |
| 获取趋势 | GET /twitter/global-trending/tweets |
| 列出粉丝 | POST /v3/twitter/users/followers |
| 发帖 | POST /twitter/tweets/create |
搜索推文示例
{
"url": "https://api.twexapi.io/twitter/advanced_search/page",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
"body": {
"searchTerms": ["AI agents lang:en"],
"sortBy": "Latest",
"nextCursor": ""
}
}
在后续 Iterator 模块遍历返回推文。has_next_page 或 has_more 为 true 时在 Make 数据存储保存 next_cursor。
输出 handoff
Make 场景应输出小而稳定的 bundle,而非原始 API 响应。
推文搜索分页
存储查询;映射 tweet_id、text、author_username、created_at、has_next_page、next_cursor。
用户画像记录
存储 user_id、username、name、粉丝数与查询输入。
趋势话题榜单
存储国家、主题、内容标签与推文行及场景元数据。
写入操作 (发推/点赞/关注)
用 CLI --dry-run 预览。写操作需 cookie 或 auth_token。
配方 1:AI Agent handoff 到 Slack
- Custom webhook 接收 MCP AI Agent 的 TwexAPI handoff JSON。
- Iterator 处理
tweets中各项。 - 按关键词或作者过滤。
- Slack 模块发布
author_username、文本与公开 URL。
建议AI Agent prompt:
Use Twexapi MCP to fetch trending tweets for country United States, topic technology, content AI.
Return only JSON with route_used, country, topic, content, has_more, next_cursor, and tweets.
Each tweet must include tweet_id, author_username, text, created_at, like_count, reply_count, and retweet_count.
配方 2:每日搜索到 Google Sheets
- 每日 Schedule 场景。
- HTTP 模块调用
POST /twitter/advanced_search/page。 - Iterator 遍历推文行。
- Google Sheets Append Row 写入
tweet_id、作者、文本、created_at与 URL。
配方 3:粉丝导出到 CRM
- HTTP 模块调用
POST /v3/twitter/users/followers。 - Iterator 处理粉丝行。
- CRM 按
user_idupsert。 - 数据存储保存
next_cursor供下次场景运行。
Router 分支
| 分支 | 条件 | 操作 |
|---|---|---|
| 空结果 | tweets 长度为 0 |
静默停止。 |
| 高互动 | like_count 超过阈值 |
发送 Slack 告警。 |
| 继续分页 | has_more 为 true |
存储 next_cursor。 |
| 错误 | 状态为 401、403 或 429 |
路由到运维通知。 |
测试清单
- 用小页大小(如 5 条推文)运行一次。
- 确认 Iterator 每条推文收到一个 bundle。
- 写入行前确认用
tweet_id去重。 - 确认数据存储含最新
next_cursor。 - 清理场景日志中的 API 密钥。