Guide · Verified November 17, 2026
Lark target guide
Short answer: A Hooks Lark destination posts a text message to a group's custom bot webhook on open.larksuite.com. The URL is a project secret, and when the bot's signature check is on, Hooks adds the timestamp and HMAC-SHA256 signature the bot requires.
Lark custom bots are one URL per group and need only a text body. Signature checking is optional but common in locked-down workspaces; Hooks signs exactly as Lark expects, and a business code inside a 200 response still counts as a failed delivery.
1. Add a custom bot to the group
In the target group open Settings → Bots → Add Bot → Custom Bot, then copy the webhook URL. It has the shape https://open.larksuite.com/open-apis/bot/v2/hook/<id>; treat the whole URL as a credential because the path token is the only authentication a custom bot has.
2. Store the URL as a project secret
Settings → Security → Project secrets → add LARK_WEBHOOK_URL. The destination config references it as {{secret.LARK_WEBHOOK_URL}}; a literal URL is rejected at save time, and a URL on any other host is rejected before anything is sent.
Destination config
{
"webhookUrl": "{{secret.LARK_WEBHOOK_URL}}",
"text": "New {{event.type}}: {{event.subject.title}}\n{{event.subject.url}}",
"signature": { "secret": "{{secret.LARK_SIGN_SECRET}}" }
}3. Enable signature checking when the bot requires it
If the bot's security settings enable signature verification, add the signing secret as LARK_SIGN_SECRET and include the signature block. Hooks sends timestamp (Unix seconds) plus sign = Base64(HMAC-SHA256(key = "<timestamp>\n<secret>", message = "")) — the timestamp and secret form the HMAC key and the signed message is empty. A bot that expects a signature rejects an unsigned message, and an enabled check has a one-hour clock tolerance, so keep the system clock accurate.
Request Hooks sends (signed)
POST https://open.larksuite.com/open-apis/bot/v2/hook/<id>
Content-Type: application/json
{"msg_type":"text","content":{"text":"New pull_request.opened: Login fails on Safari\nhttps://github.com/acme/app/pull/7"},"timestamp":"1770000000","sign":"<base64 digest>"}4. Read the business code, not only the HTTP status
A custom bot reports failures with HTTP 200 and a non-zero business code, so Hooks checks the body: code 0 succeeds, while codes such as 19021 (signature mismatch) or 19024 (keyword not found) fail permanently and the message names the code and reason. A 2xx response without a JSON body is treated as success, because Lark documents no failure shape there and a retry would risk a duplicate message. 429 retries honoring Retry-After; 408, 425, and 5xx retry; 3xx is blocked. Only text messages are built today — send post or interactive cards through a generic webhook destination.
Frequently asked questions
Which host should the webhook URL use?
The international deployment uses https://open.larksuite.com/open-apis/bot/v2/hook/<id>. Hooks checks the host before sending, so a URL copied from another service fails instead of posting to the wrong place.
Why is a 200 response recorded as failed?
Lark custom bots return HTTP 200 with a non-zero business code on failure. Hooks reads code and msg, records the failure, and does not report the delivery as succeeded.
How is the Lark signature computed?
Base64(HMAC-SHA256(key = "<timestamp>\n<secret>", message = "")). The timestamp is in seconds and is part of the key; the signed message is empty.
Can I send an interactive card?
Not through this target yet — it builds msg_type text only. Use a generic webhook destination or the HTTP target with your own JSON body for post or interactive cards.
Reference
- Custom bothttps://open.larksuite.com/document/client-docs/bot-v3/add-custom-bot
- Signature checkhttps://open.larksuite.com/document/client-docs/bot-v3/add-custom-bot#3259408c
- Payload templateshttps://hooks.events/docs/templates.md
- Secrets & rotationhttps://hooks.events/docs/secrets.md