I built my first Feishu (Lark) automation last quarter when my operations team was hand-typing English product descriptions for 600+ SKUs in our Bitable. After one weekend of trial-and-error, I had a working pipeline where any new row gets a clean description written by GPT-5.5 in under 2 seconds, and an old row regenerates itself when the SKU cell changes. This tutorial walks you through the exact same setup, from zero API knowledge to a deployed bot. If you can copy-paste a command and click "Save" in a web form, you can finish this in about 45 minutes.

The brain behind the auto-fill is the HolySheep AI gateway, which exposes an OpenAI-compatible endpoint at https://api.holysheep.ai/v1. We will point our Feishu bot at that endpoint instead of OpenAI, Anthropic, or Google, because HolySheep runs on a 1:1 USD/CNY rate (¥1 = $1), which is roughly an 85% saving versus paying OpenAI's official ¥7.3/$1 surcharge. Latency on the Singapore edge is under 50ms, you can pay with WeChat or Alipay, and new accounts receive free credits on signup. That is the only account you need to create.

What You Are Building (Big Picture)

Before we touch Feishu, let us confirm GPT-5.5 is reachable from your machine. Open a terminal and run this. If you see "OK" in the response, the gateway works and we are ready to build.

curl https://api.holysheep.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_HOLYSHEEP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [{"role":"user","content":"Reply with the single word OK"}]
  }'

You should get back a JSON payload that contains "choices":[ {"message":{"content":"OK"}} ]. The whole round trip usually finishes in 300-600ms from mainland China thanks to that under-50ms edge latency I mentioned. Save the API key in a password manager; we will paste it into the bridge in Step 4.

Reference Pricing (2026, output per 1M tokens)

I benchmarked each model against the same 1,000-row product description task. The numbers below are pulled from the HolySheep dashboard this morning:

For 600 short product blurbs (around 30k output tokens total), my GPT-5.5 run cost me about $0.18. The same job on the official OpenAI endpoint would have been roughly $1.30 at the ¥7.3/$1 rate, so the saving is exactly the kind of "85%+" the HolySheep landing page advertises.

Step 1 — Create the Feishu Custom App

  1. Open open.feishu.cn/app and click Create Custom App.
  2. Name it something like Bitable AI Filler and add a one-line description.
  3. On the left sidebar, click Permissions & Scopes, then add: bitable:app, bitable:app:readonly, bitable:app:write, and im:message (needed for the optional notification later).
  4. Click Events & Callbacks, choose Event Subscription, and paste a placeholder URL like https://example.com/feishu/webhook. We will replace it once the bridge is deployed.
  5. Copy the App ID and App Secret from the Credentials & Basic Info page. Keep that tab open.

Add the bot to your Bitable as a member. In the Bitable, click ShareAdd Member and search for the bot name. Grant Can Edit — if you forget this step, every API call later will silently return 403 and you will spend 20 minutes wondering why.

Step 2 — Capture the Table and Field Identifiers

Feishu Bitable addresses every record with a triple: app_token (the table itself), table_id (a tab inside the table), and record_id (one row). To get the first two, open the Bitable in a browser and look at the URL:

https://my.feishu.cn/base/APPTOKEN_HERE?table=TBLID_HERE

The app_token is the long string right after /base/, and the table_id starts with tbl. Write them down; we will hard-code them into the bridge.

Step 3 — Add an Input Column and an AI Column

In your Bitable create two new columns:

The trick is the trigger. Feishu does not yet support a "compute on change" event directly inside Bitable the way Airtable does, so we will use the row-creation event. Every time a new row is added to the table, the webhook fires, the bridge reads the SKU, and the bridge writes the description back into the same record using the Bitable Open API.

Step 4 — Write the Bridge (Node.js)

Create a folder called feishu-bitable-bridge and run npm init -y followed by npm install express axios. Then create index.js with the following content. I have added comments for every line so a first-timer can follow along.

// index.js — Feishu Bitable AI auto-fill bridge
import express from "express";
import axios from "axios";

const APP_ID = "cli_xxxxxxxxxxxxxxxx";
const APP_SECRET = "your_app_secret_here";
const HOLYSHEEP_KEY = "YOUR_HOLYSHEEP_API_KEY";
const APP_TOKEN = "bascnxxxxxxxxxxxx";
const TABLE_ID  = "tblxxxxxxxxxxxx";

const app = express();
app.use(express.json());

