登录开始免费试用
easyCoexistence 官方 API

从 Google 表格发布到 Instagram、TikTok 等社交媒体

借助 easyCoexistence,Google 表格中的每一行都会变成 Instagram、TikTok、Facebook 等频道上的一条帖子,通过各平台的官方 API 发布,可立即发布,也可在该行指定的时间发布,最多提前 90 天安排。Claude 会读取表格并安排各行,或由 Apps Script 和 n8n 将每一行发送到 easyCoexistence 的帖子 API。对于 LinkedIn,Claude 会在您批准帖子后再安排发布。

Reads Sheets

Claude 的 Google Drive 连接器对 Google 表格的处理方式(文字说明);该连接器对所有 Claude 用户开放。

90 days

easyCoexistence 队列最早可提前多久发布帖子,从 1 分钟起;安排帖子时复制其媒体。

20,000 a day

Apps Script 对个人 Google 账户允许的 URL Fetch 调用次数;Google Workspace 账户为 100,000 次。

6 minutes

Apps Script 单次执行最长运行时间,超时后 Google 会将其终止。

100 posts

Instagram 账户在滚动 24 小时内可通过 API 发布的帖子数;轮播算作一条。

Claude 如何安排 Google 表格的各行?

在同一个对话中使用两个连接器。连接 Claude 的 Google Drive 连接器,并从 + 按钮中在“连接器”下将其开启,与 easyCoexistence 连接器并列,然后输入:"Read the sheet Content calendar and schedule each row on its account at the time in its publish_at column. Show me each LinkedIn post before you schedule it." Claude 会将各行作为文字读取,并为每一行调用 publish_instagram_post、publish_tiktok_post 或 publish_facebook_post,并附上 scheduled_at;在您于对话中批准帖子后,同样调用 publish_linkedin_post;YouTube 行则调用带 publish_at 的 upload_youtube_video。

在 ChatGPT 中,将 easyCoexistence 添加为自定义 MCP 服务器,然后改为将各行粘贴到对话中。无论哪种方式,帖子都会在 easyCoexistence 的队列中等待,即使对话已关闭,也会在指定时间发布;list_scheduled_posts 可显示已排队的内容。

1Google Drive connectorClaude reads the rows
2easyCoexistence connectorOne publish tool call per row, with scheduled_at
3The queueMedia copied, the post held until its time
4The networkPublished through its official API

表格应如何排版?

每行一条帖子,每列一个字段,这样 Claude 或脚本就能以相同方式读取每一行。account_id 用于指定账户,即 list_social_accounts 返回的值;Partner API 将同一 ID 称为 channel(频道)。publish_at 包含带时区偏移的日期和时间,例如 2026-11-20T09:00:00-03:00,留空则立即发布。media_url 为文件本身的 HTTPS 链接,easyCoexistence 会在安排该行时复制文件,因此该链接只需在那一刻有效。

需要时可添加用于 TikTok 图文帖的 title 列,以及用于 Facebook 和 LinkedIn 的 link 列。status 列用于记录 Apps Script 或 n8n 的执行结果。两者都会在无人确认的情况下发布所读取的行,因此请将 LinkedIn 行从 Posts 工作表中移出,交由 Claude 处理。

account_idThe Instagram, TikTok or Facebook account, or a LinkedIn one for Claude, from list_social_accounts
publish_atISO 8601 with an offset, 1 minute to 90 days ahead; empty posts now
textThe caption, message or commentary
media_urlAn HTTPS link that returns the image or video file
media_typeimage or video, needed when the link has no file extension
statusWritten back: sent, or the error the API returned

Apps Script 如何将每一行发送到 easyCoexistence?

在表格中,依次选择“扩展程序”、“Apps Script”,然后使用 UrlFetchApp。在控制台的“个人资料”、“开发者”下创建 Partner API 密钥,密钥以 ec_live_ 开头,并将其保存为脚本属性,而不要写在代码中。下面的函数读取状态为空的行,将每一行的文本、媒体和 publish_at 发送到 POST /api/v1/channels/<account_id>/posts,并将 sent 或错误信息写入 status 列。其 Idempotency-Key 请求头(即该行的哈希值)会被 easyCoexistence 识别,因此在运行失败后重复的调用不会把帖子重复加入队列。

