Actions61
- 电子表格 Actions
- 云空间 Actions
- 消息 Actions
- 云文档 Actions
- 日历 Actions
- 多维表格 Actions
Overview
The "自动写入数据" (Auto Write Data) operation for the 电子表格 (Spreadsheet) resource in this custom n8n node allows users to programmatically write structured data into a Feishu spreadsheet. This is particularly useful for automating workflows where data from other sources or processes needs to be appended or updated in a Feishu sheet without manual intervention.
Common scenarios:
- Automatically logging form submissions or survey results into a Feishu spreadsheet.
- Syncing data from external databases or APIs into Feishu for reporting or collaboration.
- Batch updating records in a Feishu sheet as part of a larger automation pipeline.
Practical example:
A company collects sales leads via a web form and wants each submission to be automatically added as a new row in their Feishu sales tracking spreadsheet, including all relevant details and optionally with headers.
Properties
| Name | Type | Meaning |
|---|---|---|
| 电子表格 Token | String | The authentication token required to access the target Feishu spreadsheet. |
| 工作表 ID | String | The unique identifier of the specific worksheet within the spreadsheet to write to. |
| 数据 | JSON | An array of objects, each representing a row to write; keys correspond to column names. |
| 开始行数 | Number | The starting row number in the worksheet where data writing should begin. |
| 是否显示表头 | Boolean | Whether to include the header row (column names) when writing data. |
Output
- json:
- On success, the output will contain the result of the write operation for each input item. The structure typically mirrors the response from the underlying Feishu API or the internal logic, such as confirmation of rows written or any returned metadata.
- On error (if "Continue On Fail" is enabled), the output will include an
errorfield with the error message, and possibly additional error details if available.
Example output on success:
[
{
"json": {
"success": true,
"rowsWritten": 3
}
}
]
Example output on error:
[
{
"json": {
"error": "Invalid spreadsheet token"
}
}
]
Note: The actual fields may vary depending on the Feishu API's response.
Dependencies
- Feishu API: Requires access to the Feishu spreadsheet service.
- API Credentials: Needs a valid Feishu API token (configured in n8n as feishuCredentialsApi).
- n8n Configuration: The node must be properly configured with the correct credentials and permissions to access the target spreadsheet and worksheet.
Troubleshooting
Common issues:
- Invalid Token: If the 电子表格 Token is incorrect or expired, you may receive authentication errors.
- Worksheet Not Found: Providing an incorrect 工作表 ID will result in errors indicating the worksheet cannot be found.
- Malformed Data: If the 数据 property is not a valid JSON array of objects, the node may throw parsing or validation errors.
- Permission Denied: The provided token may lack sufficient permissions to write to the specified worksheet.
Error messages and resolutions:
"未实现方法: spreadsheet.spreadsheet:valuesAutoWrite": Indicates the selected operation is not implemented. Double-check the resource and operation selection."Invalid spreadsheet token": Ensure the token is current and has the necessary access rights."Worksheet not found": Verify the 工作表 ID is correct and that the worksheet exists."Malformed data": Check that the 数据 property is a valid JSON array with appropriate key-value pairs.