Duaer

Knowledge base

Connect WeCom to the Duaer knowledge base

Index the documents and files in WeCom WeDrive spaces, found only by each space’s members; employees can also ask Duaer in a one-to-one chat with the WeCom app.

What Duaer reads in WeCom

WeCom has no API that lists a company’s WeDrive spaces, so Duaer reads only the spaces you add.

  • WeCom documents: the full text.
  • Files: TXT, Markdown, CSV, TSV, JSON, PDF, Word (.docx), Excel (.xlsx) and PowerPoint (.pptx) up to 20 MB. Other formats and larger files are indexed by title only.
  • Up to 5,000 items per pass, and folders up to 8 levels deep.

Connect WeCom

  1. In the WeCom admin console, open or create a self-built app and copy Corp ID, AgentId and Secret. Give it WeDrive and contacts access, and add Duaer’s server IP to its trusted IPs; see Fix WeCom error 60020.
  2. In Duaer, create a WeCom API credential with those three values.
  3. As an owner or admin, open Data sources in the sidebar, select Add source and choose WeCom, choose Knowledge source under Add as, then choose the credential and click Connect.
  4. Under WeDrive spaces indexed, enter a WeDrive space ID and click Add space. Or enter a Space name and 1 to 3 admins’ WeCom user IDs and click Create knowledge space: everyone in the company can download, and the admins add files.
  5. To let members link their own account, set the callback domain shown on the source under WeCom Authorized Login in the WeCom app. The credential must have an AgentId.

Who finds which file

The files of a space are found only by the space’s members and the people in its member departments; a space open to the whole company is found by every member known in WeCom. Spaces the app cannot read are listed on the source card.

Members are matched to WeCom by email. The source card shows how many members are known in WeCom. A member can link their own account with Link WeCom account under Knowledge base on the Duaer employee portal, or an admin enters their WeCom user ID. A member who is not known finds nothing from WeCom.

How soon changes show

  • Edited files are read again every 10 minutes.
  • Who may open each file is read again every hour.

Ask Duaer in WeCom

  1. On the WeCom source, turn on Ask Duaer in WeCom and set a Token and EncodingAESKey.
  2. In the WeCom self-built app, under Receive messages, set API receiving to the URL shown on the source, with the same Token and EncodingAESKey.
  3. Employees ask in a one-to-one chat with the app in WeCom.

Answers end with their sources and use only what the person asking may open. When they ask it to do something, it sends a link to confirm on the Duaer employee portal, where they can change the inputs first.

Limits

  • Only the WeDrive spaces you add are read.
  • The bot answers in one-to-one chats only.
  • WeCom’s API cannot read employees’ own schedules, so WeCom calendars are not supported.
  • WeCom approvals can also be a process source; see Add a process source.

Questions

WeCom returns 60020. What now?

Duaer’s server IP is not among the app’s trusted IPs. Add it as in Fix WeCom error 60020, then try again.

Why can’t Duaer find all our WeDrive spaces on its own?

WeCom has no API that lists a company’s spaces, so you add each by its space ID, or create a knowledge space from Duaer.

Members cannot link their WeCom account. Why?

Check that the callback domain under WeCom Authorized Login is the one shown on the source, and that the credential has an AgentId.

In this section