Skip to content

Instantly share code, notes, and snippets.

@architjn
Created June 28, 2025 13:26
Show Gist options
  • Save architjn/8c7e7135a35365dc906bb1705eea64fd to your computer and use it in GitHub Desktop.
Save architjn/8c7e7135a35365dc906bb1705eea64fd to your computer and use it in GitHub Desktop.
{
"name": "Time",
"nodes": [
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
0,
0
],
"id": "fc1a748d-b28b-4486-95fc-10849e49e0d0",
"name": "When chat message received",
"webhookId": "e263692c-e403-4aa6-a6b4-6bd99c3bcfe1"
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
220,
0
],
"id": "352c24de-06cd-4717-85e4-bec5b12a974f",
"name": "AI Agent"
},
{
"parameters": {
"model": "openai/gpt-4.1-nano",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
140,
220
],
"id": "fa282efb-de8f-4a6b-84b6-823ae1e23270",
"name": "OpenRouter Chat Model",
"credentials": {
"openRouterApi": {
"id": "CGW0UD2Uwkzjnlyv",
"name": "OpenRouter account"
}
}
},
{
"parameters": {
"description": "Call this tool to get the current date and time. This tool accepts timezones in the IANA Time Zone Database format.",
"jsCode": "function getCurrentTimeDate(timezone) {\n const date = new Date();\n const options = {\n timeZone: timezone,\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false\n };\n const formatter = new Intl.DateTimeFormat('en-US', options);\n const formattedDate = formatter.format(date);\n return formattedDate;\n}\n\nreturn getCurrentTimeDate(query.timezone) ;",
"specifyInputSchema": true,
"jsonSchemaExample": "{\n\t\"timezone\": \"IANA Time Zone format timezone\"\n}"
},
"type": "@n8n/n8n-nodes-langchain.toolCode",
"typeVersion": 1.3,
"position": [
480,
220
],
"id": "2980f1c3-27af-4ab1-937d-006c464efca9",
"name": "Current Date & Time"
},
{
"parameters": {
"content": "## Very Simple & Important Tool",
"height": 580,
"width": 940,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-140
],
"typeVersion": 1,
"id": "a8c68582-7d31-4759-947b-e42017c805be",
"name": "Sticky Note"
}
],
"pinData": {},
"connections": {
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Current Date & Time": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "1f11c1ab-cb9d-459b-a41e-44ffb7581202",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9"
},
"id": "1O2Rp9GCVSccDLXI",
"tags": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment