把 hiCreator 接到 Google 表格、CRM 和 Slack

用导出 Excel、分享链接或 API,把达人名单接到 Google 表格、HubSpot、Salesforce 和 Slack。

本页目录

hiCreator 里的达人数据可以用三种方式导到别的工具:把收藏夹导出成 Excel、用链接分享收藏夹、用 API Key 调接口。这篇说明讲怎么用它们接 Google 表格、HubSpot 或 Salesforce 这类 CRM,以及 Slack。

三种导出达人数据的方式

  1. 导出 Excel:打开收藏夹点导出,可以选导出今天、近 7 天或近 30 天收藏的达人。导出免费,不需要写代码。
  2. 分享链接:收藏夹可以生成一个链接,设成只有 Workspace 成员能看,或者拿到链接的任何人都能看。没登录的人打开「仅 Workspace 成员」的链接,会先被要求登录。公开链接不用登录就能看到名单,包括达人的联系邮箱和分享人的账号邮箱。分享免费。
  3. API:用 API Key 调接口,可以按描述找达人、查邮箱、查达人数据,再把结果写进你自己的表格、CRM 或数据库。同一个 API Key 连上 hiCreator MCP 后,还可以导出收藏夹。API 需要付费 Workspace,按积分计费。

创建 API Key:进入 hiLab → API & Skill → API Key Management,点 New key。接口、参数和价格见 API 文档。

Google 表格

把导出的 Excel 导入 Google 表格

  1. 在 hiCreator 把选好的达人加进收藏夹。
  2. 打开收藏夹,导出 Excel。
  3. 在 Google 表格里点 文件 → 导入,上传刚才的文件。

用 Apps Script 自动写入

如果你每天或每周都按同样的条件搜达人,可以用下面这段脚本调 API,把每次搜到的达人追加到「Creators」工作表末尾。脚本不会去掉表里已有的达人。

  1. 建好 API Key(见上面)。
  2. 打开 Google 表格,点 扩展程序 → Apps Script,把脚本粘进去(可以下载文件,也可以展开下面的代码复制)。
  3. 在 项目设置 → 脚本属性 里新增 HICREATOR_API_KEY,值填你的 Key。不要把 Key 直接写在代码里。能编辑这个表格的人也能打开脚本看到这个 Key,所以表格的编辑权限只给可以用这个 Key 的人。
  4. 改 body 里的平台、描述和筛选条件(参数说明见 API 文档的 AI search)。搜 X 的达人时,platform 填 twitter。
  5. 在顶部选 searchCreatorsToSheet,点 运行。第一次会要求授权访问表格和外部网址。
  6. 要定时跑:点左侧 触发器 → 添加触发器,函数选 searchCreatorsToSheet,事件来源选 时间驱动,设好频率后保存。每个表格只设一个触发器:每个触发器都会单独搜索并扣积分。

每次运行都会按返回的达人数扣积分:Instagram、YouTube、TikTok 每位 0.5,X 每位 2。开了邮箱筛选或 TikTok 小黄车筛选另加,见 API 文档。每次搜索前会先按 limit 的人数预留积分,没用完的退回,所以余额要够整个 limit(示例是 40 位:20 积分,X 是 80 积分)。

下载脚本文件(hicreator-google-sheets.gs)

展开代码
// hiCreator → Google Sheets (+ optional Slack). Paste into Extensions → Apps Script.
const API_BASE = 'https://api.hicreator.ai/openapi/v1';

// Write text as plain text (a name starting with "=" would otherwise become a formula); keep numbers as numbers.
function cell(v) {
  if (v === null || v === undefined) return '';
  if (typeof v === 'string' && /^[=+\-@]/.test(v)) return "'" + v;
  return v;
}

