openclaw - 💡(How to fix) Fix Feature Request: Multi-Account Feishu Routing in Bindings [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#51467Fetched 2026-04-08 01:10:50
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
commented ×1

Root Cause

Describe alternatives you've considered

  1. Using peer (user/group ID) - doesn't work because the same user can talk to multiple bots
  2. Using separate channels - requires duplicating the entire feishu channel config
  3. Using separate OpenClaw instances - increases operational complexity

Code Example

{
  bindings: [
    {
      agentId: "main",
      match: {
        channel: "feishu",
        account: "general"  // Route messages from 'general' account
      }
    },
    {
      agentId: "tech", 
      match: {
        channel: "feishu",
        account: "technical"   // Route messages from 'technical' account
      }
    }
  ]
}
RAW_BUFFERClick to expand / collapse

Is your feature request related to a problem? Please describe. Currently, OpenClaw supports multiple Feishu accounts (bots) via the channels.feishu.accounts configuration. However, the bindings routing system cannot distinguish which account (bot) received the message. This makes it impossible to route messages from different Feishu bots to different agents.

For example:

  • Bot A (General Assistant) → should route to main agent
  • Bot B (Technical Specialist) → should route to tech agent

Both bots share the same channel: "feishu", and the peer (user/group ID) is not sufficient to distinguish them since the same user might talk to both bots.

Describe the solution you'd like Add support for account field in bindings match configuration:

{
  bindings: [
    {
      agentId: "main",
      match: {
        channel: "feishu",
        account: "general"  // Route messages from 'general' account
      }
    },
    {
      agentId: "tech", 
      match: {
        channel: "feishu",
        account: "technical"   // Route messages from 'technical' account
      }
    }
  ]
}

Describe alternatives you've considered

  1. Using peer (user/group ID) - doesn't work because the same user can talk to multiple bots
  2. Using separate channels - requires duplicating the entire feishu channel config
  3. Using separate OpenClaw instances - increases operational complexity

Additional context The Feishu plugin already supports multiple accounts in channels.feishu.accounts. The missing piece is exposing the accountId to the bindings routing system when matching inbound messages.

extent analysis

Fix Plan

To add support for the account field in bindings match configuration, follow these steps:

  • Update the bindings schema to include the account field
  • Modify the Feishu plugin to expose the accountId when receiving inbound messages
  • Update the routing system to match the account field in the bindings configuration

Code Changes

// Update bindings schema
const bindingsSchema = {
  type: 'array',
  items: {
    type: 'object',
    properties: {
      agentId: { type: 'string' },
      match: {
        type: 'object',
        properties: {
          channel: { type: 'string' },
          account: { type: 'string' } // Add account field
        },
        required: ['channel']
      }
    },
    required: ['agentId', 'match']
  }
};

// Modify Feishu plugin to expose accountId
function receiveMessage(message) {
  const accountId = message.accountId; // Assuming accountId is available in the message object
  const binding = findBinding(message.channel, accountId);
  // Route message to the matched agent
}

// Update routing system to match account field
function findBinding(channel, accountId) {
  const bindings = getBindings();
  for (const binding of bindings) {
    if (binding.match.channel === channel && binding.match.account === accountId) {
      return binding;
    }
  }
  return null;
}

Verification

To verify the fix, create test cases with different Feishu accounts and bindings configurations. Send messages from each account and verify that they are routed to the correct agents.

Extra Tips

  • Make sure to update the documentation to reflect the new account field in the bindings configuration.
  • Consider adding error handling for cases where the accountId is not available or the binding is not found.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING