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

Keep going

Trigger AI agents from webhooksPoint the provider's webhook at a Hooks endpoint, add one destination per agent target with filters and a task template, and every matching event becomes an agent task with retries and a delivery log.Grok Bot target guideA Hooks destination POSTs one JSON task to your Grok Bot routine URL with a Bearer key; a 2xx means the task was queued. Configure the routine URL and key once, then map event fields into the task template.T3 Code target guideA Hooks destination POSTs JSON to your T3 Code task's On a webhook URL; T3 Code answers 202 when the agent run is accepted. Keep the URL (it carries a token) in a project secret and sign the body when the task requires it.Paseo target guideA Hooks destination POSTs one manual-run dispatch to Paseo Hub (on: manual.run) with project, trigger, actor, and rendered input. Hub answers 200 with a triggerRunId that Hooks records on the delivery.Slack target guideA Hooks Slack destination posts either to an incoming webhook URL already bound to a channel, or to chat.postMessage with a bot token and channel id so one app can reach many channels.Discord target guideA Hooks Discord destination POSTs a message to a channel's incoming webhook URL; that URL carries the token, so it lives in a project secret. Content is plain text with optional embeds, and Discord answers 204 when the message is accepted.Telegram target guideA Hooks Telegram destination calls sendMessage with your bot token and a chat id; the token stays in a project secret. The message text renders from the event, and Telegram's ok flag decides success even when the HTTP status is 200.Microsoft Teams target guideA Hooks Microsoft Teams destination POSTs a MessageCard to an incoming webhook URL from an Office 365 Connector, Power Automate, or Workflows; the URL is a project secret. Connectors answer 200 with the body 1, and Workflows answer 202.