function searchCreatorsToSheet() {
  const props = PropertiesService.getScriptProperties();
  const apiKey = props.getProperty('HICREATOR_API_KEY');
  if (!apiKey) throw new Error('Set HICREATOR_API_KEY in Project Settings → Script properties');

  // platform: instagram, youtube, tiktok or twitter (for X)
  const body = {
    platform: 'instagram',
    query: 'Home cooking creators sharing simple, healthy recipes',
    limit: 40,
    filters: { regions: ['US'], languages: ['en'], minFollowers: 10000, maxFollowers: 500000 }
  };

  const HEADER = ['Platform', 'Username', 'Name', 'Followers', 'Region', 'Median plays / views',
    'Median engagement rate', 'Email', 'Profile URL'];

  // Take the lock before the paid search, so a manual run and a scheduled run never overlap.
  // If another run is in progress, skip this one right away instead of spending credits twice.
  const lock = LockService.getDocumentLock();
  if (!lock.tryLock(0)) {
    console.warn('Another run is in progress; skipped this run.');
    return;
  }
  const ss = SpreadsheetApp.getActiveSpreadsheet();
  let rows;
  try {
    // Check the sheet before searching, so credits are never spent on rows that cannot be written
    const sheet = ss.getSheetByName('Creators') || ss.insertSheet('Creators');
    if (sheet.getLastRow() === 0) {
      sheet.appendRow(HEADER);
    } else if (sheet.getRange(1, 1, 1, HEADER.length).getValues()[0].join('|') !== HEADER.join('|')) {
      throw new Error('The first row of the "Creators" sheet must be: ' + HEADER.join(', ') +
        '. Rename that sheet or clear it, then run again.');
    }
    // Make sure the new rows can be written before spending credits
    const firstNewRow = sheet.getLastRow() + 1;
    const end = firstNewRow + body.limit - 1;
    const blocked = sheet.getProtections(SpreadsheetApp.ProtectionType.SHEET).some(p => !p.canEdit()) ||
      sheet.getProtections(SpreadsheetApp.ProtectionType.RANGE).some(p => {
        const r = p.getRange();
        return !p.canEdit() && r.getLastRow() >= firstNewRow && r.getRow() <= end;
      });
    if (blocked) throw new Error('Some cells in the "Creators" sheet are protected. Remove the protection, then run again.');
    // Google Sheets allows up to 20 million cells per spreadsheet
    const cells = ss.getSheets().reduce((n, s) => n + s.getMaxRows() * s.getMaxColumns(), 0);
    const newRows = Math.max(0, end - sheet.getMaxRows());
    if (cells + newRows * sheet.getMaxColumns() > 20000000) {
      throw new Error('This spreadsheet is close to the Google Sheets cell limit. Move older rows to another file, then run again.');
    }

    const res = UrlFetchApp.fetch(API_BASE + '/creators/ai-search', {
      method: 'post',
      contentType: 'application/json',
      headers: { Authorization: 'Bearer ' + apiKey },
      payload: JSON.stringify(body),
      muteHttpExceptions: true
    });
    const code = res.getResponseCode();
    if (code < 200 || code >= 300) throw new Error('hiCreator API ' + code + ': ' + res.getContentText());

    const items = JSON.parse(res.getContentText()).data.items || [];
    // X returns medianViewCount instead of medianPlayCount
    rows = items.map(c => [c.platform, c.username, c.fullName, c.followerCount, c.region,
      c.medianPlayCount ?? c.medianViewCount, c.medianEngagementRate, c.email, c.profileUrl].map(cell));
    if (!rows.length) return;

    try {
      // Find the last row again: someone may have typed into the sheet during the search
      const start = sheet.getLastRow() + 1;
      const needed = start + rows.length - 1 - sheet.getMaxRows();
      if (needed > 0) sheet.insertRowsAfter(sheet.getMaxRows(), needed);
      sheet.getRange(start, 1, rows.length, HEADER.length).setValues(rows);
      SpreadsheetApp.flush();
    } catch (e) {
      // The search is already paid for: keep the results in a new sheet instead of losing them
      const backup = ss.insertSheet('Creators backup ' + Date.now());
      backup.getRange(1, 1, rows.length + 1, HEADER.length).setValues([HEADER].concat(rows));
      throw new Error('Could not write to the "Creators" sheet (' + e.message + '). The results were saved to "' +
        backup.getName() + '".');
    }
  } finally {
    lock.releaseLock();
  }

  const slackUrl = props.getProperty('SLACK_WEBHOOK_URL');
  if (slackUrl) {
    try {
      UrlFetchApp.fetch(slackUrl, {
        method: 'post',
        contentType: 'application/json',
        payload: JSON.stringify({ text: 'hiCreator: added ' + rows.length + ' rows to ' + ss.getUrl() })
      });
    } catch (e) {
      // The rows are already saved; a failed Slack message should not trigger a new paid search
      console.warn('Slack notification failed: ' + e);
    }
  }
}

