Duaer

Troubleshooting

Fix DingTalk robot error 310000 in Duaer

When Duaer posts to a DingTalk group robot with HTTP Request and gets errcode 310000, a robot security check failed: keyword, signature, or IP allowlist.

Post to a DingTalk robot from Duaer

HTTP Request: Method POST, URL the robot webhook, Send Body JSON, body {"msgtype":"text","text":{"content":{{ JSON.stringify($json.message) }}}}.

DingTalk returns HTTP 200 even on failure, so the Duaer node looks green. Read errcode in the output. Anything but 0 failed. Add If and Stop and Error to surface it.

Read errmsg for 310000

  • keywords not in content: the robot has custom keywords and the message has none. Put a keyword at the start.
  • sign not match or invalid timestamp: signing is on and the signature or timestamp is wrong. Use milliseconds, within one hour.
  • ip … not in whitelist: an IP range is set and the Duaer egress IP is outside it. Self-hosted: add your server egress IP. Cloud: use keywords or signing.

Sign requests in Duaer

  1. Add Edit Fields with a field ts set to {{ $now.toMillis() }} (milliseconds).
  2. Add Crypto: Action Hmac, Type SHA256, Encoding BASE64, Property Name sign. Put the robot secret (starts with SEC) in the credential Hmac Secret.
  3. Set Value to {{ $json.ts + "\n" + "SECyour-secret" }}, which is timestamp, newline, secret.
  4. Append &timestamp={{ $json.ts }}&sign={{ encodeURIComponent($json.sign) }} to the HTTP Request URL.

The secret sits in the Crypto node. Keywords are simpler when you do not need signing. Each robot accepts up to 20 messages a minute, so batch them.

Questions

Does Duaer have a DingTalk node?

Duaer calls the DingTalk robot webhook with HTTP Request and builds the signature with the Crypto node.

Duaer shows success but nothing reaches the DingTalk group?

DingTalk returns HTTP 200 on failure too. Read errcode and errmsg in the Duaer node output. 310000 means a security check failed.

In this section