mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
fix(Google Sheets Trigger Node): Support sheet names with non-latin characters (#6970)
Github issue / Community forum post (link here to close automatically): https://community.n8n.io/t/how-to-get-new-rows-in-google-sheets/25810
This commit is contained in:
parent
b6a00febbd
commit
052dd7cc9d
|
@ -418,7 +418,7 @@ export class GoogleSheetsTrigger implements INodeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
const googleSheet = new GoogleSheet(documentId, this);
|
const googleSheet = new GoogleSheet(documentId, this);
|
||||||
const sheetName = await googleSheet.spreadsheetGetSheetNameById(sheetId);
|
const sheetName: string = await googleSheet.spreadsheetGetSheetNameById(sheetId);
|
||||||
const options = this.getNodeParameter('options') as IDataObject;
|
const options = this.getNodeParameter('options') as IDataObject;
|
||||||
|
|
||||||
const previousRevision = workflowStaticData.lastRevision as number;
|
const previousRevision = workflowStaticData.lastRevision as number;
|
||||||
|
@ -510,7 +510,7 @@ export class GoogleSheetsTrigger implements INodeType {
|
||||||
(await apiRequest.call(
|
(await apiRequest.call(
|
||||||
this,
|
this,
|
||||||
'GET',
|
'GET',
|
||||||
`/v4/spreadsheets/${documentId}/values/${sheetName}!${keyRange}`,
|
`/v4/spreadsheets/${documentId}/values/${encodeURIComponent(sheetName)}!${keyRange}`,
|
||||||
)) as IDataObject
|
)) as IDataObject
|
||||||
).values as string[][]) || [[]];
|
).values as string[][]) || [[]];
|
||||||
|
|
||||||
|
@ -596,7 +596,7 @@ export class GoogleSheetsTrigger implements INodeType {
|
||||||
const previousRevisionSheetData =
|
const previousRevisionSheetData =
|
||||||
sheetBinaryToArrayOfArrays(
|
sheetBinaryToArrayOfArrays(
|
||||||
previousRevisionBinaryData,
|
previousRevisionBinaryData,
|
||||||
sheetName as string,
|
sheetName,
|
||||||
rangeDefinition === 'specifyRangeA1' ? range : undefined,
|
rangeDefinition === 'specifyRangeA1' ? range : undefined,
|
||||||
) || [];
|
) || [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue