This workflow corresponds to n8n.io template #10189 — we link there as the canonical source.
This workflow follows the Datatable → Gmail recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateId": "2447",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "70424282-dcce-4f1a-aba0-af0e7947a4fd",
"name": "Set Break Duration",
"type": "n8n-nodes-base.set",
"position": [
1664,
912
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9261c98a-3099-4409-b697-8c28f6ec0c06",
"name": "break_duration",
"type": "number",
"value": "={{ $('Webhook - Track Time').item.json.body.duration }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "875f1969-4958-4450-87a5-aad1f65b3a9d",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
736,
912
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Start",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.method }}",
"rightValue": "start"
}
]
},
"renameOutput": true
},
{
"outputKey": "Break",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6ddd1f12-a0d8-42df-9776-dff0f44ba82c",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.method }}",
"rightValue": "break"
}
]
},
"renameOutput": true
},
{
"outputKey": "End",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "61550dac-65a2-4e4b-99a8-4df4a357cec0",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.method }}",
"rightValue": "end"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.1
},
{
"id": "8cbdbe7f-3c32-48bb-bce6-80b918a7c31e",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
240
],
"parameters": {
"width": 1407,
"height": 470,
"content": "## START"
},
"typeVersion": 1
},
{
"id": "e930da00-916b-4767-a34e-b985d97090ca",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
752
],
"parameters": {
"width": 1407,
"height": 597,
"content": "## BREAK"
},
"typeVersion": 1
},
{
"id": "6b77fcde-e3ed-4cfa-bd89-9d1cc6660591",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
1392
],
"parameters": {
"width": 1407,
"height": 628,
"content": "## END"
},
"typeVersion": 1
},
{
"id": "85b40d37-3a55-4346-8c94-60eb2f8b6dba",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
368,
240
],
"parameters": {
"color": 4,
"width": 538.9177312302156,
"height": 1760.750302860566,
"content": "## WAIT"
},
"typeVersion": 1
},
{
"id": "bfe988d1-81c5-4c70-affd-220cfc5016da",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
3120,
1008
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.message }}"
},
"typeVersion": 1.1
},
{
"id": "585efbae-ec10-4ef4-90a0-7bad55b4a150",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2432,
240
],
"parameters": {
"color": 4,
"width": 415.1572200385813,
"height": 1766.1026447605514,
"content": "## RESPONSE"
},
"typeVersion": 1
},
{
"id": "b75485ce-d365-4743-a4ee-e16799e12c24",
"name": "Webhook - Track Time",
"type": "n8n-nodes-base.webhook",
"position": [
512,
928
],
"parameters": {
"path": "track-time",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "aca3ed81-1dbd-4439-8e00-41d63e8d9317",
"name": "If1",
"type": "n8n-nodes-base.if",
"position": [
1408,
928
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c3da335c-90d9-4ac0-b470-dc91fd73bfe3",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.start }}",
"rightValue": "={{ $today }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "5041890d-630e-4814-85f0-e02d3f7d0a95",
"name": "Get row(s)",
"type": "n8n-nodes-base.dataTable",
"position": [
1136,
928
],
"parameters": {
"operation": "get",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "P4XPPCTMQJ4pWSU8",
"cachedResultUrl": "/projects/XY9UVd698UhQGydX/datatables/P4XPPCTMQJ4pWSU8",
"cachedResultName": "schedule"
}
},
"typeVersion": 1
},
{
"id": "09233c72-63c8-48b3-9dee-2463b12b395e",
"name": "Update row(s)",
"type": "n8n-nodes-base.dataTable",
"position": [
1968,
912
],
"parameters": {
"columns": {
"value": {
"break": "={{ $('Webhook - Track Time').item.json.body.duration }}",
"start": "={{ $today }}",
"Employee": "={{ $('Webhook - Track Time').item.json.headers.id }}"
},
"schema": [
{
"id": "Employee",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Employee",
"defaultMatch": false
},
{
"id": "start",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "start",
"defaultMatch": false
},
{
"id": "end",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "end",
"defaultMatch": false
},
{
"id": "break",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "break",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"filters": {
"conditions": [
{
"keyName": "start",
"keyValue": "={{ $today }}"
}
]
},
"options": {},
"operation": "update",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "P4XPPCTMQJ4pWSU8",
"cachedResultUrl": "/projects/XY9UVd698UhQGydX/datatables/P4XPPCTMQJ4pWSU8",
"cachedResultName": "schedule"
}
},
"typeVersion": 1
},
{
"id": "6f21b44e-3c08-482e-8540-c879d8cb338f",
"name": "ERROR",
"type": "n8n-nodes-base.set",
"position": [
2592,
1184
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "419d7570-d1ce-44b1-814c-7757da92a188",
"name": "message",
"type": "string",
"value": "=ERROR"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "9a549bad-dab1-4909-8cbc-66888ec29289",
"name": "Insert row",
"type": "n8n-nodes-base.dataTable",
"position": [
1712,
512
],
"parameters": {
"columns": {
"value": {
"start": "={{ $today }}",
"Employee": "={{ $('Webhook - Track Time').item.json.headers.id }}"
},
"schema": [
{
"id": "Employee",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Employee",
"defaultMatch": false
},
{
"id": "start",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "start",
"defaultMatch": false
},
{
"id": "end",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "end",
"defaultMatch": false
},
{
"id": "break",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "break",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "P4XPPCTMQJ4pWSU8",
"cachedResultUrl": "/projects/XY9UVd698UhQGydX/datatables/P4XPPCTMQJ4pWSU8",
"cachedResultName": "schedule"
}
},
"typeVersion": 1
},
{
"id": "6d37fe25-3479-496f-bf5c-00027c5fdc60",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
1440,
1552
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c3da335c-90d9-4ac0-b470-dc91fd73bfe3",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.start }}",
"rightValue": "={{ $today }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "65726b45-9052-44a5-ab3e-b81faf34959a",
"name": "Get row(s)2",
"type": "n8n-nodes-base.dataTable",
"position": [
1184,
1536
],
"parameters": {
"operation": "get",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "P4XPPCTMQJ4pWSU8",
"cachedResultUrl": "/projects/XY9UVd698UhQGydX/datatables/P4XPPCTMQJ4pWSU8",
"cachedResultName": "schedule"
}
},
"typeVersion": 1
},
{
"id": "f9c58330-acef-4eb4-9561-2d350f74f7e5",
"name": "Update row(s)1",
"type": "n8n-nodes-base.dataTable",
"position": [
2016,
1536
],
"parameters": {
"columns": {
"value": {
"end": "={{ $now }}",
"break": "={{ $('Get row(s)2').item.json.break }}",
"start": "={{ $today }}",
"Employee": "={{ $('Webhook - Track Time').item.json.headers.id }}"
},
"schema": [
{
"id": "Employee",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Employee",
"defaultMatch": false
},
{
"id": "start",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "start",
"defaultMatch": false
},
{
"id": "end",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "end",
"defaultMatch": false
},
{
"id": "break",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "break",
"defaultMatch": false
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"filters": {
"conditions": [
{
"keyName": "start",
"keyValue": "={{ $today }}"
}
]
},
"options": {},
"operation": "update",
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "P4XPPCTMQJ4pWSU8",
"cachedResultUrl": "/projects/XY9UVd698UhQGydX/datatables/P4XPPCTMQJ4pWSU8",
"cachedResultName": "schedule"
}
},
"typeVersion": 1
},
{
"id": "51e7d283-9d69-4730-9f39-81b76bee57aa",
"name": "ERROR1",
"type": "n8n-nodes-base.set",
"position": [
2608,
1776
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "419d7570-d1ce-44b1-814c-7757da92a188",
"name": "message",
"type": "string",
"value": "=ERROR"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4ee9a3bf-7173-47de-a35f-9de4eaa2c562",
"name": "end",
"type": "n8n-nodes-base.set",
"position": [
1744,
1520
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9261c98a-3099-4409-b697-8c28f6ec0c06",
"name": "end",
"type": "string",
"value": "={{ $now }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "69235db6-08a2-4480-89f5-bd5ccd42067b",
"name": "Message a model",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
960,
2224
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"messages": {
"values": [
{
"content": "=Analyze the time tracking for last month and provide me with a summary\n\n\n{{ $json }}"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "952f2882-0b34-4408-8b09-4f3b2a70d661",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
384,
2144
],
"parameters": {
"width": 1184,
"height": 352,
"content": "## MONTHLY SUMMARY\n"
},
"typeVersion": 1
},
{
"id": "a0133c1e-4092-4e90-9171-f09902e6abac",
"name": "Message a model1",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2272,
2224
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"messages": {
"values": [
{
"content": "=IF I HAVEN'T CLOCKED IN TODAY, REMIND ME BY EMAIL\n\n{{ $json }}"
}
]
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "a12ac5bc-c39e-4f1c-bca5-727c57a65829",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1696,
2144
],
"parameters": {
"width": 1184,
"height": 352,
"content": "## CLOCK-IN REMINDER\n"
},
"typeVersion": 1
},
{
"id": "16933a63-4e27-4931-b576-2bba8efb2828",
"name": "ANALYZE TIME ENTRIES",
"type": "n8n-nodes-base.dataTable",
"position": [
2000,
2224
],
"parameters": {
"operation": "get",
"returnAll": true,
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "P4XPPCTMQJ4pWSU8",
"cachedResultUrl": "/projects/XY9UVd698UhQGydX/datatables/P4XPPCTMQJ4pWSU8",
"cachedResultName": "schedule"
}
},
"typeVersion": 1
},
{
"id": "1e5a685f-bd1b-435e-b443-67548be0c845",
"name": "ANALYZE ENTIRE MONTH",
"type": "n8n-nodes-base.dataTable",
"position": [
688,
2224
],
"parameters": {
"operation": "get",
"returnAll": true,
"dataTableId": {
"__rl": true,
"mode": "list",
"value": "P4XPPCTMQJ4pWSU8",
"cachedResultUrl": "/projects/XY9UVd698UhQGydX/datatables/P4XPPCTMQJ4pWSU8",
"cachedResultName": "schedule"
}
},
"typeVersion": 1
},
{
"id": "5c02e825-e86d-4ef2-98ab-903892ec553f",
"name": "EVERY DAY",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
1792,
2224
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 10
}
]
}
},
"typeVersion": 1.2
},
{
"id": "a557f340-2ca6-46e1-af4d-d52b800fa9e2",
"name": "EVERY MONTH",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
480,
2224
],
"parameters": {
"rule": {
"interval": [
{
"field": "months",
"triggerAtHour": 6
}
]
}
},
"typeVersion": 1.2
},
{
"id": "24459b66-e41e-48b1-b267-00d56e97f9f8",
"name": "EMAIL TO EMPLOYEE",
"type": "n8n-nodes-base.gmail",
"position": [
2624,
2224
],
"parameters": {
"sendTo": "user@example.com",
"message": "={{ $json.message.content }}",
"options": {},
"subject": "SCHEDULE"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "ef328e10-411e-488a-9ac0-fcc57a10a500",
"name": "EMAIL TO MANAGEMENT",
"type": "n8n-nodes-base.gmail",
"position": [
1312,
2224
],
"parameters": {
"sendTo": "user@example.com",
"message": "={{ $json.message.content }}",
"options": {},
"subject": "SCHEDULE"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "6aeab75f-def1-46a6-9e13-b515d4bf703c",
"name": "MESSAGE",
"type": "n8n-nodes-base.set",
"position": [
2608,
1504
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "419d7570-d1ce-44b1-814c-7757da92a188",
"name": "message",
"type": "string",
"value": "=Tracked {{ $('end').item.json.break_duration }} minutes as break time."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "fa1855df-e3b5-4052-b26a-7be840bcaf0c",
"name": "MESSAGE1",
"type": "n8n-nodes-base.set",
"position": [
2592,
928
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "419d7570-d1ce-44b1-814c-7757da92a188",
"name": "message",
"type": "string",
"value": "=Tracked {{ $('Set Break Duration').item.json.break_duration }} minutes as break time."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "42465160-7eec-43ed-93ad-1d73745911a0",
"name": "MESSAGE2",
"type": "n8n-nodes-base.set",
"position": [
2592,
384
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "419d7570-d1ce-44b1-814c-7757da92a188",
"name": "message",
"type": "string",
"value": "Start time already tracked."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "a87a77ba-3f7d-4dec-9993-9c3e038f1559",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
3040,
944
],
"parameters": {
"color": 3,
"width": 272,
"height": 240,
"content": "## COMPLETED\n"
},
"typeVersion": 1
}
],
"connections": {
"If": {
"main": [
[
{
"node": "end",
"type": "main",
"index": 0
}
],
[
{
"node": "ERROR1",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Set Break Duration",
"type": "main",
"index": 0
}
],
[
{
"node": "ERROR",
"type": "main",
"index": 0
}
]
]
},
"end": {
"main": [
[
{
"node": "Update row(s)1",
"type": "main",
"index": 0
}
]
]
},
"ERROR": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"ERROR1": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Insert row",
"type": "main",
"index": 0
}
],
[
{
"node": "Get row(s)",
"type": "main",
"index": 0
}
],
[
{
"node": "Get row(s)2",
"type": "main",
"index": 0
}
]
]
},
"MESSAGE": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"MESSAGE1": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"MESSAGE2": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"EVERY DAY": {
"main": [
[
{
"node": "ANALYZE TIME ENTRIES",
"type": "main",
"index": 0
}
]
]
},
"Get row(s)": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"Insert row": {
"main": [
[
{
"node": "MESSAGE2",
"type": "main",
"index": 0
}
]
]
},
"EVERY MONTH": {
"main": [
[
{
"node": "ANALYZE ENTIRE MONTH",
"type": "main",
"index": 0
}
]
]
},
"Get row(s)2": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Update row(s)": {
"main": [
[
{
"node": "MESSAGE1",
"type": "main",
"index": 0
}
]
]
},
"Update row(s)1": {
"main": [
[
{
"node": "MESSAGE",
"type": "main",
"index": 0
}
]
]
},
"Message a model": {
"main": [
[
{
"node": "EMAIL TO MANAGEMENT",
"type": "main",
"index": 0
}
]
]
},
"Message a model1": {
"main": [
[
{
"node": "EMAIL TO EMPLOYEE",
"type": "main",
"index": 0
}
]
]
},
"Set Break Duration": {
"main": [
[
{
"node": "Update row(s)",
"type": "main",
"index": 0
}
]
]
},
"ANALYZE ENTIRE MONTH": {
"main": [
[
{
"node": "Message a model",
"type": "main",
"index": 0
}
]
]
},
"ANALYZE TIME ENTRIES": {
"main": [
[
{
"node": "Message a model1",
"type": "main",
"index": 0
}
]
]
},
"Webhook - Track Time": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow acts as an AI-powered smart time tracker for employees or personal use. It records work sessions via a webhook, logs start/end/break times into n8n Data Tables, and uses OpenAI to automatically summarize working patterns and send reminders or monthly reports via…
Source: https://n8n.io/workflows/10189/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Track your daily mood in one tap and receive automated AI summaries of your emotional trends every week and month. Perfect for self-reflection, wellness tracking, or personal analytics.
Eu Clara – Funil Kiwify Completo. Uses postgres, openAi, httpRequest, gmail. Webhook trigger; 70 nodes.
User Signup & Verification: The workflow starts when a user signs up. It generates a verification code and sends it via SMS using Twilio. Code Validation: The user replies with the code. The workflow
Instantly map all internal URLs, perform AI-powered (ChatGPT) analysis, and deliver results in HTML via webhook, Google Sheets, or email. All from your own n8n instance!
Watch on Youtube▶️