Lark-IM
Lark is an enterprise collaboration and management platform that integrates instant messaging, audio and video conferencing, and open applications. By configuring Lark-IM (Lark chat messages) as a target in Tapdata, you can push alert events, operational metrics, or custom notifications from data pipelines to Lark in real time, enabling real-time alerting, automated collaboration, and decision support for your teams.
Consideration
To avoid overwhelming users with frequent messages, the sending rate is limited to 5 QPS per user and 5 QPS shared across bots in a group.
The maximum size for a text message request body is 150 KB, and the maximum size for a card or rich text message request body is 30 KB.
Typically, upstream sources (such as databases or logs) do not produce data in the message body structure required by Lark. Therefore, you usually need to add a JavaScript or Python processing node in the data pipeline to clean and format the raw data into a JSON structure like the one below:
[
{
"receiveType": "{{user | email | phone | chat}}",
"receiveId": "{{user_open_id | user_email | user_phone | chat_id}}",
"contentType": "text",
"content": "{\"text\":\"Hello! This is lark message! \"}"
}
]
Fields Description
Prerequisites
Log in to the Lark Open Platform as an administrator.
On the homepage of the development platform, open the self-built application.
For instructions on creating a self-built application, see Development Process.
In the left navigation bar, click Credentials & Basic Info to obtain the App ID and App Secret, which are needed when configuring the data source connection.
Set the app availability scope to ensure that the target users or groups for Lark messages are within the app’s visible range to avoid message delivery failures.
Enable the Bot capability for the application. Note that bot capabilities only take effect after the app is published.
Connect to Lark-IM
In the left navigation bar, click Connections.
On the right side of the page, click Create Connection.
In the pop-up dialog, search for and select Lark-IM.
Complete the configuration as described below:
- Name: Enter a unique, business-meaningful name.
- Type: Only supported as a target.
- App ID / App Secret: Obtain these from the Lark Open Platform. See Prerequisites for details.
- Agent Settings: Defaults to Platform automatic allocation, you can also manually specify an agent.
- Model Load Time: If there are less than 10,000 models in the data source, their schema will be updated every hour. But if the number of models exceeds 10,000, the refresh will take place daily at the time you have specified.
Click Test. If the test passes, click Save.
If the connection test fails, follow the on-screen instructions to troubleshoot.