
Feishu Batch Sender
- 2 installs
- 20 repo stars
- Updated April 11, 2026
- autogame-17/feishu-skills
feishu-batch-sender is a Claude skill that sends multiple Feishu (Lark) messages in a single call with a configurable delay, supporting text and rich-post content.
About
This skill sends multiple Feishu (Lark) messages in a single call. It accepts a JSON array of plain strings or mixed {type, content} objects (text and rich post) and targets a user ID or chat ID, with a configurable delay between messages (default 500ms). It requires feishu-common to be installed with valid FEISHU_APP_ID and FEISHU_APP_SECRET.
- Sends multiple Feishu (Lark) messages in one call with a configurable inter-message delay
- Supports plain text arrays and mixed content (text and rich post) to a user or chat ID
Feishu Batch Sender by the numbers
- 2 all-time installs (skills.sh)
- Ranked #1,842 of 2,719 Automation & Workflows skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
feishu-batch-sender capabilities & compatibility
- Capabilities
- feishu attendance · feishu calendar
- Use cases
- orchestration
- Runs
- Runs locally
What feishu-batch-sender says it does
Send multiple Feishu (Lark) messages in a single tool call with configurable delay, supporting plain text arrays and mixed content types (text and rich post).
`feishu-common` installed with valid `FEISHU_APP_ID` and `FEISHU_APP_SECRET`.
npx skills add https://github.com/autogame-17/feishu-skills --skill feishu-batch-senderAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2 |
|---|---|
| repo stars | ★ 20 |
| Last updated | April 11, 2026 |
| Repository | autogame-17/feishu-skills ↗ |
What it does
Send a batch of Feishu messages (text or rich post) to a user or chat with a configurable delay between them.
When should I use this skill?
When a user wants to send several Feishu messages at once to a user or chat.
By the numbers
- default 500ms inter-message delay
- 2 content types (text, rich post)
Files
feishu-batch-sender
Send multiple Feishu messages efficiently in a single call. Supports plain text arrays and mixed content types with configurable inter-message delay.
Prerequisites
feishu-commoninstalled with validFEISHU_APP_IDandFEISHU_APP_SECRET.
Usage
Simple Text Batch
node skills/feishu-batch-sender/index.js --target "ou_xxx" --messages '["Hello", "World"]'Mixed Content (Text + Rich Post)
node skills/feishu-batch-sender/index.js --target "ou_xxx" --messages '[{"type":"text","content":"Update:"},{"type":"post","content":"**Bold** detail"}]'Options
| Flag | Description |
|---|---|
--target | User ID (ou_xxx) or Chat ID (oc_xxx) |
--messages | JSON array of strings or {type, content} objects |
--delay | Delay between messages in ms (default: 500) |
const fs = require('fs');
const path = require('path');
const { program } = require('commander');
const { fetchWithAuth } = require('../feishu-common/feishu-client');
program
.option('-t, --target <id>', 'Target user ID (ou_...) or chat ID (oc_...)')
.option('-m, --messages <json>', 'JSON array of messages (strings or objects)')
.option('-f, --file <path>', 'JSON file containing messages array')
.option('--delay <ms>', 'Delay between messages in ms', '500')
.parse(process.argv);
const options = program.opts();
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function main() {
try {
let targetId = options.target;
let messages = [];
if (options.messages) {
try {
messages = JSON.parse(options.messages);
} catch (e) {
// Handle unquoted string if simple text
if (!options.messages.startsWith('[')) {
messages = [options.messages];
} else {
throw new Error(`Invalid JSON in --messages: ${e.message}`);
}
}
} else if (options.file) {
const content = fs.readFileSync(options.file, 'utf8');
messages = JSON.parse(content);
} else {
console.error('Error: Missing --messages or --file');
process.exit(1);
}
if (!Array.isArray(messages)) {
messages = [messages];
}
if (!targetId) {
// Try to infer from environment or default? No, strict requirement.
console.error('Error: Missing --target');
process.exit(1);
}
console.log(`Sending ${messages.length} messages to ${targetId}...`);
const results = [];
const delayMs = parseInt(options.delay, 10) || 500;
for (const [index, msg] of messages.entries()) {
let msgType = 'text';
let content = '';
if (typeof msg === 'string') {
msgType = 'text';
content = JSON.stringify({ text: msg });
} else if (typeof msg === 'object') {
if (msg.type) msgType = msg.type;
if (msgType === 'text') {
content = JSON.stringify({ text: msg.content || msg.text });
} else if (msgType === 'post') {
content = JSON.stringify(msg.content);
// Note: post content is complex structure. If user passes object, stringify it.
} else if (msgType === 'image') {
content = JSON.stringify({ image_key: msg.image_key });
} else if (msgType === 'interactive') {
content = JSON.stringify(msg.card || msg.content);
} else {
// Fallback generic content
content = JSON.stringify(msg.content || msg);
}
}
const receiveIdType = targetId.startsWith('oc_') ? 'chat_id' : 'open_id';
const url = `https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=${receiveIdType}`;
try {
const response = await fetchWithAuth(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
receive_id: targetId,
msg_type: msgType,
content: content
})
});
const data = await response.json();
if (data.code !== 0) {
console.error(`[Message ${index+1}] Failed: ${data.msg} (code ${data.code})`);
results.push({ index, status: 'failed', error: data.msg });
} else {
console.log(`[Message ${index+1}] Sent: ${data.data.message_id}`);
results.push({ index, status: 'success', id: data.data.message_id });
}
} catch (err) {
console.error(`[Message ${index+1}] Network Error: ${err.message}`);
results.push({ index, status: 'error', error: err.message });
}
if (index < messages.length - 1) {
await sleep(delayMs);
}
}
// Summary
const successCount = results.filter(r => r.status === 'success').length;
console.log(`Batch complete: ${successCount}/${messages.length} sent successfully.`);
if (successCount < messages.length) {
process.exit(1); // Indicate partial failure
}
} catch (error) {
console.error(`Fatal Error: ${error.message}`);
process.exit(1);
}
}
main();
{
"name": "feishu-batch-sender",
"version": "1.0.0",
"description": "Send multiple messages efficiently in one go to reduce tool usage.",
"main": "index.js",
"dependencies": {
"axios": "^1.6.0",
"commander": "^14.0.3",
"dotenv": "^16.3.1"
}
}
Related skills
FAQ
What content types can feishu-batch-sender send?
Plain text arrays and mixed content with both text and rich post objects, targeting a user ID or chat ID.
What does it require?
feishu-common installed with valid FEISHU_APP_ID and FEISHU_APP_SECRET.