SuperAPI AI Directory

bni-121

Office & productivity

View repository

Updated 10-15 23:45

About this skill

BNI 121 & Referral Auto-Submission

Submit one-to-one (121) meeting records and referral records in batches directly via the API, without needing to operate the UI.

Execution Steps

Step 1: Collect Information

Ask the user for the following information all at once:

  1. BNI Connect account credentials(Email & password)
  2. 121 list: one entry per line, name only
  3. Meeting location
  4. Meeting date(defaults to today, format YYYY-MM-DD)
  5. Referral list(optional): each line in the format 引薦給誰 | 被引薦人姓名

Step 2: Log In to Obtain JWT Token

Log in with agent-browser, and retrieve the JWT token from localStorage.

⚠️ Login pitfall: after logging in, get url may still show /login/; this is React SPA behavior and does not mean failure. Use whether a token exists in localStorage as the basis for success.

agent-browser --session-name bni open "https://www.bniconnectglobal.com/login/"
agent-browser --session-name bni wait --load networkidle

# 取得 ref(每次重新登入 ref 可能不同,必須先 snapshot 再使用)
agent-browser --session-name bni snapshot -i
# 通常:使用者名稱=e11, 密碼=e12, 登入按鈕=e8

agent-browser --session-name bni fill e11 "<email>"
agent-browser --session-name bni fill e12 "<password>"
agent-browser --session-name bni click e8
agent-browser --session-name bni wait --load networkidle
agent-browser --session-name bni wait 2000   # 等 localStorage 寫入完成

# 取出 JWT(不用 get url 判斷,直接讀 token)
TOKEN=$(agent-browser --session-name bni eval "JSON.parse(localStorage.getItem('bniconnect:portal:session')).access_token" | tr -d '"')
echo "Token length: ${#TOKEN}"  # 應為 700+ 字元

Step 3: Batch Submit 121

Use the scripts/submit-121.shin the skill directory, pass parameters via environment variables, with names as positional arguments:

SKILL_DIR="/Users/kevinshu/Projects/bni/.claude/skills/bni-121"
TOKEN="<jwt>" DATE="2026-04-29" LOCATION="東京" COMMENTS="商務交流" \
  bash "$SKILL_DIR/scripts/submit-121.sh" 周澐 張家綺 王大明

⚠️ Name reversal: the BNI API's firstName stores the Chinese "surname",lastName stores the Chinese "given name" (opposite of English convention). The script already handles this.

⚠️ Use curl, not Python urllib: Python urllib may encounter 403; the script uses /usr/bin/curl。

Step 4: Batch Submit Referrals (Optional)

Use the scripts/submit-referral.shin the skill directory, pass each referral in the 接收者|被引薦人 format:

SKILL_DIR="/Users/kevinshu/Projects/bni/.claude/skills/bni-121"
TOKEN="<jwt>" bash "$SKILL_DIR/scripts/submit-referral.sh" \
  "江大大|攤位對面活動廠商" \
  "陳蕃薯|王小明"

⚠️ Defaults to external chapter (cross-chapter): both 121 and referrals are submitted in external chapter mode by default (referralType: OUTSIDE)。

Step 5: Completion Report

Report to the user the respective success counts for 121 and referrals, as well as any failed names and reasons.

API Reference

Function Method Path
Own chapter member list GET /member-api/slips/available-members-list
Cross-chapter search POST /member-api/cross-chapter-search
Submit 121 PUT /member-api/slips/one2one
Submit referral PUT /member-api/slips/referral
  • Base URL:https://api.bniconnectglobal.com
  • Auth:Authorization: Bearer <JWT>
  • dateMet format:YYYY-MM-DDTHH:mm:ss(time is always filled as 00:00:00)
  • comments: conversation topic field
  • HTTP 428: duplicate record detection; when resubmitting, change the header to bypassCheck: true(submit-121.sh already handles this)
  • Token validity period: about 2 hours (expires_in: 7199)
  • Referral defaults:referralType: OUTSIDE、temperature: 5、cardGiven: true