by witmeng · v0.0.2
DingTalk Spreadsheet, requires the following permissions (dingtalk-document, user/get.)
This community listing does not yet include every recommended support, privacy, pricing, and permission disclosure. Review the available package permissions before installing.
Available inside your emploidai workspace after installation.
Available inside your emploidai workspace after installation.
The DingTalk Spreadsheet Plugin is a collection of tools for operating on spreadsheets in DingTalk documents. Through this plugin, you can read, write, and modify DingTalk spreadsheets on the Dify platform without manually opening DingTalk documents to complete data processing.
Using this plugin requires the following DingTalk permissions:
Configuration method: Log in to the DingTalk developer backend > Enterprise internal development > Find the application that needs to add permissions > Permission management > Address book management page, check enterprise employee phone number information and email and other personal information, click Apply for permission.
The following credentials need to be configured to use this plugin:
app_key: The AppKey of the DingTalk applicationapp_secret: The AppSecret of the DingTalk applicationCreate a new worksheet.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_name: The name of the new worksheetExample:
# Create a new worksheet named "Sales Data"
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh",
"sheet_name": "Sales Data"
}
Returns:
Get basic information about the worksheet, including the number of rows, columns, and other metadata.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_id: Worksheet ID (choose one between sheet_id and sheet_name)sheet_name: Worksheet name (choose one between sheet_id and sheet_name)Example:
# Get information about the worksheet named "Sales Data"
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh",
"sheet_id": "your_sheet_id",
"sheet_name": "Sales Data"
}
Returns:
Read the entire table's data content.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputExample:
# Read the entire table's data
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh"
}
Returns:
Read cell data within a specified area.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_id: Worksheet ID (choose one between sheet_id and sheet_name)sheet_name: Worksheet name (choose one between sheet_id and sheet_name)range_address: Cell area, e.g., "A1:C5"Example:
# Read data within the cell area "A1:C5"
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh",
"sheet_id": "your_sheet_id",
"sheet_name": "Sales Data",
"range_address": "A1:C5"
}
Returns:
Update cell data within a specified area.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_id: Worksheet ID (choose one between sheet_id and sheet_name)sheet_name: Worksheet name (choose one between sheet_id and sheet_name)range_address: Cell area, e.g., "A1:C5"values: Data to update, in two-dimensional array formatExample:
# Update data within the cell area "A1:C2"
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh",
"operator_id": "your_operator_id",
"sheet_id": "your_sheet_id",
"sheet_name": "Sales Data",
"range_address": "A1:C2",
"values": [
["New Data 1", "New Data 2", "New Data 3"],
["New Data 4", "New Data 5", "New Data 6"]
]
}
Returns:
Clear cell data within a specified area, preserving cell formatting.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_id: Worksheet ID (choose one between sheet_id and sheet_name)sheet_name: Worksheet name (choose one between sheet_id and sheet_name)range_address: Cell area, e.g., "A1:C5"Example:
# Clear data within the cell area "A1:C5"
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh",
"sheet_id": "your_sheet_id",
"sheet_name": "Sales Data",
"range_address": "A1:C5"
}
Returns:
Get the DingTalk user's operator ID through their phone number.
Parameters:
mobile: User's phone numberExample:
# Get the DingTalk user's operator ID through their phone number
{
"mobile": "12345678901"
}
Returns:
Insert new rows before a specified row and fill with data.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_id: Worksheet ID (choose one between sheet_id and sheet_name)sheet_name: Worksheet name (choose one between sheet_id and sheet_name)start_row: Specified starting row numberrow_count: Number of rows to insertstart_col: Starting column, default is 'A'values: Data to insert, in two-dimensional array formatExample:
# Insert new rows before row 3 and fill with data
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh",
"sheet_id": "your_sheet_id",
"sheet_name": "Sales Data",
"start_row": 3,
"row_count": 2,
"start_col": "A",
"values": [
["New Data 1", "New Data 2", "New Data 3"],
["New Data 4", "New Data 5", "New Data 6"]
]
}
Returns:
Insert new columns before a specified column and fill with data.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_id: Worksheet ID (choose one between sheet_id and sheet_name)sheet_name: Worksheet name (choose one between sheet_id and sheet_name)start_col: Specified starting column, such as 'A', 'B', etc.col_count: Number of columns to insertstart_row: Starting row numbervalues: Data to insert, in two-dimensional array formatExample:
# Insert new columns before column B and fill with data
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh",
"sheet_id": "your_sheet_id",
"sheet_name": "Sales Data",
"start_col": "B",
"col_count": 2,
"start_row": 1,
"values": [
["New Data 1", "New Data 2", "New Data 3"],
["New Data 4", "New Data 5", "New Data 6"]
]
}
Returns:
Delete specified rows.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_id: Worksheet ID (choose one between sheet_id and sheet_name)sheet_name: Worksheet name (choose one between sheet_id and sheet_name)start_row: Starting row numberrow_count: Number of rows to deleteExample:
# Delete rows from row 3 to row 5
{
"operator_id": "your_operator_id",
"table_id": "https://alidocs.dingtalk.com/i/nodes/AbCdEfGh",
"sheet_id": "your_sheet_id",
"sheet_name": "Sales Data",
"start_row": 3,
"row_count": 2
}
Returns:
Delete specified columns.
Parameters:
operator_id: The unionId of the operatortable_id: The ID of the table, supports table URL inputsheet_id: Worksheet ID (choose one between sheet_id and sheet_name)sheet_name: Worksheet name (choose one between sheet_id and sheet_name)start_col: Starting column, such as 'A', 'B', etc.col_count: Number of columns to deleteExample:
# Delete columns from column B to column D
{
"operator_id": "your_operator_id",
"table_id": "URL_ADDRESSocs.dingtalk.com/i/nodes/AbCdEfGh",
"sheet_id": "your_sheet_id",
"sheet_name": "Sales Data",
"start_col": "B",
"col_count": 2
}
Returns:
If you have any questions or suggestions about this, please contact us through the following methods: