Skip to content

Instantly share code, notes, and snippets.

@kunxin-chor
Last active September 13, 2026 13:59
Show Gist options
  • Select an option

  • Save kunxin-chor/d147b9c95f938e902071aa21d69ed707 to your computer and use it in GitHub Desktop.

Select an option

Save kunxin-chor/d147b9c95f938e902071aa21d69ed707 to your computer and use it in GitHub Desktop.
Gym Booking Data Table Tool Nodes
{
"nodes": [
{
"parameters": {
"dataTableId": {
"__rl": true,
"value": "xFMcB8ef1Si7Q7h9",
"mode": "list",
"cachedResultName": "bookings",
"cachedResultUrl": "/projects/Qj0a9yaxbvygPGXA/datatables/xFMcB8ef1Si7Q7h9"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"class_id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('class_id', `The ID of the class`, 'string') }}",
"email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('email', `Email of the user`, 'string') }}",
"booking_id": "={{ $execution.id }}",
"status": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('status', `can be \"confirmed\", \"absent\" or \"cancelled\"`, 'string') }}"
},
"matchingColumns": [],
"schema": [
{
"id": "booking_id",
"displayName": "booking_id",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "email",
"displayName": "email",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "status",
"displayName": "status",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
},
{
"id": "class_id",
"displayName": "class_id",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"readOnly": false,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.dataTableTool",
"typeVersion": 1.1,
"position": [
952,
440
],
"id": "1d743960-2052-42a5-b274-b59b89c6bc99",
"name": "Book class"
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Given a start date and end date, return all classes",
"operation": "get",
"dataTableId": {
"__rl": true,
"value": "bQ6gw7aYA7Zeeb1U",
"mode": "list",
"cachedResultName": "classes",
"cachedResultUrl": "/projects/Qj0a9yaxbvygPGXA/datatables/bQ6gw7aYA7Zeeb1U"
},
"matchType": "allConditions",
"filters": {
"conditions": [
{
"keyName": "datetime",
"condition": "gte",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', `The date to start searching from (inclusive)`, 'string') }}"
},
{
"keyName": "datetime",
"condition": "lte",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions1_Value', `The date to stop searching at (inclusive)`, 'string') }}"
}
]
},
"returnAll": "="
},
"type": "n8n-nodes-base.dataTableTool",
"typeVersion": 1.1,
"position": [
1336,
440
],
"id": "9b210d02-8b2a-4795-b156-bfd7c01caf63",
"name": "Get Classes by Date Range",
"notesInFlow": false
},
{
"parameters": {
"operation": "get",
"dataTableId": {
"__rl": true,
"value": "tWBcikwfejH7a6vf",
"mode": "list",
"cachedResultName": "bookings",
"cachedResultUrl": "/projects/Qj0a9yaxbvygPGXA/datatables/tWBcikwfejH7a6vf"
},
"filters": {
"conditions": [
{
"keyName": "class_id",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', `The ID of the class`, 'string') }}"
}
]
}
},
"type": "n8n-nodes-base.dataTableTool",
"typeVersion": 1.1,
"position": [
1208,
440
],
"id": "a80cb141-11b8-474d-994c-c593a74ddd3d",
"name": "Get Bookings by Class ID"
},
{
"parameters": {
"descriptionType": "manual",
"toolDescription": "Given an email address, find all bookings made by it",
"operation": "get",
"dataTableId": {
"__rl": true,
"value": "tWBcikwfejH7a6vf",
"mode": "list",
"cachedResultName": "bookings",
"cachedResultUrl": "/projects/Qj0a9yaxbvygPGXA/datatables/tWBcikwfejH7a6vf"
},
"filters": {
"conditions": [
{
"keyName": "email",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', ``, 'string') }}"
}
]
}
},
"type": "n8n-nodes-base.dataTableTool",
"typeVersion": 1.1,
"position": [
1080,
440
],
"id": "dfe46396-a928-40fa-89f0-d17a5c067c85",
"name": "Get Bookings by Email"
},
{
"parameters": {
"operation": "deleteRows",
"dataTableId": {
"__rl": true,
"value": "tWBcikwfejH7a6vf",
"mode": "list",
"cachedResultName": "bookings",
"cachedResultUrl": "/projects/Qj0a9yaxbvygPGXA/datatables/tWBcikwfejH7a6vf"
},
"matchType": "allConditions",
"filters": {
"conditions": [
{
"keyName": "booking_id",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', ``, 'string') }}"
},
{
"keyName": "email",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions1_Value', ``, 'string') }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.dataTableTool",
"typeVersion": 1.1,
"position": [
1464,
440
],
"id": "ad8cbfb4-2064-4f4b-b5e0-baa696915144",
"name": "Delete booking by booking_id and email"
},
{
"parameters": {
"description": "Call this tool to get the current date and time. Use this tool if the user uses a subjective date or time, such as \"today\", \"tomorrow\" or \"this month\" to get a reference date.",
"jsCode": "const now = new Date();\n\nreturn JSON.stringify({\n current_datetime: now.toISOString(),\n current_timestamp: now.getTime(),\n timezone: \"UTC\"\n});"
},
"type": "@n8n/n8n-nodes-langchain.toolCode",
"typeVersion": 1.3,
"position": [
1592,
440
],
"id": "9e9251e6-1bed-4ba2-be5b-e77fbec96bc8",
"name": "Get Current Date and Time"
},
{
"parameters": {
"operation": "get",
"dataTableId": {
"__rl": true,
"value": "bQ6gw7aYA7Zeeb1U",
"mode": "list",
"cachedResultName": "classes",
"cachedResultUrl": "/projects/Qj0a9yaxbvygPGXA/datatables/bQ6gw7aYA7Zeeb1U"
},
"filters": {
"conditions": [
{
"keyName": "name",
"condition": "ilike",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', ``, 'string') }}"
}
]
}
},
"type": "n8n-nodes-base.dataTableTool",
"typeVersion": 1.1,
"position": [
1720,
440
],
"id": "a444564a-2101-4e82-b8e0-fdc2b5f5da1e",
"name": "Get Class by Class Name"
},
{
"parameters": {
"operation": "get",
"dataTableId": {
"__rl": true,
"value": "bQ6gw7aYA7Zeeb1U",
"mode": "list",
"cachedResultName": "classes",
"cachedResultUrl": "/projects/Qj0a9yaxbvygPGXA/datatables/bQ6gw7aYA7Zeeb1U"
},
"filters": {
"conditions": [
{
"keyName": "name",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions0_Value', ``, 'string') }}"
},
{
"keyName": "desc",
"condition": "ilike",
"keyValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('conditions1_Value', ``, 'string') }}"
}
]
},
"returnAll": true
},
"type": "n8n-nodes-base.dataTableTool",
"typeVersion": 1.1,
"position": [
1848,
440
],
"id": "0c4e6513-a25e-47bb-a8ae-1b6fff9131c3",
"name": "Get Class By Name Or Description"
}
],
"connections": {
"Book class": {
"ai_tool": [
[]
]
},
"Get Classes by Date Range": {
"ai_tool": [
[]
]
},
"Get Bookings by Class ID": {
"ai_tool": [
[]
]
},
"Get Bookings by Email": {
"ai_tool": [
[]
]
},
"Delete booking by booking_id and email": {
"ai_tool": [
[]
]
},
"Get Current Date and Time": {
"ai_tool": [
[]
]
},
"Get Class by Class Name": {
"ai_tool": [
[]
]
},
"Get Class By Name Or Description": {
"ai_tool": [
[]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "068efba74d43791014e18af24f41db35d308b24a1c4e7463a7242dc358721574"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment