> ## Documentation Index
> Fetch the complete documentation index at: https://docs.profy.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# WeCom

> Connect and use Expert in WeCom

Connect your AI Expert to WeCom (WeChat Work), allowing team members to use your Expert directly in WeCom conversations. The WeCom channel features a unique "edit mode" message delivery — replies are updated in real time within a single message, providing a smoother reading experience.

## Integration Methods

<AccordionGroup>
  <Accordion title="QR Code Quick Setup (Recommended)">
    Complete setup in just a few minutes:

    1. Go to "Channel Integration" in Expert Studio and select WeCom
    2. Click "Scan to Connect"
    3. Scan the QR code with a WeCom admin account
    4. Confirm authorization — the system completes configuration automatically
    5. Search for the app name in WeCom to start testing
  </Accordion>

  <Accordion title="Manual Configuration">
    Choose manual setup when you need fine-grained permission control:

    <Steps>
      <Step title="Create a WeCom App">
        Log in to the [WeCom Admin Console](https://work.weixin.qq.com), go to "App Management" → "Custom" → Create App. Fill in the app name, icon, and visibility scope.
      </Step>

      <Step title="Configure Message Receiving">
        In the app details under "Receive Messages," enable API message receiving. Enter the callback URL provided by Profy, and take note of the Token and EncodingAESKey.
      </Step>

      <Step title="Obtain Credentials">
        Record the app's AgentId, along with the enterprise's CorpId and app Secret.
      </Step>

      <Step title="Enter in Profy">
        Enter the CorpId, AgentId, Secret, Token, and EncodingAESKey in the Profy channel configuration panel.
      </Step>

      <Step title="Verify Callback">
        After saving the configuration, WeCom will send a verification request to the callback URL. The Profy service handles verification automatically.
      </Step>
    </Steps>
  </Accordion>
</AccordionGroup>

## Message Delivery: Edit Mode

The WeCom channel's message style differs from other platforms:

<Note>
  WeCom uses "edit mode" (StreamBridge) — the Expert's reply is **updated in real time within a single message** rather than sending multiple message bubbles. Similar to the typewriter effect you see on the web interface.
</Note>

### Advantages of Edit Mode

| Feature                              | Description                                             |
| ------------------------------------ | ------------------------------------------------------- |
| **Fewer notification interruptions** | No repeated alerts from multiple messages               |
| **Coherent reading**                 | Reply content updates continuously in the same location |
| **Visible progress**                 | You can see the Expert outputting content in real time  |

### Tool Call Display

When the Expert calls a tool, the message content updates to show the current execution status (e.g., "Searching..."). Once complete, it's replaced with the final reply. The entire process happens within a single message.

## How to Use

### In-App Conversation

Find the configured app in WeCom's "Workbench," tap to enter the conversation interface, and start sending messages directly.

### One-on-One Chat

Find the app bot in your contacts and send a message to start a private conversation.

<Tip>
  WeCom's edit mode is particularly well-suited for scenarios requiring long replies (such as document generation or analysis reports), since responses won't be split into multiple messages.
</Tip>

## Detailed Setup Steps (Manual Mode)

<Steps>
  <Step title="Create App in WeCom Admin Console">
    Under "App Management" → "Custom," create an app with:

    * App name (recommended to match your Expert's name)
    * App icon
    * Visibility scope (select which departments/members can access it)
  </Step>

  <Step title="Enable API Message Receiving">
    Go to App Details → "Receive Messages" → Set up API receiving:

    * URL: Enter the callback URL provided by Profy
    * Token: Auto-generated or custom
    * EncodingAESKey: Auto-generated or custom
  </Step>

  <Step title="Configure Trusted Domain">
    Add Profy's service egress IP to the "Trusted Enterprise IPs" if required.
  </Step>

  <Step title="Submit Profy Configuration">
    Enter all credentials in the Profy Expert Studio channel configuration and click save.
  </Step>

  <Step title="Test">
    Send a test message to the app in WeCom and verify that you receive a proper reply.
  </Step>
</Steps>

## Important Notes

<Warning>
  * Creating WeCom apps requires admin privileges
  * The visibility scope determines which employees can use this Expert
  * In edit mode, message update frequency is subject to WeCom API rate limits — extremely rapid consecutive updates may be throttled
</Warning>

## FAQ

<AccordionGroup>
  <Accordion title="Message verification failed">
    Ensure the Token and EncodingAESKey are exactly identical in both the Profy configuration and WeCom configuration. Watch out for trailing spaces.
  </Accordion>

  <Accordion title="Can't find the app">
    Verify that your WeCom account is within the app's visibility scope. If the scope was recently modified, it may take a few minutes to take effect.
  </Accordion>

  <Accordion title="Incomplete reply content">
    WeCom has a character limit per message. If the Expert's reply exceeds the limit, it will be truncated. Consider adjusting the reply length in your Expert configuration.
  </Accordion>
</AccordionGroup>

## Related Pages

<CardGroup cols={2}>
  <Card title="Channels Overview" icon="layer-group" href="/en/documentation/channels/overview">
    Learn about all supported IM platforms
  </Card>

  <Card title="WeChat Integration" icon="message" href="/en/documentation/channels/wechat">
    WeChat Official Account channel setup guide
  </Card>
</CardGroup>