CRM:HubSpot、Salesforce 等

把导出的 Excel 导入 CRM

  1. 导出收藏夹 Excel。导入前可以在 Excel 里把列名改成和 CRM 里的字段名一样(比如 Email),导入时对应起来更省事。
  2. HubSpot:用导入功能导入联系人,上传文件后核对每一列对应的联系人属性,没对上的手动选。HubSpot 直接支持 .xlsx、.xls 和 .csv,一个文件只能有一个工作表。新建联系人要有 Email 这一列。导出的达人有的没有邮箱,导入前先把这些行筛掉,或者先查到邮箱再导。
  3. Salesforce:数据导入向导读的是 CSV 文件。先在 Excel 里「另存为 CSV」,再到 Setup 里搜 Data Import Wizard,打开向导上传,核对字段对应。Salesforce 新建联系人必须有 Last Name,可以把达人的名字或用户名对应过去。

用 API 写进 CRM

在你自己的后端,或 n8n、Make 这类能发带 Bearer Key 的 HTTP 请求的工具里调 hiCreator API,把返回的字段写进 CRM。n8n 自带 HubSpot 和 Salesforce 节点:先连上你的账号,只把有邮箱的达人传过去,并对应好 Email 字段。Salesforce 还要对应 Last Name,可以填达人名字或账号名。如果你的 Salesforce 版本不含 API 权限,就用上面的 CSV 导入。

Slack

  • 发分享链接:把收藏夹设成只有 Workspace 成员能看,再把链接贴到 Slack 频道里。登录了同一个 hiCreator Workspace 的同事点开链接就能看到这份名单。
  • 自动通知:在 Slack 应用后台打开 Incoming Webhooks,打开 Activate Incoming Webhooks,点 Add New Webhook to Workspace,选频道后点 Allow,复制生成的地址,填进上面 Apps Script 的脚本属性 SLACK_WEBHOOK_URL。脚本每次往表格里加了达人,会往这个频道发一条消息,写明这次加了几行,附上表格链接。没搜到达人时不发。要发到私有频道,先加入那个频道再添加 Webhook。如果你的 Slack 工作区开启了应用审批,要先让管理员批准。消息没发出去时,原因会记在脚本的「执行」记录里。
  • 用 n8n 或 Make:在流程最后加一个 Slack 节点,把结果发到频道里。

常见问题

能接 HubSpot、Salesforce 这类 CRM 吗?

能。导出 Excel 后导入 CRM,或者用 API 写进去,步骤见上面「CRM」一节。

导出和分享收费吗?

不收。收藏、分享、导出 Excel 都免费;调 API 找达人、查邮箱、查达人数据按积分扣。

用 API Key 能导出收藏夹吗?

能。用同一个 API Key 把 hiCreator MCP(https://mcp.hicreator.ai/mcp)连到你的 AI 助手,然后直接说「把某某收藏夹近 7 天收藏的达人导出成 Excel,只要用户名、粉丝数和邮箱」。导出好后会给你一个下载链接,链接几分钟后失效,过期了让 AI 助手再取一次就行。连接步骤见将 hiCreator 接入 AI 工作流。