运行一次 install 以设置定时检查表格;everyMinutes 可设为 1、5、10、15 或 30。较长的表格会分多次运行处理,status 列可确保这一过程安全。

Apps Script: send each new row to easyCoexistence's posts API
// Project Settings > Script properties: EC_API_KEY = ec_live_...
// Sheet "Posts", Instagram, TikTok and Facebook rows only:
// A account_id | B publish_at | C text | D media_url | E media_type | F status
function queueRows() {
  const key = PropertiesService.getScriptProperties().getProperty("EC_API_KEY");
  const sheet = SpreadsheetApp.getActive().getSheetByName("Posts");
  const rows = sheet.getDataRange().getValues();
  for (let i = 1; i < rows.length; i++) {
    const [account, at, text, mediaUrl, mediaType, status] = rows[i];
    if (!account || status) continue;
    const post = { text: String(text) };
    if (mediaUrl) post.media = [{ url: String(mediaUrl), type: mediaType || undefined }];
    if (at) post.publish_at = at instanceof Date ? at.toISOString() : String(at);
    const rowKey = Utilities.base64EncodeWebSafe(Utilities.computeDigest(
      Utilities.DigestAlgorithm.SHA_256, [account, post.publish_at, text, mediaUrl].join("|")));
    const res = UrlFetchApp.fetch("https://easycoexistence.com/api/v1/channels/" + account + "/posts", {
      method: "post",
      contentType: "application/json",
      headers: { Authorization: "Bearer " + key, "Idempotency-Key": rowKey },
      payload: JSON.stringify(post),
      muteHttpExceptions: true,
    });
    const code = res.getResponseCode();
    const ok = code >= 200 && code < 300;
    sheet.getRange(i + 1, 6).setValue(ok ? "sent" : code + ": " + res.getContentText().slice(0, 200));
  }
}

// Run once to check the sheet on a 15-minute timer
function install() {
  ScriptApp.newTrigger("queueRows").timeBased().everyMinutes(15).create();
}

n8n 如何发布各行?

无需代码,只需三个节点。将“Google Sheets Trigger”设为“Row added”,在新增一行时启动工作流。“HTTP Request”节点将其发送到 POST https://easycoexistence.com/api/v1/channels/{{ $json.account_id }}/posts,并使用 Header Auth 凭据,其中包含 Authorization: Bearer 和 ec_live_ 密钥,请求体为由该行各列构成的 JSON。随后,“Google Sheets”节点以“Update Row”操作将结果写入 status 列。

若要让 AI 为每条文案撰写内容,可在 HTTP Request 之前添加一个 AI Agent 节点。或者为该代理添加一个 MCP Client Tool,地址为 https://easycoexistence.com/api/mcp,并使用 OAuth2,由它自行调用发布工具,并附上 scheduled_at;n8n 社交媒体指南介绍了该连接方式。在“Tools to Include”中选择“Selected”,只勾选 publish_instagram_post、publish_tiktok_post 和 publish_facebook_post:此工作流在无人批准每条帖子的情况下发布,因此 LinkedIn 仍交由 Claude 处理。

1Google Sheets TriggerRow added, on the Posts sheet
2HTTP RequestPOST /api/v1/channels/:id/posts
3Google SheetsUpdate Row: the status column

各网络对每行有哪些要求?

以下规则由各网络或 easyCoexistence 自身的检查设定,并在安排该行时应用,因此无法发布的行会被立即拒绝,而不是等到发布时间:

  • Instagram:一张 JPEG 图片、2 至 10 项的轮播、Reel 或 Story,文案最多 2,200 个字符。帖子没有链接字段,因此链接需写在文字中。
  • TikTok:一个 MP4、MOV 或 WebM 格式视频,时长 3 至 600 秒,最大 1 GB;或 1 至 35 张 JPEG 或 WebP 图片,标题最多 90 个字符。
  • Facebook:文字、链接、一张照片或一个视频,链接与文件不能同时出现在同一条帖子中。
  • LinkedIn(在您批准每条帖子后由 Claude 安排):文字最多 3,000 个字符,附一张 JPG、PNG 或 GIF 图片,或附一个链接及其标题。
  • YouTube:通过 upload_youtube_video 并附 publish_at 发送的视频,YouTube 会在此之前保持私密状态;YouTube 要求设置 made_for_kids。

