The Lark / Feishu integration lets workflows send chat messages and create tasks using your own Lark Open Platform app. Unlike Google or Slack, Lark uses your custom app credentials (App ID and App Secret) rather than a shared TogoFlow OAuth client.
What you can do
| Action | Description |
|---|---|
| Send Message | Send a text message to a user or group chat |
| Create Task | Create a task in Lark with an optional due date |
Prerequisites
- A Lark or Feishu workspace where you can create custom apps
- Admin access to the Lark Developer Console (international) or Feishu Open Platform (China)
- Your bot added to any group chats you want to message
Step 1 — Create a custom app
- Open the developer console for your region:
- Lark (International): open.larksuite.com/app
- Feishu (China): open.feishu.cn/app
- Click Create custom app and fill in the app name and description.
- Go to Credentials & Basic Info and copy your App ID (
cli_…) and App Secret.
Step 2 — Enable bot capability
- In your app, open App capabilities (or Add app capability).
- Add Bot capability.
- Publish a new app version so the bot ability takes effect.
Without bot capability enabled, message sending returns error 230006 (Bot ability is not activated).
Step 3 — Grant API permissions
Under Permissions & Scopes, enable at least:
| Permission | Required for |
|---|---|
im:message or im:message:send_as_bot | Send Message |
im:chat:readonly | List group chats in the workflow editor (optional but recommended) |
task:task:write | Create Task |
Publish a new version after changing permissions.
Step 4 — Configure redirect URI (optional)
User authorization is optional. It lets TogoFlow list more of your personal chats and groups in the workflow editor. Basic bot messaging only needs App ID + App Secret.
If you want the chat picker and user-scoped features:
- In your Lark app, open Security settings → Redirect URL.
- Add this TogoFlow API callback URL:
https://api.togoflow.ai/api/v1/auth/callback/lark-oauth
Step 5 — Connect in TogoFlow
- Create or open a workflow and add an Action node.
- Click Select App and choose Lark / Feishu.
- Select an action:
- Send Message — post text to a user or group
- Create Task — create a task with title and optional description
- In the Lark App Credentials section, enter:
- App ID — from the developer console
- App Secret — from the developer console
- Platform — Lark (International) or Feishu (China); must match where your app was created
- Click Connect Lark.
TogoFlow validates your credentials, fetches a tenant_access_token, and stores it securely. The token refreshes automatically before it expires — you do not need to paste access tokens manually.
Optional — Authorize your Lark user
After connecting the app, click Authorize Lark User to grant user-level access. This improves the group chat picker and is useful if you need to target chats beyond those where the bot is already a member.
Send Message
Recipient types
| Type | Use when |
|---|---|
| Group Chat | Sending to a group — pick from a dropdown of available chats |
| User Open ID | Sending a direct message by Open ID |
| User ID | Sending by tenant User ID |
| Sending by the user's email address |
For Group Chat, set Recipient Type to Group Chat. TogoFlow loads chats your bot can access. If the list is empty, add the bot to a group in Lark or complete Authorize Lark User.
Message limits
- Text messages: up to 150 KB
- Rate limit: 5 messages per second per user or per group (shared among bots in the group)
Common send errors
| Error | Cause | Fix |
|---|---|---|
230002 | Bot not in the group | Add the bot to the target group chat |
230006 | Bot ability not enabled | Enable bot capability and publish a new app version |
230013 | Bot has no availability to user | Adjust app availability scope in the developer console |
230027 | Missing permissions | Add im:message / im:message:send_as_bot and republish |
230034 | Invalid recipient ID | Check recipient type matches the ID format |
See the Lark Send Message API docs for the full error reference.
Create Task
Configure:
- Task Title (required)
- Description (optional)
- Due Date (optional) — Unix timestamp in seconds, e.g.
1719878400
Requires the task:task:write permission on your Lark app.
Using template variables
All action fields support TogoFlow template syntax. For example, after a webhook or AI node:
{{inputs.message}}
Use the Variables button next to a field to insert values from upstream nodes.
Token management
- Tenant access token — obtained from your App ID and App Secret; refreshed automatically by TogoFlow
- User access token — optional; obtained via Authorize Lark User; used for listing chats
- Credentials are stored per organization and are never included in workflow exports
Security best practices
- Treat App Secret like a password — do not commit it to source control
- Grant only the API scopes your workflows need
- Use a dedicated Lark app for production automations
- Review connected apps periodically in the Lark developer console
Troubleshooting
| Problem | Fix |
|---|---|
| Connect fails immediately | Verify App ID, App Secret, and Platform (Lark vs Feishu) match your app |
| No chats in the picker | Add the bot to groups, or click Authorize Lark User |
| Messages not delivered to a user | Ensure the bot has availability to that user |
| "Lark connection required" at runtime | Open the Action node and click Connect Lark before publishing |
| User OAuth redirect fails | Confirm the redirect URI in Lark matches your API callback URL exactly |
Related guides
- Connecting Apps — general connection workflow
- OAuth Authentication — how OAuth works in TogoFlow
- Action Node — configuring action nodes