Retrieve a list of messages from a chat or thread. One of the following scopes is required for using this action:
  • Read and send messages in private and group chats
  • Send messages as an app
External DocumentationTo learn more, visit the Lark documentation.

Basic Parameters

ParameterDescription
Conversation IDThe ID of the Conversation (chat or thread) to retrieve messages from.
Conversation TypeThe type of conversation to retrieve messages from.
Return All PagesAutomatically fetch all resources, page by page.

Advanced Parameters

ParameterDescription
End TimeEnd timestamp for filtering messages. Only messages created before this time will be retrieved. If omitted, includes all messages up to the most recent.
Page SizeThe number of messages to return per page (1-100).
Page TokenA token used for pagination. This value can be obtained from the page_token property from a previous response.
Sort TypeThe order to sort messages by timestamp.
Start TimeStart timestamp for filtering messages. Only messages created after this time will be retrieved. If omitted, includes messages from the earliest available.

Example Output

{
	"code": 0,
	"msg": "success",
	"data": {
		"has_more": false,
		"page_token": "GxmvlNRvP0NdQZpa7yIqf_Lv_QuBwTQ8tXkX7w-irAghVD_TvuYd1aoJ1LQph86O-XImC4X9j9FhUPhXQDvtrQ",
		"items": [
			{
				"message_id": "om_dc13264520392913993dd051dba21dcf",
				"root_id": "om_40eb06e7b84dc71c03e009ad3c754195",
				"parent_id": "om_d4be107c616aed9c1da8ed8068570a9f",
				"msg_type": "interactive",
				"create_time": "1615380573411",
				"update_time": "1615380573411",
				"deleted": false,
				"updated": false,
				"chat_id": "oc_5ad11d72b830411d72b836c20",
				"sender": {
					"id": "cli_9f427eec54ae901b",
					"id_type": "app_id",
					"sender_type": "app",
					"tenant_key": "736588c9260f175e"
				},
				"body": {
					"content": "{\"text\":\"test content\"}"
				},
				"mentions": [
					{
						"key": "@_user_1",
						"id": "ou_155184d1e73cbfb8973e5a9e698e74f2",
						"id_type": "open_id",
						"name": "Tom",
						"tenant_key": "736588c9260f175e"
					}
				],
				"upper_message_id": "om_40eb06e7b84dc71c03e009ad3c754195"
			}
		]
	}
}

Workflow Library Example

List Messages with Lark and Send Results Via Email
Workflow LibraryPreview this Workflow on desktop