The FeishuGetHistory
node is part of the comfyui_LLM_party
project and is designed to interact with Feishu, a popular Chinese team collaboration and messaging platform similar to Slack. This node retrieves historical messages from a specified group chat within Feishu. It performs this by obtaining the necessary authentication token, querying the Feishu API, and fetching messages based on the specified parameters.
The node accepts the following inputs:
App ID (app_id): A string value representing the App ID associated with your Feishu application. This is required to authenticate API requests.
App Secret (app_secret): A string value that serves as the secret key associated with your Feishu application for authentication purposes.
Chat ID (chat_id): A string representing the ID of the group chat whose history you wish to retrieve.
Mode (mode): A mode selection that determines how the node fetches messages. The options are:
auto
: Automatically fetch messages in real-time.fixed_time_diff
: Fetch messages from within a specified time interval.Time Difference in Seconds (time_diff_sec): An integer specifying the time interval in seconds from which messages should be fetched when using the fixed_time_diff
mode. The default is 60 seconds.
The node produces the following outputs:
Response (response): A string containing the retrieved message content from the Feishu group chat.
Log Info (log_info): A string providing detailed information about the API response, useful for debugging and understanding the API operations.
Message ID (message_id): A string representing the ID of the specific message retrieved.
Output is Text (output_is_text): A Boolean indicating whether the retrieved message is of text type.
Output is Audio (output_is_audio): A Boolean indicating whether the retrieved message is of audio type.
Output is Image (output_is_image): A Boolean indicating whether the retrieved message is of image type.
Show Help (show_help): Provides help or guidance text, currently a placeholder.
In ComfyUI workflows, the FeishuGetHistory
node can be used to integrate historical message retrieval capabilities from Feishu into larger automation workflows. For example, it can be used to:
Authentication Management: The node handles Feishu's token-based authentication, automatically refreshing tokens before they expire to maintain seamless operation.
Message Filtering: The node can retrieve different types of messages (text, audio, image) and identify the content type for further processing.
Operational Modes: The node offers two modes of operation (auto and fixed time difference) to adapt to different message retrieval needs.
Feishu Integration: While using this node, ensure that your app is properly registered with Feishu, and you have valid credentials (App ID and App Secret) for successful API interactions.
Localization Support: The node supports multiple languages for display names based on locale settings or configuration preferences.
This node is particularly useful for developers and users seeking to incorporate historical data retrieval from Feishu into their ComfyUI workflows, providing a bridge between team communication tools and automated UI processes.