如何确认某行已发布?

无需逐个打开各网络,即可在 easyCoexistence 中查看。Claude 中的 list_scheduled_posts,或代码中带 status 过滤条件的 GET /api/v1/posts,会显示每条帖子的状态:scheduled、publishing、processing、published、failed 或 canceled,帖子上线后还会显示其链接。控制台中的帖子页面会将相同的帖子归入“需要处理”“即将发布”和“已发布”,并提供“取消”“重试”和“忽略”操作。

帖子失败时,所有者会收到一封电子邮件,每个频道在 3 小时内最多一封;在控制台中设置的 events URL 会接收 post.published 和 post.failed 事件,n8n 工作流可将其转化为对该行 status 的更新。若网络对帖子限流,则会在 5 分钟、30 分钟和 2 小时后重试。

设置方法

  1. Connect the accountsIn the easyCoexistence dashboard, choose New connection and sign in to the Instagram, TikTok, Facebook, LinkedIn or YouTube accounts the rows are for.
  2. Lay out the sheetGive each post a row with account_id, publish_at, text, media_url, media_type and status columns.
  3. Choose who sends itAsk Claude to schedule the rows, approving each LinkedIn post, or install the Apps Script with an ec_live_ key or build the n8n workflow for Instagram, TikTok and Facebook rows.

常见错误

  • 将 Google Drive 共享链接用作媒体。它打开的是 Drive 页面,而非文件本身,安排该行时 easyCoexistence 会拒绝网页;请使用直接返回图片或视频本身的链接。
  • 将 publish_at 写成 2026-11-20 09:00 而不带偏移量。easyCoexistence 会拒绝没有时区的时间,因此请添加 -03:00 或 Z,或将该列保留为日期,并让脚本用 toISOString() 进行转换。
  • 在 Instagram 或 TikTok 行中使用 PNG。Instagram 仅发布 JPEG 图片,TikTok 图文帖只接受 JPEG 或 WebP,因此请在安排前先转换图片格式。
  • 排队的 TikTok 行超过 TikTok 每天的上限。其 API 每个账户每天接受 15 条视频帖和 15 条图文帖,每分钟最多 6 条,因此请将繁忙的表格分散到多天。
使用 EasyCoexistence 完成这些操作

easyCoexistence 让您的电子表格,以及读取它的 AI 代理,能通过各平台的官方 API 触达 Instagram、TikTok、Facebook、YouTube 等频道上的客户:提供供 Claude 和 ChatGPT 使用的一个 MCP 连接器、供 Apps Script 和 n8n 使用的帖子 API,以及最多提前 90 天发布的队列,并对每个连接进行 24/7 监控。每个连接每月 US$ 9 至 US$ 0.75,连接越多单价越低,前 3 天免费。

常见问题

即使表格和对话已关闭,帖子也会发布吗?

会。已安排的行会在 easyCoexistence 的队列中等待,并复制其媒体,然后在指定时间发布。之后删除该行不会取消帖子;请使用 cancel_scheduled_post 或 DELETE /api/v1/posts/:id 取消。

一行能发布到多个网络吗?

一条帖子只属于一个账户,因此请为每个网络设置单独的一行,或让 Claude 将一行转换为每个网络的版本并分别安排。每个已连接的账户计为一个连接。

同一张表格能记录 WhatsApp 消息吗?

可以,在单独的工作表中记录。通过 n8n 可将发送到已连接 WhatsApp 号码的消息追加为行,也可从列表中发送已批准的模板;Google Sheets 的 WhatsApp 指南涵盖这两种方式。

用 Google 表格发布帖子,easyCoexistence 收费多少?

每个连接每月 US$ 9 至 US$ 0.75,连接越多单价越低,每个网络的价格相同。MCP 连接器和帖子 API 均包含在内,前 3 天免费。

继续阅读

两分钟连接您的第一个渠道。

无需等待平台审核。连接 WhatsApp、Instagram、TikTok 或其他渠道,然后让您的 AI 发布、回复或生成报告,看它如何运作。

  • 免费试用 3 天
  • 随时取消
  • 仅使用官方 API
  • 全天候 24/7 监控

验证时间