You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/google_sheets/actions/add-multiple-rows/add-multiple-rows.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ export default {
11
11
key: "google_sheets-add-multiple-rows",
12
12
name: "Add Multiple Rows",
13
13
description: "Add multiple rows of data to a Google Sheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append)",
description: "Add a single row of data to Google Sheets. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append)",
label: "Does the first row of the sheet have headers?",
45
-
description: "If the first row of your document has headers, we'll retrieve them to make it easy to enter the value for each column. Please note, that if you are referencing a worksheet using a custom expression referencing data from another step, e.g. `{{steps.my_step.$return_value}}` this prop cannot be used. If you want to retrieve the header row, select both **Spreadsheet** and **Worksheet ID** from the dropdowns above.",
41
+
description: "Select a worksheet or enter a custom expression. When referencing a spreadsheet dynamically, you must provide a custom expression for the worksheet.",
42
+
asyncoptions({ sheetId }){
43
+
// If sheetId is a dynamic reference, don't load options
44
+
if(isDynamicExpression(sheetId)){
45
+
return[];
46
+
}
47
+
48
+
// Otherwise, call the original options function with the correct context
description: "Provide a value for each cell of the row. Google Sheets accepts strings, numbers and boolean values for each cell. To set a cell to an empty value, pass an empty string.",
thrownewConfigurationError("Could not find a header row. Please either add headers and click \"Refresh fields\" or adjust the action configuration to continue.");
62
-
}
63
-
for(leti=0;i<values[0]?.length;i++){
64
-
props[`col_${i.toString().padStart(4,"0")}`]={
82
+
if(!values?.[0]?.length){
83
+
thrownewConfigurationError("Could not find a header row. Please either add headers and click \"Refresh fields\" or set 'Does the first row of the sheet have headers?' to false.");
84
+
}
85
+
86
+
for(leti=0;i<values[0]?.length;i++){
87
+
props[`col_${i.toString().padStart(4,"0")}`]={
88
+
type: "string",
89
+
label: values[0][i],
90
+
optional: true,
91
+
};
92
+
}
93
+
props.allColumns={
65
94
type: "string",
66
-
label: values[0][i],
67
-
optional: true,
95
+
hidden: true,
96
+
default: JSON.stringify(values),
97
+
};
98
+
}catch(err){
99
+
console.error("Error fetching headers:",err);
100
+
// Fallback to basic column input if headers can't be fetched
101
+
return{
102
+
headerError: {
103
+
type: "string",
104
+
label: "Header Fetch Error",
105
+
description: `Unable to fetch headers: ${err.message}. Using simple column input instead.`,
106
+
optional: true,
107
+
hidden: true,
108
+
},
109
+
myColumnData: {
110
+
type: "string[]",
111
+
label: "Values",
112
+
description: "Provide a value for each cell of the row. Google Sheets accepts strings, numbers and boolean values for each cell. To set a cell to an empty value, pass an empty string.",
Copy file name to clipboardExpand all lines: components/google_sheets/actions/clear-cell/clear-cell.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ export default {
7
7
key: "google_sheets-clear-cell",
8
8
name: "Clear Cell",
9
9
description: "Delete the content of a specific cell in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear)",
Copy file name to clipboardExpand all lines: components/google_sheets/actions/clear-rows/clear-rows.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ export default {
7
7
key: "google_sheets-clear-rows",
8
8
name: "Clear Rows",
9
9
description: "Delete the content of a row or rows in a spreadsheet. Deleted rows will appear as blank rows. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear)",
label: "Does the first row of the sheet have headers?",
15
+
description: "If the first row of your document has headers, we'll retrieve them to make it easy to enter the value for each column. Note: When using a dynamic reference for the worksheet ID (e.g. `{{steps.foo.$return_value}}`), this setting is ignored.",
Copy file name to clipboardExpand all lines: components/google_sheets/actions/find-row/find-row.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ export default {
7
7
key: "google_sheets-find-row",
8
8
name: "Find Row",
9
9
description: "Find one or more rows by a column and value. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)",
Copy file name to clipboardExpand all lines: components/google_sheets/actions/get-cell/get-cell.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ export default {
7
7
key: "google_sheets-get-cell",
8
8
name: "Get Cell",
9
9
description: "Fetch the contents of a specific cell in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)",
Copy file name to clipboardExpand all lines: components/google_sheets/actions/get-values-in-range/get-values-in-range.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ export default {
7
7
key: "google_sheets-get-values-in-range",
8
8
name: "Get Values in Range",
9
9
description: "Get all values or values from a range of cells using A1 notation. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get)",
Copy file name to clipboardExpand all lines: components/google_sheets/actions/update-cell/update-cell.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ export default {
7
7
key: "google_sheets-update-cell",
8
8
name: "Update Cell",
9
9
description: "Update a cell in a spreadsheet. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update)",
Copy file name to clipboardExpand all lines: components/google_sheets/actions/update-multiple-rows/update-multiple-rows.mjs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ export default {
9
9
key: "google_sheets-update-multiple-rows",
10
10
name: "Update Multiple Rows",
11
11
description: "Update multiple rows in a spreadsheet defined by a range. [See the documentation](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/update)",
0 commit comments