Building a WeCom Employee Query App | Generated by AI

Home 2026.04

Question: How do you build a support group / service application (服务号) in Enterprise WeChat (WeCom) so that employees can use it to query messages?

Answer:

Building an Internal Support Query App in Enterprise WeChat (WeCom)

In WeCom (Enterprise WeChat), what you want to build is called a 自建应用 (Self-Built Internal Application) — the equivalent of a “service channel” for employees. This is different from a WeChat public 服务号 (which targets external users). The WeCom self-built app lives inside the enterprise, visible only to your employees, and can respond to their queries automatically.

There are two main approaches depending on your technical capability:


Approach 1: No-Code / Low-Code — Use WeCom’s Built-in “Intelligent Robot” (AI Bot)

This is the fastest approach, especially after WeCom 5.0. WeCom’s “Intelligent Robot” feature allows brands to upload internal knowledge sets and build dedicated AI-powered assistants tailored to various departments — such as a Store Assistant, IT Assistant, or HR Assistant. These intelligent assistants can provide instant responses to employee inquiries.

Steps:

Step 1: Log into the WeCom Admin Console

Step 2: Create a Self-Built Application

Step 3: Enable the AI Bot / Intelligent Robot

Step 4: Configure Auto-Reply and FAQ Rules

Step 5: Publish to Employees


Approach 2: Developer Mode — Build a Custom Query Bot via API

This approach gives full control. In the Enterprise WeChat App Management, you create an app, set the logo, name, description, and visibility scope. Then on the settings page of the newly created application, you copy the AgentId and Secret information for later use in your backend system. Click on “Receive Messages” and select “Set API Reception,” then generate a Token and EncodingAESKey.

Architecture Overview

Employee sends message in WeCom app
        ↓
WeCom forwards message to your webhook URL
        ↓
Your backend server receives & processes query
        ↓
Backend queries your database / knowledge base / LLM
        ↓
Backend calls WeCom API to send reply back
        ↓
Employee receives answer in WeCom app

Step-by-Step:

Step 1: Register the App in Admin Console

Step 2: Set Up Message Receiving (Webhook)

Step 3: Configure Trusted IP Whitelist

Step 4: Build Your Backend Server

Example (Node.js / Python pseudocode):

# Flask example - receive and reply to employee queries
from flask import Flask, request
import xml.etree.ElementTree as ET
import requests

app = Flask(__name__)

@app.route('/wecom/callback', methods=['GET', 'POST'])
def callback():
    if request.method == 'GET':
        # Verify URL with WeCom
        return verify_signature(request)
    
    # Parse incoming XML message
    xml_data = ET.fromstring(request.data)
    user_query = xml_data.find('Content').text
    from_user = xml_data.find('FromUserName').text
    
    # Query your knowledge base or LLM
    answer = query_knowledge_base(user_query)
    
    # Send reply via WeCom API
    send_wecom_message(from_user, answer)
    return 'success'

def send_wecom_message(to_user, content):
    access_token = get_access_token()
    url = f"https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token={access_token}"
    payload = {
        "touser": to_user,
        "msgtype": "text",
        "agentid": YOUR_AGENT_ID,
        "text": {"content": content}
    }
    requests.post(url, json=payload)

Step 5: Connect to a Knowledge Base or LLM (Optional but Powerful)

For intelligent responses, connect your backend to:

Step 6: Test and Deploy


Approach 3: Third-Party No-Code Platforms

If you don’t want to code at all, several third-party platforms integrate with WeCom:

Platforms like SaleSmartly deeply integrate with AI engines like DeepSeek and ChatGPT. Businesses can configure automated replies, FAQ responses, and order tracking within such platforms through API connections to WeCom, dramatically accelerating response times.

Other options include:


Summary Comparison

Method Technical Skill Needed Setup Time Flexibility
WeCom AI Bot (Built-in) None Minutes Medium
Custom API Webhook Developer required Days Full
Third-Party Platform Low Hours Medium–High

Key Tips


References:


Back Donate