An experimental n8n workflow example intended to email a weekly summary of requests from a Google Sheet. Code logic was tested with synthetic inputs; the complete workflow has not been verified with connected services. The workflow export below is free to copy. You need your own n8n environment and service accounts, which may have their own charges. Use a test environment with made-up data first. Copy the JSON onto an empty n8n canvas (Ctrl+V) and follow the setup steps.
For a contractor maintaining a Requests sheet. Every Monday at 08:00 the workflow reads the sheet and sends the owner a report of new, open, high-priority and stale requests.
Requirements: your own n8n instance, Google Sheets credentials with read access to the spreadsheet, and Gmail credentials permitted to send the report. Configure Read all rows and Email the report. No community nodes or sub-workflows are required.
Setup:
- Use a Requests tab with these exact headings: RFQ ID, Received, Name, Email, Phone, Trade, Location, Deadline, Budget, Scope, Missing, Priority, Status, Subject, Thread ID.
- Replace REPLACE_WITH_SPREADSHEET_ID in Read all rows and confirm the Requests tab name.
- In Settings, set ownerEmail to an inbox you control and staleDays to your chosen threshold, initially 5. Leave reportDate empty in normal use.
- Configure the workflow time zone for the intended Monday 08:00 schedule. Maintain the Status column by hand. Won, Lost, Closed and Declined are treated as closed.
- Test the exact export with made-up rows and check the report actually delivered to your inbox. Compare counts against the sheet. Exercise an empty sheet, multiple rows, closed requests, missing fields, stale requests and service errors.
- Activate only after the delivered results are checked. Monitor execution errors and check the inbox before retrying.
Limits: report accuracy depends on the sheet values and manual status updates. Read all rows has alwaysOutputData enabled, and the report code produces zero counts for empty input. Delivery of that report through the complete workflow has not been verified. A Sheets service error can prevent the report. There is no send-once guard; rerunning can send another report.
Made with AI tools. Report logic was tested on made-up inputs; this is not evidence of a complete run with connected services. A complete run of the exact export is required before submission to n8n Creator Hub. Verify the complete workflow in your own test environment before activating it for real use.
Workflow JSON
{
"name": "Weekly request report from sheet",
"nodes": [
{
"parameters": {
"content": "## Weekly request report from Google Sheets\n\nFor a contractor maintaining a Requests sheet. Every Monday at 08:00 the workflow reads the sheet and sends the owner a report of new, open, high-priority and stale requests.\n\nRequirements: your own n8n instance, Google Sheets credentials with read access to the spreadsheet, and Gmail credentials permitted to send the report. Configure Read all rows and Email the report. No community nodes or sub-workflows are required.\n\nSetup:\n1. Use a Requests tab with these exact headings:\nRFQ ID, Received, Name, Email, Phone, Trade, Location, Deadline, Budget, Scope, Missing, Priority, Status, Subject, Thread ID.\n2. Replace REPLACE_WITH_SPREADSHEET_ID in Read all rows and confirm the Requests tab name.\n3. In Settings, set ownerEmail to an inbox you control and staleDays to your chosen threshold, initially 5. Leave reportDate empty in normal use.\n4. Configure the workflow time zone for the intended Monday 08:00 schedule. Maintain the Status column by hand. Won, Lost, Closed and Declined are treated as closed.\n5. Test the exact export with made-up rows and check the report actually delivered to your inbox. Compare counts against the sheet. Exercise an empty sheet, multiple rows, closed requests, missing fields, stale requests and service errors.\n6. Activate only after the delivered results are checked. Monitor execution errors and check the inbox before retrying.\n\nLimits: report accuracy depends on the sheet values and manual status updates. Read all rows has alwaysOutputData enabled, and the report code produces zero counts for empty input. Delivery of that report through the complete workflow has not been verified. A Sheets service error can prevent the report. There is no send-once guard; rerunning can send another report.\n\nMade with AI tools. Report logic was tested on made-up inputs; this is not evidence of a complete run with connected services. A complete run of the exact export is required before submission to n8n Creator Hub. Verify the complete workflow in your own test environment before activating it for real use.",
"width": 650,
"height": 1200
},
"id": "00000000-0000-4000-8000-000000000024",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-80,
-260
]
},
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
1
],
"triggerAtHour": 8
}
]
}
},
"id": "00000000-0000-4000-8000-000000000025",
"name": "Every Monday 8:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "00000000-0000-4000-8000-000000000026",
"name": "ownerEmail",
"value": "you@your-company.example",
"type": "string"
},
{
"id": "00000000-0000-4000-8000-000000000027",
"name": "staleDays",
"value": "5",
"type": "string"
},
{
"id": "00000000-0000-4000-8000-000000000028",
"name": "reportDate",
"value": "",
"type": "string"
}
]
},
"includeOtherFields": true,
"options": {}
},
"id": "00000000-0000-4000-8000-000000000029",
"name": "Settings",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
220,
0
]
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "REPLACE_WITH_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Requests",
"mode": "name"
},
"options": {}
},
"id": "00000000-0000-4000-8000-000000000030",
"name": "Read all rows",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
440,
0
],
"alwaysOutputData": true
},
{
"parameters": {
"jsCode": "// Code node \"Build weekly report\": reads all rows of the RFQ sheet and writes one summary email.\r\n// Columns are the ones template 1 writes: RFQ ID, Received, Trade, Priority, Status, Missing, Deadline.\r\nconst cfg = $('Settings').first().json;\r\nconst rows = $input.all().map((i) => i.json).filter((r) => r['RFQ ID']);\r\nconst today = cfg.reportDate ? new Date(cfg.reportDate + 'T12:00:00Z') : new Date();\r\nconst DAY = 86400000;\r\nconst age = (r) => Math.floor((today - new Date(r['Received'] + 'T12:00:00Z')) / DAY);\r\nconst closed = (r) => /^(won|lost|closed|declined)$/i.test(String(r['Status'] || '').trim());\r\n\r\nconst week = rows.filter((r) => age(r) >= 0 && age(r) < 7);\r\nconst open = rows.filter((r) => !closed(r));\r\nconst stale = open.filter((r) => age(r) >= Number(cfg.staleDays));\r\nconst urgent = open.filter((r) => r['Priority'] === 'High');\r\n\r\nconst count = (list, key) => {\r\n const m = {};\r\n for (const r of list) { const k = String(r[key] || 'Unknown').trim() || 'Unknown'; m[k] = (m[k] || 0) + 1; }\r\n return Object.entries(m).sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0])).map(([k, v]) => ' ' + k + ': ' + v);\r\n};\r\nconst listRows = (list) => list.map((r) => ' ' + r['RFQ ID'] + ' (' + (r['Trade'] || 'Unknown') + ', received ' + r['Received'] + (r['Deadline'] ? ', due ' + r['Deadline'] : '') + ')');\r\n\r\nconst out = [];\r\nout.push('Weekly request report, week ending ' + today.toISOString().slice(0, 10));\r\nout.push('');\r\nout.push('New requests in the last 7 days: ' + week.length);\r\nout.push('Open requests in total: ' + open.length);\r\nout.push('');\r\nout.push('New this week by trade:');\r\nout.push(...(week.length ? count(week, 'Trade') : [' none']));\r\nout.push('');\r\nout.push('Open by status:');\r\nout.push(...(open.length ? count(open, 'Status') : [' none']));\r\nout.push('');\r\nout.push('High priority and still open (' + urgent.length + '):');\r\nout.push(...(urgent.length ? listRows(urgent) : [' none']));\r\nout.push('');\r\nout.push('Open for ' + cfg.staleDays + ' days or more (' + stale.length + '):');\r\nout.push(...(stale.length ? listRows(stale) : [' none']));\r\n\r\nreturn [{ json: { subject: 'Weekly request report ' + today.toISOString().slice(0, 10), body: out.join('\\n'), newThisWeek: week.length, open: open.length } }];\r\n"
},
"id": "00000000-0000-4000-8000-000000000031",
"name": "Build weekly report",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
660,
0
]
},
{
"parameters": {
"resource": "message",
"operation": "send",
"sendTo": "={{ $('Settings').first().json.ownerEmail }}",
"subject": "={{ $json.subject }}",
"emailType": "text",
"message": "={{ $json.body }}",
"options": {}
},
"id": "00000000-0000-4000-8000-000000000032",
"name": "Email the report",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
880,
0
]
}
],
"connections": {
"Every Monday 8:00": {
"main": [
[
{
"node": "Settings",
"type": "main",
"index": 0
}
]
]
},
"Settings": {
"main": [
[
{
"node": "Read all rows",
"type": "main",
"index": 0
}
]
]
},
"Read all rows": {
"main": [
[
{
"node": "Build weekly report",
"type": "main",
"index": 0
}
]
]
},
"Build weekly report": {
"main": [
[
{
"node": "Email the report",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"pinData": {},
"tags": []
}
Top comments (0)