-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathgoogle_sheets_report.json
More file actions
58 lines (58 loc) · 1.68 KB
/
google_sheets_report.json
File metadata and controls
58 lines (58 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
"name": "Google Sheets Report Generator",
"description": "Reads data from Google Sheets, processes it, and appends a summary row",
"nodes": [
{
"id": "node-1",
"type": "automationStep",
"data": {
"step": {
"id": "step-1",
"type": "googleSheetsReadRows",
"description": "Read sales data",
"credentialId": "my-google-creds",
"spreadsheetId": "{{SHEET_ID}}",
"range": "Sales!A1:D100",
"firstRowHeaders": true,
"storeKey": "salesData"
}
},
"position": { "x": 0, "y": 0 }
},
{
"id": "node-2",
"type": "automationStep",
"data": {
"step": {
"id": "step-2",
"type": "codeExecute",
"description": "Calculate totals",
"code": "const total = salesData.reduce((sum, row) => sum + Number(row.Amount), 0); return { total, count: salesData.length };",
"storeKey": "summary"
}
},
"position": { "x": 0, "y": 100 }
},
{
"id": "node-3",
"type": "automationStep",
"data": {
"step": {
"id": "step-3",
"type": "googleSheetsAppendRow",
"description": "Append summary row",
"credentialId": "my-google-creds",
"spreadsheetId": "{{SHEET_ID}}",
"range": "Sales!A:D",
"values": "[\"TOTAL\", \"\", \"{{summary.count}} orders\", \"{{summary.total}}\"]",
"storeKey": "appendResult"
}
},
"position": { "x": 0, "y": 200 }
}
],
"edges": [
{ "id": "e1-2", "source": "node-1", "target": "node-2" },
{ "id": "e2-3", "source": "node-2", "target": "node-3" }
]
}