Google 表格文档内工作表操作#
¥Google Sheets Sheet Within Document operations
使用此操作可在 Google Sheets 中创建、更新、清除或删除工作表。有关 Google Sheets 节点本身的更多信息,请参阅 Google 表格。
¥Use this operation to create, update, clear or delete a sheet in a Google spreadsheet from Google Sheets. Refer to Google Sheets for more information on the Google Sheets node itself.
This node can be used as an AI tool
This node can be used to enhance the capabilities of an AI agent. When used in this way, many parameters can be set automatically, or with information directed by AI - find out more in the AI tool parameters documentation.
追加或更新行#
¥Append or Update Row
使用此操作更新现有行,或在表格中未找到匹配条目时,在数据末尾添加新行。
¥Use this operation to update an existing row or add a new row at the end of the data if a matching entry isn't found in a sheet.
请输入以下参数:
¥Enter these parameters:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 资源:选择“文档内的工作表”。
¥Resource: Select Sheet Within Document.
- 操作:选择“追加”或“更新行”。
¥Operation: Select Append or Update Row.
- 文档:选择包含要追加或更新行的工作表的电子表格。
¥Document: Choose a spreadsheet that contains the sheet you want to append or update row(s) to.
-
选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId. -
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
工作表:选择要添加或更新行的表格。
¥Sheet: Choose a sheet you want to append or update row(s) to.
-
选择“从列表”从下拉列表中选择工作表标题,选择“通过 URL”输入工作表 URL,选择“通过 ID”输入
sheetId,或选择“通过名称”输入工作表标题。¥Select From list to choose the sheet title from the dropdown list, By URL to enter the url of the sheet, By ID to enter the
sheetId, or By Name to enter the sheet title. -
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId。¥You can find the
sheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId. -
映射列模式:
¥Mapping Column Mode:
-
手动映射每一列:输入要发送的每列的值。
¥Map Each Column Manually: Enter Values to Send for each column.
-
自动映射:n8n 会自动查找与 Google Sheets 列匹配的传入数据。在此模式下,请确保传入的数据字段与 Google Sheets 中的列相同。(如果需要,请在此节点之前使用 编辑字段 节点进行更改。)
¥Map Automatically: n8n looks for incoming data that matches the columns in Google Sheets automatically. In this mode, make sure the incoming data fields are the same as the columns in Google Sheets. (Use an Edit Fields node before this node to change them if required.)
-
无:请勿映射任何数据。
¥Nothing: Don't map any data.
选项#
¥Options
- Cell Format: Use this option to choose how to format the data in cells. Refer to Google Sheets API | CellFormat for more information.
- Let Google Sheets format (default): n8n formats text and numbers in the cells according to Google Sheets' default settings.
- Let n8n format: New cells in your sheet will have the same data types as the input data provided by n8n.
- Data Location on Sheet: Use this option when you need to specify the data range on your sheet.
- Header Row: Specify the row index that contains the column headers.
- First Data Row: Specify the row index where the actual data starts.
- Handling extra fields in input: When using Mapping Column Mode > Map Automatically, use this option to decide how to handle fields in the input data that don't match any existing columns in the sheet.
- Insert in New Column(s) (default): Adds new columns for any extra data.
- Ignore Them: Ignores extra data that don't match the existing columns.
- Error: Throws an error and stops execution.
- Use Append: Turn on this option to use the Google API append endpoint for adding new data rows.
- By default, n8n appends empty rows or columns and then adds the new data. This approach can ensure data alignment but may be less efficient. Using the append endpoint can lead to better performance by minimizing the number of API calls and simplifying the process. But if the existing sheet data has inconsistencies such as gaps or breaks between rows and columns, n8n may add the new data in the wrong place, leading to misalignment issues.
- Use this option when performance is a priority and the data structure in the sheet is consistent without gaps.
请参阅 方法:spreadsheets.values.update | Google 表格 API 文档了解更多信息。
¥Refer to the Method: spreadsheets.values.update | Google Sheets API documentation for more information.
追加行#
¥Append Row
使用此操作在工作表数据末尾添加新行。
¥Use this operation to append a new row at the end of the data in a sheet.
请输入以下参数:
¥Enter these parameters:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 资源:选择“文档内的工作表”。
¥Resource: Select Sheet Within Document.
- 操作:选择“追加行”。
¥Operation: Select Append Row.
- 文档:选择要添加行的电子表格。
¥Document: Choose a spreadsheet with the sheet you want to append a row to.
-
选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId. -
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
工作表:选择要添加行的表格。
¥Sheet: Choose a sheet you want to append a row to.
-
选择“从列表”从下拉列表中选择工作表标题,选择“通过 URL”输入工作表 URL,选择“通过 ID”输入
sheetId,或选择“通过名称”输入工作表标题。¥Select From list to choose the sheet title from the dropdown list, By URL to enter the url of the sheet, By ID to enter the
sheetId, or By Name to enter the sheet title. -
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId。¥You can find the
sheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId. -
映射列模式:
¥Mapping Column Mode:
-
手动映射每一列:选择查找要更新的行时要匹配的列。输入要发送的每列的值。
¥Map Each Column Manually: Select the Column to Match On when finding the rows to update. Enter Values to Send for each column.
-
自动映射:n8n 会自动查找与 Google Sheets 列匹配的传入数据。在此模式下,请确保传入的数据字段与 Google Sheets 中的列相同。(如果需要,请在此节点之前使用 编辑字段 节点进行更改。)
¥Map Automatically: n8n looks for incoming data that matches the columns in Google Sheets automatically. In this mode, make sure the incoming data fields are the same as the columns in Google Sheets. (Use an Edit Fields node before this node to change them if required.)
-
无:请勿映射任何数据。
¥Nothing: Don't map any data.
选项#
¥Options
- Cell Format: Use this option to choose how to format the data in cells. Refer to Google Sheets API | CellFormat for more information.
- Let Google Sheets format (default): n8n formats text and numbers in the cells according to Google Sheets' default settings.
- Let n8n format: New cells in your sheet will have the same data types as the input data provided by n8n.
- Data Location on Sheet: Use this option when you need to specify the data range on your sheet.
- Header Row: Specify the row index that contains the column headers.
- First Data Row: Specify the row index where the actual data starts.
- Handling extra fields in input: When using Mapping Column Mode > Map Automatically, use this option to decide how to handle fields in the input data that don't match any existing columns in the sheet.
- Insert in New Column(s) (default): Adds new columns for any extra data.
- Ignore Them: Ignores extra data that don't match the existing columns.
- Error: Throws an error and stops execution.
- Use Append: Turn on this option to use the Google API append endpoint for adding new data rows.
- By default, n8n appends empty rows or columns and then adds the new data. This approach can ensure data alignment but may be less efficient. Using the append endpoint can lead to better performance by minimizing the number of API calls and simplifying the process. But if the existing sheet data has inconsistencies such as gaps or breaks between rows and columns, n8n may add the new data in the wrong place, leading to misalignment issues.
- Use this option when performance is a priority and the data structure in the sheet is consistent without gaps.
请参阅 方法:spreadsheets.values.append | Google 表格 API 文档了解更多信息。
¥Refer to the Method: spreadsheets.values.append | Google Sheets API documentation for more information.
清除工作表#
¥Clear a sheet
使用此操作清除工作表中的所有数据。
¥Use this operation to clear all data from a sheet.
请输入以下参数:
¥Enter these parameters:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 资源:选择“文档内的工作表”。
¥Resource: Select Sheet Within Document.
- 操作:选择“清除”。
¥Operation: Select Clear.
- 文档:选择要清除数据的电子表格。
¥Document: Choose a spreadsheet with the sheet you want to clear data from.
-
选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId. -
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
工作表:选择要清除数据的工作表。
¥Sheet: Choose a sheet you want to clear data from.
-
选择“从列表”从下拉列表中选择工作表标题,选择“通过 URL”输入工作表 URL,选择“通过 ID”输入
sheetId,或选择“通过名称”输入工作表标题。¥Select From list to choose the sheet title from the dropdown list, By URL to enter the url of the sheet, By ID to enter the
sheetId, or By Name to enter the sheet title. -
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId。¥You can find the
sheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId. -
清除:选择要从工作表中清除的数据。
¥Clear: Select what data you want cleared from the sheet.
-
整页:清除整个工作表的数据启用“保留第一行”以保留工作表的第一行。
¥Whole Sheet: Clear the entire sheet's data. Turn on Keep First Row to keep the first row of the sheet.
-
指定行:清除特定行中的数据同时输入:
¥Specific Rows: Clear data from specific rows. Also enter:
- 起始行号:输入要清除的第一行号。
¥Start Row Number: Enter the first row number you want to clear.
- 要删除的行数:输入要清除的行数。
1仅清除“起始行号”所在行的数据。
¥Number of Rows to Delete: Enter the number of rows to clear.
1clears data only the row in the Start Row Number. -
指定列:清除特定列中的数据同时输入:
¥Specific Columns: Clear data from specific columns. Also enter:
- 起始列:使用字母表示法输入要清除的第一列。
¥Start Column: Enter the first column you want to clear using the letter notation.
- 要删除的列数:输入要清除的列数。
1仅清除“起始列”中的数据。
¥Number of Columns to Delete: Enter the number of columns to clear.
1clears data only in the Start Column. -
指定范围:在 A1 表示法 中输入要清除数据的表范围。
¥Specific Range: Enter the table range to clear data from, in A1 notation.
请参阅 方法:spreadsheets.values.clear | Google 表格 API 文档了解更多信息。
¥Refer to the Method: spreadsheets.values.clear | Google Sheets API documentation for more information.
创建新工作表#
¥Create a new sheet
使用此操作创建新的工作表。
¥Use this operation to create a new sheet.
请输入以下参数:
¥Enter these parameters:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 资源:选择“文档内的工作表”。
¥Resource: Select Sheet Within Document.
- 操作:选择“创建”。
¥Operation: Select Create.
- 文档:选择要创建新工作表的电子表格。
¥Document: Choose a spreadsheet in which you want to create a new sheet.
-
选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId. -
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
标题:输入新工作表标题。
¥Title: Enter the title for your new sheet.
选项#
¥Options
- 隐藏:启用此选项可在 UI 中隐藏工作表。
¥Hidden: Turn on this option to keep the sheet hidden in the UI.
- 从右到左:启用此选项可使用 RTL(从右到左)工作表,而不是 LTR(从左到右)工作表。
¥Right To Left: Turn on this option to use RTL sheet instead of an LTR sheet.
- 工作表 ID:请输入工作表的 ID。
¥Sheet ID: Enter the ID of the sheet.
-
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId¥You can find the
sheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId -
工作表索引:默认情况下,新工作表是电子表格中的最后一个工作表。要覆盖此行为,请输入你希望新工作表使用的索引。当你在指定索引处添加工作表时,Google 会递增所有后续工作表的索引。有关更多信息,请参阅 工作表 | 工作表属性 文档。
¥Sheet Index: By default, the new sheet is the last sheet in the spreadsheet. To override this behavior, enter the index you want the new sheet to use. When you add a sheet at a given index, Google increments the indices for all following sheets. Refer to Sheets | SheetProperties documentation for more information.
- 标签颜色:输入十六进制颜色代码,或使用颜色选择器设置 UI 中选项卡的颜色。
¥Tab Color: Enter the color as hex code or use the color picker to set the color of the tab in the UI.
请参阅 方法:spreadsheets.batchUpdate | Google Sheets API 文档了解更多信息。
¥Refer to the Method: spreadsheets.batchUpdate | Google Sheets API documentation for more information.
删除工作表#
¥Delete a sheet
使用此操作可永久删除工作表。
¥Use this operation to permanently delete a sheet.
请输入以下参数:
¥Enter these parameters:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 资源:选择“文档内的工作表”。
¥Resource: Select Sheet Within Document.
- 操作:选择“删除”。
¥Operation: Select Delete.
- 文档:选择包含要删除的工作表的电子表格。
¥Document: Choose a spreadsheet that contains the sheet you want to delete.
-
选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId. -
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
工作表:请选择要删除的工作表。
¥Sheet: Choose the sheet you want to delete.
-
选择“从列表”从下拉列表中选择工作表标题,选择“按 URL”输入工作表的 URL,选择“按 ID”输入
sheetId,或选择“按名称”输入工作表名称。¥Select From list to choose the sheet title from the dropdown list, By URL to enter the url of the sheet, By ID to enter the
sheetId, or By Name to enter the name of the sheet. -
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId。¥You can find the
sheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId.
请参阅 方法:spreadsheets.batchUpdate | Google Sheets API 文档了解更多信息。
¥Refer to the Method: spreadsheets.batchUpdate | Google Sheets API documentation for more information.
删除行或列#
¥Delete Rows or Columns
使用此操作删除工作表中的行或列。
¥Use this operation to delete rows or columns in a sheet.
请输入以下参数:
¥Enter these parameters:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 资源:选择“文档内的工作表”。
¥Resource: Select Sheet Within Document.
- 操作:选择“删除行”或“删除列”。
¥Operation: Select Delete Rows or Columns.
- 文档:选择包含要从中删除行或列的工作表的电子表格。
¥Document: Choose a spreadsheet that contains the sheet you want to delete rows or columns from.
-
选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId. -
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
工作表:请选择要删除行或列的工作表。
¥Sheet: Choose the sheet in which you want to delete rows or columns.
-
选择“从列表”从下拉列表中选择工作表标题,选择“按 URL”输入工作表的 URL,选择“按 ID”输入
sheetId,或选择“按名称”输入工作表名称。¥Select From list to choose the sheet title from the dropdown list, By URL to enter the url of the sheet, By ID to enter the
sheetId, or By Name to enter the name of the sheet. -
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId。¥You can find the
sheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId. -
起始行号或起始列号:输入要开始删除的行号或列字母。
¥Start Row Number or Start Column: Enter the row number or column letter to start deleting.
- 要删除的行数或要删除的列数:输入要删除的行数或列数。
¥Number of Rows to Delete or Number of Columns to delete: Enter the number of rows or columns to delete.
请参阅 方法:spreadsheets.batchUpdate | Google Sheets API 文档了解更多信息。
¥Refer to the Method: spreadsheets.batchUpdate | Google Sheets API documentation for more information.
获取行#
¥Get Row(s)
使用此操作可从工作表中读取一行或多行。
¥Use this operation to read one or more rows from a sheet.
请输入以下参数:
¥Enter these parameters:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 资源:选择“文档内的工作表”。
¥Resource: Select Sheet Within Document.
- 操作:选择“获取行”。
¥Operation: Select Get Row(s).
- 文档:选择包含要从中获取行的工作表的电子表格。
¥Document: Choose a spreadsheet that contains the sheet you want to get rows from.
-
选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId. -
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
工作表:选择要读取行的工作表。
¥Sheet: Choose a sheet you want to read rows from.
-
选择“从列表”从下拉列表中选择工作表标题,选择“按 URL”输入工作表的 URL,选择“按 ID”输入
sheetId,或选择“按名称”输入工作表名称。¥Select From list to choose the sheet title from the dropdown list, By URL to enter the url of the sheet, By ID to enter the
sheetId, or By Name to enter the name of the sheet. -
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId。¥You can find the
sheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId. -
筛选器:默认情况下,该节点返回工作表中的所有行。设置过滤器以返回有限的结果集:
¥Filters: By default, the node returns all rows in the sheet. Set filters to return a limited set of results:
-
列:选择工作表中要搜索的列。
¥Column: Select the column in your sheet to search against.
-
值:输入要搜索的单元格值。你可以将输入数据参数拖动到此处。如果你的筛选条件匹配多行,n8n 将返回第一个结果。如果你想获取所有匹配的行:
¥Value: Enter a cell value to search for. You can drag input data parameters here. If your filter matches multiple rows, n8n returns the first result. If you want all matching rows: 1. 在“选项”下,选择“添加选项”>“当筛选条件有多个匹配项时”。
¥Under Options, select Add Option > When Filter Has Multiple Matches. 2. 将“当筛选条件有多个匹配项时”更改为“返回所有匹配项”。
¥Change When Filter Has Multiple Matches to Return All Matches.
选项#
¥Options
- 数据在工作表中的位置:使用此选项可指定数据范围。默认情况下,n8n 会自动检测范围,直至工作表的最后一行。
¥Data Location on Sheet: Use this option to specify a data range. By default, n8n will detect the range automatically until the last row in the sheet.
- 输出格式:使用此选项可选择 n8n 如何格式化 Google Sheets 返回的数据。
¥Output Formatting: Use this option to choose how n8n formats the data returned by Google Sheets.
-
常规范式:
¥General Formatting:
- 未格式化值(默认值):n8n 会移除货币符号和其他特殊格式。数据类型保持为数字。
¥Values (unformatted) (default): n8n removes currency signs and other special formatting. Data type remains as number.
- 格式化值:n8n 会将数据类型从数字转换为字符串,从而按照 Google Sheets 中的显示方式(例如,保留逗号或货币符号)显示值。
¥Values (formatted): n8n displays the values as they appear in Google Sheets (for example, retaining commas or currency signs) by converting the data type from number to string.
- 公式:n8n 返回公式。它不计算公式输出。例如,如果单元格 B2 的公式为
=A2,则 n8n 将返回 B2 的值=A2(文本格式)。有关更多信息,请参阅 关于日期和时间值 | Google 表格。
¥Formulas: n8n returns the formula. It doesn't calculate the formula output. For example, if a cell B2 has the formula
=A2, n8n returns B2's value as=A2(in text). Refer to About date & time values | Google Sheets for more information. -
日期格式:有关更多信息,请参阅 DateTimeRenderOption | Google Sheets。 格式化文本(默认):如 Google 表格中所示,具体取决于电子表格的区域设置。例如
01/01/2024。 序列号:自 1899 年 12 月 30 日以来的天数。¥Date Formatting: Refer to DateTimeRenderOption | Google Sheets for more information. - Formatted Text (default): As displayed in Google Sheets, which depends on the spreadsheet locale. For example
01/01/2024. - Serial Number: Number of days since December 30th 1899. -
当筛选条件有多个匹配项时:设置为“返回所有匹配项”可获取多个匹配项。默认情况下,仅返回第一个结果。
¥When Filter Has Multiple Matches: Set to Return All Matches to get multiple matches. By default only the first result gets returned.
First row
n8n 将 Google 表格中的第一行视为标题行,读取所有行时不会返回该行。如果你想读取第一行,请使用“选项”设置工作表上的数据位置。
¥n8n treats the first row in a Google Sheet as a heading row, and doesn't return it when reading all rows. If you want to read the first row, use the Options to set Data Location on Sheet.
请参阅 方法:spreadsheets.batchUpdate | Google Sheets API 文档了解更多信息。
¥Refer to the Method: spreadsheets.batchUpdate | Google Sheets API documentation for more information.
更新行#
¥Update Row
使用此操作更新表格中的现有行。此操作仅更新现有行。如果在工作表中找不到匹配的条目,要追加行,请改用“追加”或“更新行”操作。
¥Use this operation to update existing row in a sheet. This operation only updates existing rows. To append rows when a matching entry isn't found in a sheet, use Append or Update Row operation instead.
请输入以下参数:
¥Enter these parameters:
- 用于连接的凭据:创建或选择现有 Google Sheets 凭据。
¥Credential to connect with: Create or select an existing Google Sheets credentials.
- 资源:选择“文档内的工作表”。
¥Resource: Select Sheet Within Document.
- 操作:选择“更新行”。
¥Operation: Select Update Row.
- 文档:选择要更新的电子表格。
¥Document: Choose a spreadsheet with the sheet you want to update.
-
选择“从列表”从下拉列表中选择电子表格标题,选择“通过 URL”输入电子表格 URL,或选择“通过 ID”输入
spreadsheetId。¥Select From list to choose the spreadsheet title from the dropdown list, By URL to enter the url of the spreadsheet, or By ID to enter the
spreadsheetId. -
你可以在 Google 表格 URL 中找到
spreadsheetId:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0。¥You can find the
spreadsheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0. -
工作表:选择要更新的工作表。
¥Sheet: Choose a sheet you want to update.
-
选择“从列表”从下拉列表中选择工作表标题,选择“通过 URL”输入工作表 URL,选择“通过 ID”输入
sheetId,或选择“通过名称”输入工作表标题。¥Select From list to choose the sheet title from the dropdown list, By URL to enter the url of the sheet, By ID to enter the
sheetId, or By Name to enter the sheet title. -
你可以在 Google 表格 URL 中找到
sheetId:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId。¥You can find the
sheetIdin a Google Sheets URL:https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId. -
映射列模式:
¥Mapping Column Mode:
-
手动映射每一列:输入要发送的每列的值。
¥Map Each Column Manually: Enter Values to Send for each column.
-
自动映射:n8n 会自动查找与 Google Sheets 列匹配的传入数据。在此模式下,请确保传入的数据字段与 Google Sheets 中的列相同。(如果需要,请在此节点之前使用 编辑字段 节点进行更改。)
¥Map Automatically: n8n looks for incoming data that matches the columns in Google Sheets automatically. In this mode, make sure the incoming data fields are the same as the columns in Google Sheets. (Use an Edit Fields node before this node to change them if required.)
-
无:请勿映射任何数据。
¥Nothing: Don't map any data.
选项#
¥Options
- 单元格格式:使用此选项可选择如何格式化单元格中的数据。有关更多信息,请参阅 Google Sheets API |单元格格式。
¥Cell Format: Use this option to choose how to format the data in cells. Refer to Google Sheets API | CellFormat for more information.
-
使用 Google Sheets 格式(默认):n8n 会根据 Google Sheets 的默认设置格式化单元格中的文本和数字。
¥Let Google Sheets format (default): n8n formats text and numbers in the cells according to Google Sheets' default settings.
-
允许 n8n 格式:工作表中的新单元格将具有与 n8n 提供的输入数据相同的数据类型。
¥Let n8n format: New cells in your sheet will have the same data types as the input data provided by n8n.
-
数据在工作表中的位置:当你需要在工作表中指定数据范围的位置时,请使用此选项。
¥Data Location on Sheet: Use this option when you need to specify where the data range on your sheet.
-
标头行:指定包含列标题的行索引。
¥Header Row: Specify the row index that contains the column headers.
-
第一行数据:指定实际数据开始的行索引。
¥First Data Row: Specify the row index where the actual data starts.
请参阅 方法:spreadsheets.batchUpdate | Google Sheets API 文档了解更多信息。
¥Refer to the Method: spreadsheets.batchUpdate | Google Sheets API documentation for more information.