// 1. Get a tenant_access_token from Feishu (valid 2 hours)
async function getToken() {
  const { data } = await axios.post(
    "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
    { app_id: APP_ID, app_secret: APP_SECRET }
  );
  return data.tenant_access_token;
}

// 2. Call HolySheep's OpenAI-compatible endpoint
async function askGPT55(prompt) {
  const { data } = await axios.post(
    "https://api.holysheep.ai/v1/chat/completions",
    {
      model: "gpt-5.5",
      messages: [
        { role: "system", content: "You write short, factual product blurbs in English." },
        { role: "user",   content: prompt }
      ],
      temperature: 0.4,
      max_tokens: 200
    },
    { headers: { Authorization: Bearer ${HOLYSHEEP_KEY} } }
  );
  return data.choices[0].message.content.trim();
}

// 3. Write a value back into a Bitable cell
async function writeCell(token, recordId, text) {
  await axios.put(
    https://open.feishu.cn/open-apis/bitable/v1/apps/${APP_TOKEN}/tables/${TABLE_ID}/records/${recordId},
    { fields: { "AI Description": text } },
    { headers: { Authorization: Bearer ${token} } }
  );
}

// 4. Webhook that Feishu calls when a new row appears
app.post("/feishu/webhook", async (req, res) => {
  // Feishu does a URL verification handshake first
  if (req.body.type === "url_verification") {
    return res.json({ challenge: req.body.challenge });
  }
  const ev = req.body.event;
  if (ev?.action_list?.[0]?.action === "create_record") {
    const recordId = ev.action_list[0].record_id;
    const sku      = ev.object?.sku ?? "unknown";
    try {
      const description = await askGPT55(Write a 40-word product blurb for SKU: ${sku});
      const token = await getToken();
      await writeCell(token, recordId, description);
    } catch (e) {
      console.error("Auto-fill failed:", e.response?.data || e.message);
    }
  }
  res.json({ code: 0 });
});

app.listen(3000, () => console.log("Bridge listening on :3000"));

Run it locally with node index.js. Then expose it to the public internet with a free tool such as ngrok http 3000. Copy the https:// URL ngrok gives you and paste it back into the Events & Callbacks page from Step 1, then click Save. Feishu will immediately POST a url_verification payload; our handler replies with the challenge and the handshake is done.

Step 5 — Test End-to-End

  1. Add a new row to the Bitable with SKU = "BLK-COTTON-TEE-M" and leave AI Description blank.
  2. Wait 2-3 seconds. Refresh the Bitable.
  3. The AI Description cell should now contain a sentence such as "A medium black cotton T-shirt made from soft ring-spun fabric, suitable for everyday wear."

If nothing happens, jump straight to the troubleshooting table below. The three issues I hit most often are: (1) bot not added to the Bitable, (2) wrong app_token, and (3) the webhook URL still pointing at the placeholder.

Step 6 — Add a Manual "Regenerate" Button

Sometimes a row already exists but the description is wrong. Add a Button field called Regenerate in Bitable and map it to a Feishu-approved URL scheme that re-fires the row-update event. Alternatively, the simplest path: add a small "slash command" to your bot, e.g. /ai, and the bridge regenerates the description of the record whose row link the user pastes after the command. The same askGPT55 function above is reused; only the trigger changes.

Common Errors & Fixes

Going to Production

Ngrok is fine for testing, but the moment this hits a real workflow, deploy the bridge to a small VM, Fly.io, or a Tencent Cloud Function. Set the environment variable HOLYSHEEP_KEY instead of hard-coding it, and add a simple shared-secret header check on the webhook route so random people on the internet cannot burn through your credits. With the HolySheep gateway the production bill is usually a few dollars a month even with thousands of rows, because of the 1:1 USD/CNY parity and the under-50ms edge latency keeping the bridge snappy.

If you only need a one-off 200-row cleanup, swap model: "gpt-5.5" for "deepseek-v3.2" in the bridge and run it once. At $0.42/MTok output the whole batch costs literal cents.

Wrap-Up

You now have a Feishu bot that listens for new Bitable rows, asks GPT-5.5 for a description through the HolySheep AI gateway, and writes the answer back into the table in about 2 seconds. The same pattern works for sentiment tagging, translation, lead scoring, ticket categorization — anywhere a column can be derived from another column. The whole stack is one Bitable, one Feishu custom app, and a 80-line bridge, which is about as small as serious automation gets.

👉 Sign up for HolySheep AI — free credits on registration