Skip to main content
WeCom (企业微信, also known as WeChat Work) is the dominant enterprise messaging platform in China. The RecordEngine WeCom integration sends document processing notifications to your WeCom channels automatically, and enables document submission directly from WeCom — without opening the RecordEngine web UI.

What the Integration Does

Processing notifications

When a document is processed and ready for review, a WeCom message is sent to the responsible team member or group — with the document summary, confidence score, and a direct link to review it.

Exception alerts

When a document is flagged as an Exception (low confidence, missing fields, rule trigger), an alert is sent immediately so nothing falls through the cracks.

Approval confirmations

When a document is approved and exported, a confirmation message notifies the relevant contact — useful for internal sign-off workflows.

Document submission via chat

Team members can send document files directly in a WeCom chat. The integration forwards them to RecordEngine for processing automatically — no browser login needed.

Part A — Outbound Notifications (WeCom Webhook)

This is the simpler of the two integration paths. RecordEngine fires an outbound webhook when documents reach key statuses; an automation platform receives the webhook and forwards a formatted message to WeCom.

Step 1 — Create a WeCom Group Bot

  1. Open the WeCom group chat where you want notifications delivered
  2. Click the group name → Group BotsAdd Bot
  3. Give the bot a name (e.g. RecordEngine Notifications)
  4. Copy the Webhook URL — it looks like:
    https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY
    

Step 2 — Build the Notification Scenario

Trigger: RecordEngine Document Webhook (Custom Webhook in your automation platform) Action: HTTP — POST to the WeCom Group Bot Webhook URL Message body:
{
  "msgtype": "markdown",
  "markdown": {
    "content": "**📄 New Document Ready for Review**\n\n**File:** {{filename}}\n**Contact:** {{contact_name}}\n**Confidence:** {{confidence_score}}% ({{confidence_label}})\n**Summary:** {{ai_summary}}\n\n[Open in RecordEngine]({{doc_url}})"
  }
}
Replace {{filename}}, {{contact_name}}, etc. with the actual field mappings from the webhook payload in your automation platform. WeCom notification message showing document summary and review link

Notification Triggers to Configure

Set up separate scenarios (or conditions within one scenario) for each notification type:
Status reachedNotification content
Needs ReviewDocument ready — summary + confidence + review link
Exception⚠️ Alert — document flagged, confidence score, reason
Approved✅ Approved — document name + approver
Export📤 Exported to accounting system

Part B — Document Submission from WeCom

This more advanced path lets team members submit documents for processing by sending them in a WeCom chat. The document is automatically forwarded to RecordEngine without requiring anyone to log into the web UI.

How It Works

Team member sends file in WeCom chat
    → WeCom forwards to your automation platform (via WeCom App webhook)
    → Automation downloads the file
    → Automation uploads file to RecordEngine API
    → RecordEngine processes the document
    → Notification sent back to WeCom when ready

Requirements

  • A WeCom Self-Built Application (自建应用) with message receive permissions
  • WeCom API credentials: corpid, corpsecret, agentid
  • Your automation platform configured to receive WeCom message webhooks

Step 1 — Create a WeCom Self-Built Application

  1. Log into the WeCom Admin Console (work.weixin.qq.com)
  2. Go to Applications → Self-BuiltCreate Application
  3. Set the application name (e.g. RecordEngine)
  4. Under Receive Messages, enable message receiving and enter your automation platform’s webhook URL
  5. Note your AgentId, CorpId, and Secret

Step 2 — Build the Submission Scenario

Trigger: Webhooks — receive the WeCom message event (your automation platform’s incoming webhook URL was set in the WeCom app above) Condition: Check that the message type is file (not a text message) Action 1: WeCom API — Download the file using the media_id from the message event Action 2: RecordEngine API — Upload the file
POST /api/documents/upload
file: [downloaded file]
contact_id: [mapped from sender's WeCom user ID or hardcoded]
folder_id: [target folder ID]
Action 3: WeCom API — Send a reply message to the sender confirming receipt:
"✅ Your document has been received and is being processed. I'll notify you when it's ready."
Action 4: (After processing — triggered by the Document Webhook) — WeCom API — Send the results back to the sender with the confidence score and a review link.

Mapping WeCom Users to RecordEngine Contacts

For the submission flow to automatically assign documents to the right contact, you need a way to map from a WeCom user ID to a RecordEngine contact ID. Simple approach: Use a fixed contact/folder for all WeCom submissions. A reviewer then manually reassigns documents after processing. Advanced approach: Maintain a lookup table in your automation platform’s data store mapping WeCom user IDs to RecordEngine contact IDs. When a message arrives, look up the sender’s WeCom ID and use the corresponding contact_id in the upload request.

WeCom vs. Standard WeChat

This integration is for WeCom (企业微信) — the enterprise version. It does not work with standard WeChat (微信). Standard WeChat does not provide API access for custom enterprise integrations.

Troubleshooting

IssueFix
Bot messages not appearingConfirm the Group Bot webhook URL is correct and the bot is still active in the group
WeCom app not receiving messagesVerify the message receive URL is set correctly in the WeCom Admin Console and is publicly accessible
File download failingThe media_id from WeCom expires after 5 days — download the file immediately when the message event arrives
RecordEngine upload failingCheck the API token and confirm contact_id and folder_id exist in RecordEngine
errcode: 40014 from WeCom APIThe access_token has expired — your automation needs to refresh it before making WeCom API calls
For more help see Integration Troubleshooting.