Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9bb84d4a50 | ||
|
|
e4cef05b0b | ||
|
|
4d138f7b3b | ||
|
|
498ed8d65c | ||
|
|
baddc07108 | ||
|
|
3efae4417d | ||
|
|
1f5c6a48c0 | ||
|
|
c9c057abc5 | ||
|
|
2c3196b5f3 | ||
|
|
5926d765c2 | ||
|
|
bf2b20acad | ||
|
|
83b50c09c4 |
No files matched your search
@@ -0,0 +1,49 @@
|
|||||||
|
=Textjoin(",";true;IFERROR(INDEX(Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet"; date)&"'!B1:S1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet"; date)&"'!B2:S40");Day(date))
|
||||||
|
=job);course);"-"))
|
||||||
|
|
||||||
|
|
||||||
|
=Textjoin(", ";True;Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:S1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:S40");Day(date))
|
||||||
|
=job))
|
||||||
|
|
||||||
|
|
||||||
|
Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet"; date)&"'!B1:S1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet"; date)&"'!B2:S40");Day(date))
|
||||||
|
=job);course)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=Textjoin(",";true;IFERROR(INDEX(Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet"; date)&"'!B1:S1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet"; date)&"'!B2:S40");Day(date))
|
||||||
|
=job);course);"-"))
|
||||||
|
|
||||||
|
|
||||||
|
====================================
|
||||||
|
|
||||||
|
|
||||||
|
=LET(filtr;
|
||||||
|
Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";A3)&"'!B1:S1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";A3)&"'!B2:S40");Day(A3))
|
||||||
|
="surf");
|
||||||
|
If(A1=1;CHOOSECOLS(filtr;1;2);CHOOSECOLS(filtr; SEQUENCE(COLUMNS(filtr)-2; 1; 3)))
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=Textjoin(", ";true;LET(filtr;
|
||||||
|
Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:T1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:T40");Day(date))
|
||||||
|
=job);
|
||||||
|
If(course=1;CHOOSECOLS(filtr;1;2);IFERROR(CHOOSECOLS(filtr; SEQUENCE(COLUMNS(filtr)-2; 1; 3));"-"))
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
function helpper() {
|
||||||
|
var ss = SpreadsheetApp.getActiveSpreadsheet();
|
||||||
|
var sheet = ss.getSheetByName("Oct 26");
|
||||||
|
|
||||||
|
var date = new Date();
|
||||||
|
var year = Utilities.formatDate(date, "Atlantic/Canary", "yy");
|
||||||
|
|
||||||
|
var onetwo
|
||||||
|
var cell
|
||||||
|
var cellbefore
|
||||||
|
var datecell
|
||||||
|
var coursecell
|
||||||
|
|
||||||
|
var values = sheet.getRange(1, 1, 877, 1).getValues();
|
||||||
|
|
||||||
|
//Code
|
||||||
|
//====================
|
||||||
|
|
||||||
|
for (var i = values.length - 1; i >= 0; i--){
|
||||||
|
|
||||||
|
let cell = values[i][0];
|
||||||
|
var forcell = sheet.getRange(i, 1);
|
||||||
|
|
||||||
|
|
||||||
|
//Paste WORKING3
|
||||||
|
if (cell instanceof Date && cell >= year) {
|
||||||
|
|
||||||
|
if(cellbefore && cellbefore.getTime() === cell.getTime()){
|
||||||
|
onetwo = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
onetwo = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//console.log(onetwo);
|
||||||
|
|
||||||
|
cellbefore = cell;
|
||||||
|
|
||||||
|
var ziel = forcell.offset(2,1);
|
||||||
|
ziel.activate();
|
||||||
|
|
||||||
|
//Pause
|
||||||
|
SpreadsheetApp.flush();
|
||||||
|
//var weiter = pause();
|
||||||
|
//if (!weiter) return;
|
||||||
|
//------
|
||||||
|
|
||||||
|
if(onetwo == 1){
|
||||||
|
datecell = ziel.offset(-1,-1).getA1Notation();
|
||||||
|
ziel.setValue('=WORKING1('+ datecell +';"surf")');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
datecell = ziel.offset(-1,-1).getA1Notation();
|
||||||
|
coursecell = ziel.offset(0,8).getA1Notation();
|
||||||
|
ziel.setValue('=WORKING3('+ datecell +';"surf";'+ coursecell +')');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//Paste Second
|
||||||
|
if(cell == 9){
|
||||||
|
|
||||||
|
var ziel = forcell.offset(1,0);
|
||||||
|
ziel.offset(-10,0).activate();
|
||||||
|
SpreadsheetApp.flush();
|
||||||
|
ziel.activate();
|
||||||
|
|
||||||
|
//Pause
|
||||||
|
SpreadsheetApp.flush();
|
||||||
|
//var weiter = pause();
|
||||||
|
//if (!weiter) return;
|
||||||
|
//------
|
||||||
|
|
||||||
|
sheet.insertRowsBefore(i + 1, 2);
|
||||||
|
|
||||||
|
ss.getSheetByName("template").getRange('A20:U21').copyTo(ziel, SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
|
||||||
|
|
||||||
|
datecell = ziel.offset(0,0).getA1Notation();
|
||||||
|
coursecell = ziel.offset(11,9).getA1Notation();
|
||||||
|
ziel.offset(1,1).setValue('=WORKING2('+ datecell +';"surf";'+ coursecell +')');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function pause(){
|
||||||
|
var ui = SpreadsheetApp.getUi();
|
||||||
|
|
||||||
|
var antwort = ui.alert(ui.ButtonSet.OK_CANCEL);
|
||||||
|
return antwort == ui.Button.OK;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
function freezeValuesExecute_(sheet) {
|
||||||
|
var ss = SpreadsheetApp.getActiveSpreadsheet();
|
||||||
|
var sheet = ss.getSheetByName(sheet);
|
||||||
|
var range = sheet.getRange("A:Z");
|
||||||
|
range.copyTo(range, { contentsOnly: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
function freezeValues() {
|
||||||
|
var date = new Date();
|
||||||
|
date.setMonth(date.getMonth() - 1);
|
||||||
|
var year = Utilities.formatDate(date, "Atlantic/Canary", "yy");
|
||||||
|
var month = Utilities.formatDate(date, "Atlantic/Canary", "MMM");
|
||||||
|
var sheet = month + " " + year;
|
||||||
|
freezeValuesExecute_(sheet);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doItonce() {
|
||||||
|
var date = new Date();
|
||||||
|
var month;
|
||||||
|
var sheet;
|
||||||
|
|
||||||
|
for (let i = 0; i <= 1; i++) {
|
||||||
|
date.setMonth(i);
|
||||||
|
month = Utilities.formatDate(date, "Atlantic/Canary", "MMM");
|
||||||
|
sheet = month + " 26";
|
||||||
|
console.log(sheet);
|
||||||
|
freezeValuesExecute_(sheet);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
=If(weight<>"";(IFS(
|
||||||
|
height>194;"9";
|
||||||
|
weight<=30;"6";
|
||||||
|
And(weight>=31;weight<=45);"7y";
|
||||||
|
And(weight>=46;weight<=79);"8";
|
||||||
|
weight>=80;"8w"
|
||||||
|
));"")
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
=IF(Tidetime<>"";
|
||||||
|
Ifs(
|
||||||
|
Tidelevel<=0,45;"No Lagoon";
|
||||||
|
Tidelevel<1;Ifs(
|
||||||
|
Tidetime<TIMEVALUE("11:00");"too early";
|
||||||
|
AND(Tidetime>=TIMEVALUE("11:00");Tidetime<TIMEVALUE("11:30"));"Station: 08:00";
|
||||||
|
AND(Tidetime>=TIMEVALUE("11:30");Tidetime<=Sunset+TIMEVALUE("0:15"));"Station: "&Text(Timevalue(round(Tidetime*96)/96-"3:30");"hh:mm");
|
||||||
|
Tidetime>Sunset;"too late"
|
||||||
|
);
|
||||||
|
Tidelevel>=1;Ifs(
|
||||||
|
Tidetime<TIMEVALUE("11:00");"too early";
|
||||||
|
AND(Tidetime>=TIMEVALUE("11:00");Tidetime<TIMEVALUE("12:00"));"Station: 08:00";
|
||||||
|
AND(Tidetime>=TIMEVALUE("12:00");Tidetime<=Sunset+TIMEVALUE("0:15"));"Station: "&Text(Timevalue(round(Tidetime*96)/96-"4:00");"hh:mm");
|
||||||
|
Tidetime>Sunset;"too late"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;"")
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
=IF(Tide<>"";
|
||||||
|
IFs(Tide<TIMEVALUE("6:30");"--";
|
||||||
|
And(Tide>=TIMEVALUE("6:30");Tide<TIMEVALUE("11:00"));"Parking: 08:00";
|
||||||
|
And(Tide>=TIMEVALUE("11:00");Tide<=sunset-Timevalue("0:00"));"Parking: "& Text(Timevalue(round(Tide*96)/96-"3:00");"hh:mm");
|
||||||
|
Tide>sunset-Timevalue("0:00");"--")
|
||||||
|
;"")
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
=IF(tide<>"";
|
||||||
|
IFs(tide<TIMEVALUE("10:15");"--";
|
||||||
|
And(Tide>=TIMEVALUE("10:15");Tide<TIMEVALUE("11:00"));"Parking: 10:15";
|
||||||
|
And(tide>=TIMEVALUE("11:00");tide<=sunset-Timevalue("2:30"));"Parking: "& Text(Timevalue(round(tide*96)/96-"0:45");"hh:mm");
|
||||||
|
tide>sunset-Timevalue("2:30");"--")
|
||||||
|
;"")
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
=IF(weight<>"";IFNA(IFS(
|
||||||
|
And(age<>"";age<=14;weight>=18;weight<=22);"6/8";
|
||||||
|
And(age<>"";age<=14;weight>=23;weight<=34);"8/10";
|
||||||
|
And(age<>"";age<=14;weight>=35;weight<=40);"10/12";
|
||||||
|
And(age<>"";age<=14;weight>=41;weight<=55);"12/14";
|
||||||
|
And(gender="m";weight>=40;weight<=60);"XS/S";
|
||||||
|
And(gender="m";weight>=61;weight<=70);"S/M";
|
||||||
|
And(gender="m";weight>=71;weight<=80);"M/L";
|
||||||
|
And(gender="m";weight>=81;weight<=89);"L/XL";
|
||||||
|
And(gender="m";weight>=90;weight<=95);"XL/XXL";
|
||||||
|
And(gender="m";weight>=96);"XXL/3XL";
|
||||||
|
And(gender="f";weight>=40;weight<=53);"8/10";
|
||||||
|
And(gender="f";weight>=54;weight<=60);"10/12";
|
||||||
|
And(gender="f";weight>=61;weight<=70);"12/14";
|
||||||
|
And(gender="f";weight>=71;weight<=80);"14/16";
|
||||||
|
And(gender="f";weight>=81;weight<=90);"16/XXL";
|
||||||
|
And(gender="f";weight>=91);"XXL/3XL"
|
||||||
|
);"--");"")
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
=LET(work;Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:S1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:S40");Day(date))
|
||||||
|
=job);
|
||||||
|
IfNA(
|
||||||
|
CHOOSECOLS(work; 1);
|
||||||
|
"No workers planned today"
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
=LET(work;Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:S1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:S40");Day(date))
|
||||||
|
=job);
|
||||||
|
If(second="--";
|
||||||
|
SWITCH(true;
|
||||||
|
COUNTA(work) = 1; "Not enough workers planned";
|
||||||
|
COUNTA(work) >= 2; TEXTJOIN(", ";true;CHOOSECOLS(work;SEQUENCE(1;COUNTA(work)-1;2)));
|
||||||
|
);
|
||||||
|
SWITCH(true;
|
||||||
|
COUNTA(work) = 1; "Not enough workers planned";
|
||||||
|
COUNTA(work) = 2; "Not enough workers planned";
|
||||||
|
COUNTA(work) >= 3; TEXTJOIN(", ";true;CHOOSECOLS(work;2));
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
=LET(work;Filter(
|
||||||
|
IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B1:S1");
|
||||||
|
INDEX(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1MPCIXoBqguYu9oRnwQ2tfYMqY_vY4tS5dJzNF7by3aY/edit?usp=sharing";"'"&Cell("Sheet";date)&"'!B2:S40");Day(date))
|
||||||
|
=job);
|
||||||
|
If(second="--";"Course not possible";
|
||||||
|
SWITCH(true;
|
||||||
|
COUNTA(work) = 1; "Not enough workers planned";
|
||||||
|
COUNTA(work) = 2; TEXTJOIN(", ";true;CHOOSECOLS(work;2));
|
||||||
|
COUNTA(work) >=3; TEXTJOIN(", ";true;CHOOSECOLS(work;SEQUENCE(1;COUNTA(work)-2;3)));
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,544 @@
|
|||||||
|
{
|
||||||
|
"name": "SurfersIsland_Backup",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"rule": {
|
||||||
|
"interval": [
|
||||||
|
{
|
||||||
|
"field": "hours",
|
||||||
|
"hoursInterval": 2,
|
||||||
|
"triggerAtMinute": 20
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.scheduleTrigger",
|
||||||
|
"typeVersion": 1.3,
|
||||||
|
"position": [
|
||||||
|
-224,
|
||||||
|
-96
|
||||||
|
],
|
||||||
|
"id": "7d2ac02a-226b-4406-acc8-2c2aca0e99c7",
|
||||||
|
"name": "Schedule Trigger"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"operation": "deleteFile",
|
||||||
|
"fileId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "={{ $json.Sheet_ID }}",
|
||||||
|
"mode": "id"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"deletePermanently": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.googleDrive",
|
||||||
|
"typeVersion": 3,
|
||||||
|
"position": [
|
||||||
|
896,
|
||||||
|
-96
|
||||||
|
],
|
||||||
|
"id": "6bcb247d-d9ae-48fb-a5e6-07de03e227e3",
|
||||||
|
"name": "Delete a file",
|
||||||
|
"credentials": {
|
||||||
|
"googleDriveOAuth2Api": {
|
||||||
|
"id": "q1Y0vLmcVt97EzJG",
|
||||||
|
"name": "Google Drive"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"dataTableId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "HxvQaeNWHKwIDWEG",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "SurfersIsland_Backup-Surf",
|
||||||
|
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/HxvQaeNWHKwIDWEG"
|
||||||
|
},
|
||||||
|
"columns": {
|
||||||
|
"mappingMode": "defineBelow",
|
||||||
|
"value": {
|
||||||
|
"Sheet_ID": "={{ $json.id }}"
|
||||||
|
},
|
||||||
|
"matchingColumns": [
|
||||||
|
"Sheet_ID"
|
||||||
|
],
|
||||||
|
"schema": [
|
||||||
|
{
|
||||||
|
"id": "Sheet_ID",
|
||||||
|
"displayName": "Sheet_ID",
|
||||||
|
"required": false,
|
||||||
|
"defaultMatch": false,
|
||||||
|
"display": true,
|
||||||
|
"type": "string",
|
||||||
|
"readOnly": false,
|
||||||
|
"removed": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attemptToConvertTypes": false,
|
||||||
|
"convertFieldsToString": false
|
||||||
|
},
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.dataTable",
|
||||||
|
"typeVersion": 1.1,
|
||||||
|
"position": [
|
||||||
|
224,
|
||||||
|
-208
|
||||||
|
],
|
||||||
|
"id": "04668eff-d56c-4ce0-8ef1-f4fd4e834818",
|
||||||
|
"name": "Insert row"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"operation": "get",
|
||||||
|
"dataTableId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "HxvQaeNWHKwIDWEG",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "SurfersIsland_Backup-Surf",
|
||||||
|
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/HxvQaeNWHKwIDWEG"
|
||||||
|
},
|
||||||
|
"matchType": "allConditions",
|
||||||
|
"filters": {
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "lte",
|
||||||
|
"keyValue": "={{ $json.id -10}}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.dataTable",
|
||||||
|
"typeVersion": 1.1,
|
||||||
|
"position": [
|
||||||
|
448,
|
||||||
|
-208
|
||||||
|
],
|
||||||
|
"id": "32604c8f-e3a3-47da-b128-3bc0a6327090",
|
||||||
|
"name": "Get row(s)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"operation": "copy",
|
||||||
|
"fileId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "1F03s3WszBiT4aF1u9EkbQUjqd5j0hV6eB_yI_AGq-cA",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "Surf 24/25",
|
||||||
|
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1F03s3WszBiT4aF1u9EkbQUjqd5j0hV6eB_yI_AGq-cA/edit?usp=drivesdk"
|
||||||
|
},
|
||||||
|
"name": "=Surf_Backup-{{ $json['Day of month'] }}.{{ $json.Month }}-{{ $json.Hour }}:{{ $json.Minute }}",
|
||||||
|
"sameFolder": false,
|
||||||
|
"driveId": {
|
||||||
|
"__rl": true,
|
||||||
|
"mode": "list",
|
||||||
|
"value": "My Drive"
|
||||||
|
},
|
||||||
|
"folderId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "1pfiabhw_n8hMf2z15iKy041Wwu959GcT",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "SurfersIsland_Backup",
|
||||||
|
"cachedResultUrl": "https://drive.google.com/drive/folders/1pfiabhw_n8hMf2z15iKy041Wwu959GcT"
|
||||||
|
},
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.googleDrive",
|
||||||
|
"typeVersion": 3,
|
||||||
|
"position": [
|
||||||
|
0,
|
||||||
|
-208
|
||||||
|
],
|
||||||
|
"id": "bc3008f2-94cc-4569-9a0b-d6ceb4fe7042",
|
||||||
|
"name": "BackupSurf",
|
||||||
|
"credentials": {
|
||||||
|
"googleDriveOAuth2Api": {
|
||||||
|
"id": "q1Y0vLmcVt97EzJG",
|
||||||
|
"name": "Google Drive"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"operation": "copy",
|
||||||
|
"fileId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "1n4ZUKdv5qrMDK4Dag_dSIh745M--NYeOFra0GQB0iyM",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "Kite 24/25",
|
||||||
|
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1n4ZUKdv5qrMDK4Dag_dSIh745M--NYeOFra0GQB0iyM/edit?usp=drivesdk"
|
||||||
|
},
|
||||||
|
"name": "=Kite_Backup-{{ $json['Day of month'] }}.{{ $json.Month }}-{{ $json.Hour }}:{{ $json.Minute }}",
|
||||||
|
"sameFolder": false,
|
||||||
|
"driveId": {
|
||||||
|
"__rl": true,
|
||||||
|
"mode": "list",
|
||||||
|
"value": "My Drive"
|
||||||
|
},
|
||||||
|
"folderId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "1pfiabhw_n8hMf2z15iKy041Wwu959GcT",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "SurfersIsland_Backup",
|
||||||
|
"cachedResultUrl": "https://drive.google.com/drive/folders/1pfiabhw_n8hMf2z15iKy041Wwu959GcT"
|
||||||
|
},
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.googleDrive",
|
||||||
|
"typeVersion": 3,
|
||||||
|
"position": [
|
||||||
|
0,
|
||||||
|
32
|
||||||
|
],
|
||||||
|
"id": "be860313-a316-4757-bc58-7984832b56ce",
|
||||||
|
"name": "BackupKite",
|
||||||
|
"credentials": {
|
||||||
|
"googleDriveOAuth2Api": {
|
||||||
|
"id": "q1Y0vLmcVt97EzJG",
|
||||||
|
"name": "Google Drive"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {},
|
||||||
|
"type": "n8n-nodes-base.merge",
|
||||||
|
"typeVersion": 3.2,
|
||||||
|
"position": [
|
||||||
|
672,
|
||||||
|
-96
|
||||||
|
],
|
||||||
|
"id": "758b532c-b488-47e6-bcb6-572073f35811",
|
||||||
|
"name": "Merge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"dataTableId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "qe1qrSuM4swEvBW5",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "SurfersIsland_Backup-Kite",
|
||||||
|
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/qe1qrSuM4swEvBW5"
|
||||||
|
},
|
||||||
|
"columns": {
|
||||||
|
"mappingMode": "defineBelow",
|
||||||
|
"value": {
|
||||||
|
"Sheet_ID": "={{ $json.id }}"
|
||||||
|
},
|
||||||
|
"matchingColumns": [
|
||||||
|
"Sheet_ID"
|
||||||
|
],
|
||||||
|
"schema": [
|
||||||
|
{
|
||||||
|
"id": "Sheet_ID",
|
||||||
|
"displayName": "Sheet_ID",
|
||||||
|
"required": false,
|
||||||
|
"defaultMatch": false,
|
||||||
|
"display": true,
|
||||||
|
"type": "string",
|
||||||
|
"readOnly": false,
|
||||||
|
"removed": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"attemptToConvertTypes": false,
|
||||||
|
"convertFieldsToString": false
|
||||||
|
},
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.dataTable",
|
||||||
|
"typeVersion": 1.1,
|
||||||
|
"position": [
|
||||||
|
224,
|
||||||
|
32
|
||||||
|
],
|
||||||
|
"id": "7b3f4a8a-e81d-4463-91e0-2f9dc68bff1e",
|
||||||
|
"name": "Insert row1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"operation": "get",
|
||||||
|
"dataTableId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "qe1qrSuM4swEvBW5",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "SurfersIsland_Backup-Kite",
|
||||||
|
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/qe1qrSuM4swEvBW5"
|
||||||
|
},
|
||||||
|
"matchType": "allConditions",
|
||||||
|
"filters": {
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "lte",
|
||||||
|
"keyValue": "={{ $json.id -10}}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.dataTable",
|
||||||
|
"typeVersion": 1.1,
|
||||||
|
"position": [
|
||||||
|
448,
|
||||||
|
32
|
||||||
|
],
|
||||||
|
"id": "5fdc0884-c03d-4ae7-88a3-2c0de7936960",
|
||||||
|
"name": "Get row(s)1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"operation": "deleteRows",
|
||||||
|
"dataTableId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "HxvQaeNWHKwIDWEG",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "SurfersIsland_Backup-Surf",
|
||||||
|
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/HxvQaeNWHKwIDWEG"
|
||||||
|
},
|
||||||
|
"filters": {
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"keyValue": "={{ $json.id }}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.dataTable",
|
||||||
|
"typeVersion": 1.1,
|
||||||
|
"position": [
|
||||||
|
1344,
|
||||||
|
-208
|
||||||
|
],
|
||||||
|
"id": "a9ff5457-f29c-408f-a748-baecd836fde6",
|
||||||
|
"name": "Delete row(s)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"operation": "deleteRows",
|
||||||
|
"dataTableId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "qe1qrSuM4swEvBW5",
|
||||||
|
"mode": "list",
|
||||||
|
"cachedResultName": "SurfersIsland_Backup-Kite",
|
||||||
|
"cachedResultUrl": "/projects/GfQo4CYkUbKCxUG4/datatables/qe1qrSuM4swEvBW5"
|
||||||
|
},
|
||||||
|
"filters": {
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"keyValue": "={{ $json.id }}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.dataTable",
|
||||||
|
"typeVersion": 1.1,
|
||||||
|
"position": [
|
||||||
|
1344,
|
||||||
|
32
|
||||||
|
],
|
||||||
|
"id": "4bd97e2c-9833-4e36-9da4-5c307e28cdfe",
|
||||||
|
"name": "Delete row(s)1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"mode": "chooseBranch"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.merge",
|
||||||
|
"typeVersion": 3.2,
|
||||||
|
"position": [
|
||||||
|
1120,
|
||||||
|
-208
|
||||||
|
],
|
||||||
|
"id": "36cd50d0-59e4-414f-a0cb-d2c079615281",
|
||||||
|
"name": "Merge1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"mode": "chooseBranch",
|
||||||
|
"useDataOfInput": 2
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.merge",
|
||||||
|
"typeVersion": 3.2,
|
||||||
|
"position": [
|
||||||
|
1120,
|
||||||
|
32
|
||||||
|
],
|
||||||
|
"id": "0f2e57fd-be06-4817-8e9a-0c46f8c3404c",
|
||||||
|
"name": "Merge2"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pinData": {},
|
||||||
|
"connections": {
|
||||||
|
"Schedule Trigger": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "BackupSurf",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "BackupKite",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Delete a file": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge1",
|
||||||
|
"type": "main",
|
||||||
|
"index": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "Merge2",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Insert row": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Get row(s)",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Get row(s)": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "Merge1",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BackupSurf": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Insert row",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Merge": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Delete a file",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"BackupKite": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Insert row1",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Insert row1": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Get row(s)1",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Get row(s)1": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge",
|
||||||
|
"type": "main",
|
||||||
|
"index": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "Merge2",
|
||||||
|
"type": "main",
|
||||||
|
"index": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Delete row(s)": {
|
||||||
|
"main": [
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Delete row(s)1": {
|
||||||
|
"main": [
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Merge1": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Delete row(s)",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Merge2": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Delete row(s)1",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"active": true,
|
||||||
|
"settings": {
|
||||||
|
"executionOrder": "v1",
|
||||||
|
"binaryMode": "separate",
|
||||||
|
"availableInMCP": false,
|
||||||
|
"timeSavedMode": "fixed",
|
||||||
|
"errorWorkflow": "pfSHjq1uOYG4frx8",
|
||||||
|
"callerPolicy": "workflowsFromSameOwner",
|
||||||
|
"timezone": "Atlantic/Canary"
|
||||||
|
},
|
||||||
|
"versionId": "993b4dd9-77d8-46ce-bca0-c228864dd039",
|
||||||
|
"meta": {
|
||||||
|
"templateCredsSetupCompleted": true,
|
||||||
|
"instanceId": "4674f284e85213f04baf0419e3407e986c2c4a3d3e335730c4a2482ed0ab860a"
|
||||||
|
},
|
||||||
|
"id": "Bq7UD4wzrUEzqfux",
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
@@ -0,0 +1,674 @@
|
|||||||
|
{
|
||||||
|
"name": "SurfersIsland_MailBot",
|
||||||
|
"nodes": [
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"options": {
|
||||||
|
"forceReconnect": 60,
|
||||||
|
"trackLastMessageId": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.emailReadImap",
|
||||||
|
"typeVersion": 2.1,
|
||||||
|
"position": [
|
||||||
|
-496,
|
||||||
|
-368
|
||||||
|
],
|
||||||
|
"id": "b5acfac0-3170-4add-b5f2-1b7c894e93e2",
|
||||||
|
"name": "Email Trigger (IMAP)",
|
||||||
|
"credentials": {
|
||||||
|
"imap": {
|
||||||
|
"id": "rkm3vxPn7aslUPMR",
|
||||||
|
"name": "IMAP account"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"chatId": "5109688502",
|
||||||
|
"text": "=Neue E-Mail-Buchung in {{ $json.sport }} von {{ $json['Full Name'] }} zum {{ $json.Dates }}.\n\nNachricht:\n{{ $json.Message }}\n\n",
|
||||||
|
"additionalFields": {
|
||||||
|
"appendAttribution": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.telegram",
|
||||||
|
"typeVersion": 1.2,
|
||||||
|
"position": [
|
||||||
|
1072,
|
||||||
|
-576
|
||||||
|
],
|
||||||
|
"id": "158e8692-d3d3-491a-8b08-03b727222efc",
|
||||||
|
"name": "Send a text message",
|
||||||
|
"webhookId": "7ec63efb-de68-42a2-8237-b79c3e5d1d27",
|
||||||
|
"credentials": {
|
||||||
|
"telegramApi": {
|
||||||
|
"id": "kdu1SvGTcXmeMbB1",
|
||||||
|
"name": "Telegram paulependelt_bot"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "const text = $input.first().json.textPlain;\n\n// Regex: findet *Field:* und den Text bis zum nächsten *Field:* \nconst regex = /\\*(.*?)\\*:\\s*([\\s\\S]*?)(?=\\n\\s*\\*|$)/g;\n\nlet match;\nconst result = {};\n\nwhile ((match = regex.exec(text)) !== null) {\n const key = match[1].trim();\n const value = match[2].trim();\n result[key] = value;\n}\n\nreturn [\n {\n json: result\n }\n];"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
-112,
|
||||||
|
-704
|
||||||
|
],
|
||||||
|
"id": "435905b6-bc89-4d16-ad96-396f496bf872",
|
||||||
|
"name": "Parse Mail to Json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "const inputs = $json.Dates.split(';').map(i => i.trim());\nlet results = [];\n\nfor (input of inputs){\n results.push({\n ...$json,\n Dates: input,\n });\n};\n\nreturn results.map(r => ({ json: r }));"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
400,
|
||||||
|
-272
|
||||||
|
],
|
||||||
|
"id": "d84a7544-bad3-4ff4-871d-5931e4b78f56",
|
||||||
|
"name": "Split Dates to Items",
|
||||||
|
"alwaysOutputData": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "const [day, month, year] = $json.Dates.split(\".\");\n\nconst dateObj = new Date(`${year}-${month}-${day}`);\n\nconst monthNames = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"];\n\nconst sheetName = `${monthNames[dateObj.getMonth()]} ${year.slice(2)}`;\n\nlet results = [];\n\nresults.push({\n ...$json,\n \"Sheet\": sheetName,\n});\n\nreturn results.map(r => ({ json: r }));"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
848,
|
||||||
|
-256
|
||||||
|
],
|
||||||
|
"id": "7b381b7c-f404-4346-9686-dd7247d39451",
|
||||||
|
"name": "Get Sheet Name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "const inputDate = $json.Dates; \n// Format: 07.05.2026\n\n// Datum zerlegen\nconst [day, month, year] = inputDate.split(\".\");\n\n// JS Date erzeugen (ISO Format)\nconst date = new Date(`${year}-${month}-${day}`);\n\n// Excel / Sheets Basisdatum\nconst excelEpoch = new Date(\"1899-12-30\");\n\n// Differenz in Millisekunden\nconst diffMs = date - excelEpoch;\n\n// In Tage umrechnen\nconst serialNumber = Math.floor(diffMs / (1000 * 60 * 60 * 24));\n\nreturn [{\n json: {\n ...$json,\n DateSerial: serialNumber\n }\n}];"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
1296,
|
||||||
|
-160
|
||||||
|
],
|
||||||
|
"id": "a89c576f-e695-4564-a65c-79ea262fe39c",
|
||||||
|
"name": "Get Date in Serial"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"method": "PUT",
|
||||||
|
"url": "=https://sheets.googleapis.com/v4/spreadsheets/{{ $json.spreadsheetId }}/values/'{{ $('Get Sheet Name').item.json.Sheet }}'!A{{ $('Merge').item.json.row_number +2}}:Z{{ $('Merge').item.json.row_number +2}}?valueInputOption=USER_ENTERED",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleSheetsOAuth2Api",
|
||||||
|
"sendBody": true,
|
||||||
|
"specifyBody": "json",
|
||||||
|
"jsonBody": "={\n \"range\": \"'{{ $('Get Sheet Name').item.json.Sheet }}'!A{{ $('Merge').item.json.row_number +2}}:Z{{ $('Merge').item.json.row_number +2}}\",\n \"majorDimension\": \"ROWS\",\n \"values\": [\n [\n \"New\",\n \"{{ $('Loop Over Items').item.json['Full Name'] }}\",\n \"{{ $('Loop Over Items').item.json.Age }}\",\n \"{{ $('Loop Over Items').item.json.Tall }}\",\n \"{{ $('Loop Over Items').item.json.Weigh }}\",\n \"\",\n \"=BOARD(E{{ $('Merge').item.json.row_number +2}})\",\n \"\",\n \"{{ $('Loop Over Items').item.json.Accommodation }}\"\n ]\n ]\n}",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.4,
|
||||||
|
"position": [
|
||||||
|
2416,
|
||||||
|
-80
|
||||||
|
],
|
||||||
|
"id": "12d5aa0e-4493-4cfc-9015-f0f1a4025ecb",
|
||||||
|
"name": "Insert Data",
|
||||||
|
"executeOnce": false,
|
||||||
|
"credentials": {
|
||||||
|
"googleSheetsOAuth2Api": {
|
||||||
|
"id": "uD5ZF97n5p0sR1i3",
|
||||||
|
"name": "Google Sheets"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"method": "POST",
|
||||||
|
"url": "=https://sheets.googleapis.com/v4/spreadsheets/{{ $json.spreadsheetID }}:batchUpdate",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleSheetsOAuth2Api",
|
||||||
|
"sendBody": true,
|
||||||
|
"specifyBody": "json",
|
||||||
|
"jsonBody": "={ \n \"requests\": [ \n { \"insertDimension\": { \n \"range\": { \n \"sheetId\": {{ $json.sheetId }}, \n \"dimension\": \"ROWS\", \n \"startIndex\": {{ $json.row_number+1 }}, \n \"endIndex\": {{ $json.row_number+2 }} \n }, \n \"inheritFromBefore\": false \n }\n } \n ]\n} ",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.4,
|
||||||
|
"position": [
|
||||||
|
2192,
|
||||||
|
-224
|
||||||
|
],
|
||||||
|
"id": "3f9c58f8-81f0-4a33-9acf-ed4c351ca4fc",
|
||||||
|
"name": "Add Row",
|
||||||
|
"credentials": {
|
||||||
|
"googleSheetsOAuth2Api": {
|
||||||
|
"id": "uD5ZF97n5p0sR1i3",
|
||||||
|
"name": "Google Sheets"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"url": "=https://sheets.googleapis.com/v4/spreadsheets/{{ $json.spreadsheetID }}",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleSheetsOAuth2Api",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.4,
|
||||||
|
"position": [
|
||||||
|
1072,
|
||||||
|
-384
|
||||||
|
],
|
||||||
|
"id": "81e01fda-c91d-4f13-9854-c0366c1a8bb7",
|
||||||
|
"name": "Get Sheed IDs",
|
||||||
|
"executeOnce": true,
|
||||||
|
"credentials": {
|
||||||
|
"googleSheetsOAuth2Api": {
|
||||||
|
"id": "uD5ZF97n5p0sR1i3",
|
||||||
|
"name": "Google Sheets"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "const sheets = $json.sheets;\nconst target = sheets.find(s => s.properties.title === $('Get Sheet Name').first().json.Sheet);\nreturn [{ sheetId: target.properties.sheetId }];"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
1296,
|
||||||
|
-384
|
||||||
|
],
|
||||||
|
"id": "14eac781-34d5-4db0-a65a-07674ff280f6",
|
||||||
|
"name": "Find Sheet ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"mode": "combine",
|
||||||
|
"combineBy": "combineByPosition",
|
||||||
|
"numberInputs": 3,
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.merge",
|
||||||
|
"typeVersion": 3.2,
|
||||||
|
"position": [
|
||||||
|
1968,
|
||||||
|
-240
|
||||||
|
],
|
||||||
|
"id": "b124a24d-61d1-4a16-885a-49ace32ab72b",
|
||||||
|
"name": "Merge"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.splitInBatches",
|
||||||
|
"typeVersion": 3,
|
||||||
|
"position": [
|
||||||
|
624,
|
||||||
|
-272
|
||||||
|
],
|
||||||
|
"id": "6c96e3e5-4a73-4efe-877d-737242c5f5a5",
|
||||||
|
"name": "Loop Over Items"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"mode": "chooseBranch"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.merge",
|
||||||
|
"typeVersion": 3.2,
|
||||||
|
"position": [
|
||||||
|
848,
|
||||||
|
-576
|
||||||
|
],
|
||||||
|
"id": "cb67ca67-f357-4097-adab-8713df191a7c",
|
||||||
|
"name": "Merge1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "const subject = $json.subject;\nlet results = []\n\nswitch (subject){\n case \"BookingRequest-MailBot-Surf\":\n results.push({\n sport: \"Surf\",\n spreadsheetID: \"1T4vjZi7JKHHJH8KxWsa6AzGLmz4PROW1s93fwlMru-U\",\n });\n break;\n case \"BookingRequest-MailBot-Kite\":\n results.push({\n sport: \"Kite\",\n spreadsheetID: \"1OcUsAlnhp4d-qKbnJAcQ-2-6iOs5XWoVunqCjTBlIEw\",\n });\n break;\n}\n\nreturn results.map(r => ({ json: r }));"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
-112,
|
||||||
|
-288
|
||||||
|
],
|
||||||
|
"id": "807aac51-7910-43fa-82f2-ee2de6e11637",
|
||||||
|
"name": "Kite or Surf"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"mode": "combine",
|
||||||
|
"combineBy": "combineByPosition",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.merge",
|
||||||
|
"typeVersion": 3.2,
|
||||||
|
"position": [
|
||||||
|
176,
|
||||||
|
-368
|
||||||
|
],
|
||||||
|
"id": "997a2fc0-bd38-4745-b0bb-59bbcf15dd5f",
|
||||||
|
"name": "Merge2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"documentId": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "={{ $('Get Sheed IDs').item.json.spreadsheetId }}",
|
||||||
|
"mode": "id"
|
||||||
|
},
|
||||||
|
"sheetName": {
|
||||||
|
"__rl": true,
|
||||||
|
"value": "={{ $json.sheetId }}",
|
||||||
|
"mode": "id"
|
||||||
|
},
|
||||||
|
"filtersUI": {
|
||||||
|
"values": [
|
||||||
|
{
|
||||||
|
"lookupColumn": "Date",
|
||||||
|
"lookupValue": "={{ $json.DateSerial }}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"dataLocationOnSheet": {
|
||||||
|
"values": {
|
||||||
|
"rangeDefinition": "specifyRangeA1",
|
||||||
|
"range": "A:A"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"outputFormatting": {
|
||||||
|
"values": {
|
||||||
|
"general": "UNFORMATTED_VALUE",
|
||||||
|
"date": "SERIAL_NUMBER"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"returnFirstMatch": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.googleSheets",
|
||||||
|
"typeVersion": 4.7,
|
||||||
|
"position": [
|
||||||
|
1744,
|
||||||
|
-416
|
||||||
|
],
|
||||||
|
"id": "7046f3c7-875a-48a6-b684-7f1e2e61199a",
|
||||||
|
"name": "Get row(s) in sheet",
|
||||||
|
"credentials": {
|
||||||
|
"googleSheetsOAuth2Api": {
|
||||||
|
"id": "uD5ZF97n5p0sR1i3",
|
||||||
|
"name": "Google Sheets"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"mode": "combine",
|
||||||
|
"combineBy": "combineByPosition",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.merge",
|
||||||
|
"typeVersion": 3.2,
|
||||||
|
"position": [
|
||||||
|
1520,
|
||||||
|
-320
|
||||||
|
],
|
||||||
|
"id": "ddcafb5d-7fc2-4cfe-915d-0b43cb6d61ca",
|
||||||
|
"name": "Merge3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"method": "POST",
|
||||||
|
"url": "=https://sheets.googleapis.com/v4/spreadsheets/{{ $json.spreadsheetId }}:batchUpdate",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleSheetsOAuth2Api",
|
||||||
|
"sendBody": true,
|
||||||
|
"specifyBody": "json",
|
||||||
|
"jsonBody": "={\n \"requests\": [\n {\n \"repeatCell\": {\n \"range\": {\n \"sheetId\": {{ $('Merge').item.json.sheetId }},\n \"startRowIndex\": {{ $('Merge').item.json.row_number +1}},\n \"endRowIndex\": {{ $('Merge').item.json.row_number +2}},\n \"startColumnIndex\": 12,\n \"endColumnIndex\": 16\n },\n \"cell\": {\n \"userEnteredFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"fields\": \"userEnteredFormat.backgroundColor\"\n }\n }\n ]\n}",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.4,
|
||||||
|
"position": [
|
||||||
|
2624,
|
||||||
|
-144
|
||||||
|
],
|
||||||
|
"id": "bf5e85b8-c3b9-44f1-8b93-3e5568f355fe",
|
||||||
|
"name": "White",
|
||||||
|
"credentials": {
|
||||||
|
"googleSheetsOAuth2Api": {
|
||||||
|
"id": "uD5ZF97n5p0sR1i3",
|
||||||
|
"name": "Google Sheets"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"method": "POST",
|
||||||
|
"url": "=https://sheets.googleapis.com/v4/spreadsheets/{{ $json.spreadsheetId }}:batchUpdate",
|
||||||
|
"authentication": "predefinedCredentialType",
|
||||||
|
"nodeCredentialType": "googleSheetsOAuth2Api",
|
||||||
|
"sendBody": true,
|
||||||
|
"specifyBody": "json",
|
||||||
|
"jsonBody": "={\n \"requests\": [\n {\n \"repeatCell\": {\n \"range\": {\n \"sheetId\": {{ $('Merge').item.json.sheetId }},\n \"startRowIndex\": {{ $('Merge').item.json.row_number +1}},\n \"endRowIndex\": {{ $('Merge').item.json.row_number +2}},\n \"startColumnIndex\": 0,\n \"endColumnIndex\": 11\n },\n \"cell\": {\n \"userEnteredFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 0\n }\n }\n },\n \"fields\": \"userEnteredFormat.backgroundColor\"\n }\n }\n ]\n}",
|
||||||
|
"options": {}
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.httpRequest",
|
||||||
|
"typeVersion": 4.4,
|
||||||
|
"position": [
|
||||||
|
2624,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"id": "061cd389-e8ba-44e2-b973-5a9ad8e454e4",
|
||||||
|
"name": "Yellow",
|
||||||
|
"credentials": {
|
||||||
|
"googleSheetsOAuth2Api": {
|
||||||
|
"id": "uD5ZF97n5p0sR1i3",
|
||||||
|
"name": "Google Sheets"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"mode": "chooseBranch"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.merge",
|
||||||
|
"typeVersion": 3.2,
|
||||||
|
"position": [
|
||||||
|
2832,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"id": "88113df7-42d7-4145-9c69-8ba6cb2cead8",
|
||||||
|
"name": "Merge4"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"parameters": {
|
||||||
|
"jsCode": "const text = $json.textPlain; \n\nconst lines = text.split('\\n').filter(l => l.trim() !== '');\n\nconst result = {};\n\nfor (const line of lines) {\n const [key, value] = line.split(':');\n if (key && value) {\n result[key.trim()] = value.trim();\n }\n}\n\nreturn [\n {\n json: result\n }\n];"
|
||||||
|
},
|
||||||
|
"type": "n8n-nodes-base.code",
|
||||||
|
"typeVersion": 2,
|
||||||
|
"position": [
|
||||||
|
-112,
|
||||||
|
-480
|
||||||
|
],
|
||||||
|
"id": "de54ab86-aa00-49b6-bc7b-718a8f0bd103",
|
||||||
|
"name": "Parse Mail to Json1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"pinData": {},
|
||||||
|
"connections": {
|
||||||
|
"Email Trigger (IMAP)": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Kite or Surf",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "Parse Mail to Json1",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Parse Mail to Json": {
|
||||||
|
"main": [
|
||||||
|
[]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Split Dates to Items": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Loop Over Items",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Get Sheet Name": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Get Date in Serial",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "Get Sheed IDs",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Get Date in Serial": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge3",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "Merge",
|
||||||
|
"type": "main",
|
||||||
|
"index": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Add Row": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Insert Data",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Get Sheed IDs": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Find Sheet ID",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Find Sheet ID": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge3",
|
||||||
|
"type": "main",
|
||||||
|
"index": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Merge": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Add Row",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Loop Over Items": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge1",
|
||||||
|
"type": "main",
|
||||||
|
"index": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Get Sheet Name",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Insert Data": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Yellow",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "White",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Merge1": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Send a text message",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Kite or Surf": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge2",
|
||||||
|
"type": "main",
|
||||||
|
"index": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Merge2": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge1",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "Split Dates to Items",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Get row(s) in sheet": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Merge3": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Get row(s) in sheet",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "Merge",
|
||||||
|
"type": "main",
|
||||||
|
"index": 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Yellow": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge4",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"White": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge4",
|
||||||
|
"type": "main",
|
||||||
|
"index": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Merge4": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Loop Over Items",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Parse Mail to Json1": {
|
||||||
|
"main": [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"node": "Merge2",
|
||||||
|
"type": "main",
|
||||||
|
"index": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"active": false,
|
||||||
|
"settings": {
|
||||||
|
"executionOrder": "v1",
|
||||||
|
"binaryMode": "separate",
|
||||||
|
"availableInMCP": false
|
||||||
|
},
|
||||||
|
"versionId": "682b6e06-36ae-4bd4-8089-df236c96d0c0",
|
||||||
|
"meta": {
|
||||||
|
"templateCredsSetupCompleted": true,
|
||||||
|
"instanceId": "4674f284e85213f04baf0419e3407e986c2c4a3d3e335730c4a2482ed0ab860a"
|
||||||
|
},
|
||||||
|
"id": "3hAYo6T16q1q63sx",
|
||||||
|
"tags": []
|
||||||
|
}
|
||||||
+18
-69
@@ -148,54 +148,28 @@
|
|||||||
{% when 'text' %}
|
{% when 'text' %}
|
||||||
<div class="rte">{{ block.settings.text }}</div>
|
<div class="rte">{{ block.settings.text }}</div>
|
||||||
|
|
||||||
{% when 'privacy_input' %}
|
|
||||||
<!-- PRIVACY CHECKBOX HIER -->
|
|
||||||
<div class="field field--checkbox lightly-spaced-row">
|
|
||||||
<label class="field__label" for="privacy">
|
|
||||||
<input
|
|
||||||
class="field__input"
|
|
||||||
type="checkbox"
|
|
||||||
id="privacy"
|
|
||||||
name="contact[privacy]"
|
|
||||||
required
|
|
||||||
value="yes"
|
|
||||||
>
|
|
||||||
* I agree to the <a href="/pages/privacy-policy" target="_blank">Privacy Policy</a>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="lightly-spaced-row">
|
|
||||||
<button type="submit">{{ 'contact.form.send' | t }}</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% when 'privacy_input' %}
|
|
||||||
{% if block.settings.title != blank %}
|
|
||||||
<!-- PRIVACY CHECKBOX HIER -->
|
|
||||||
<div class="field field--checkbox lightly-spaced-row">
|
|
||||||
{%- assign title_handle = block.settings.title | handle -%}
|
|
||||||
<label for="contact_{{ title_handle }}">{{ block.settings.title | escape }}</label>
|
|
||||||
<input
|
|
||||||
class="field__input"
|
|
||||||
type="checkbox"
|
|
||||||
id="privacy"
|
|
||||||
name="contact[privacy]"
|
|
||||||
required
|
|
||||||
value="yes"
|
|
||||||
>
|
|
||||||
<!--{{ block.settings.textin | escape }}-->
|
|
||||||
* I agree to the <a href="/pages/privacy-policy" target="_blank">Privacy Policy</a>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="lightly-spaced-row">
|
|
||||||
<button type="submit">{{ 'contact.form.send' | t }}</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endcase %}
|
{% endcase %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- PRIVACY CHECKBOX HIER -->
|
||||||
|
<div class="field field--checkbox lightly-spaced-row">
|
||||||
|
<label class="field__label" for="privacy">
|
||||||
|
<input
|
||||||
|
class="field__input"
|
||||||
|
type="checkbox"
|
||||||
|
id="privacy"
|
||||||
|
name="contact[privacy]"
|
||||||
|
required
|
||||||
|
value="yes"
|
||||||
|
>
|
||||||
|
* I agree to the <a href="/pages/privacy-policy" target="_blank">Privacy Policy</a>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="lightly-spaced-row">
|
||||||
|
<button type="submit">{{ 'contact.form.send' | t }}</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endform %}
|
{% endform %}
|
||||||
@@ -361,31 +335,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "privacy_input",
|
|
||||||
"name": "Privacy Checkbox",
|
|
||||||
"limit": 1,
|
|
||||||
"settings": [
|
|
||||||
{
|
|
||||||
"type": "text",
|
|
||||||
"id": "title",
|
|
||||||
"label": "Label",
|
|
||||||
"default": "Privacy"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "text",
|
|
||||||
"id": "textin",
|
|
||||||
"label": "Label",
|
|
||||||
"default": "Privacy"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "checkbox",
|
|
||||||
"id": "required",
|
|
||||||
"label": "Required",
|
|
||||||
"default": true
|
|
||||||
},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "custom_input",
|
"type": "custom_input",
|
||||||
"name": "Custom input",
|
"name": "Custom input",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user