Last active
May 7, 2025 01:00
-
-
Save defmans7/f6f64876efdc84788b27c6e8bb19cb7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "n8n dateTime strategy", | |
"nodes": [ | |
{ | |
"parameters": {}, | |
"type": "n8n-nodes-base.manualTrigger", | |
"typeVersion": 1, | |
"position": [ | |
0, | |
0 | |
], | |
"id": "3fd56977-4f37-4824-a125-ede8e50ba305", | |
"name": "When clicking ‘Test workflow’" | |
}, | |
{ | |
"parameters": { | |
"options": { | |
"timezone": "Australia/Brisbane" | |
} | |
}, | |
"type": "n8n-nodes-base.dateTime", | |
"typeVersion": 2, | |
"position": [ | |
220, | |
0 | |
], | |
"id": "d58318cf-02ec-4168-a7f5-e5139809c997", | |
"name": "Create Date & Time" | |
}, | |
{ | |
"parameters": { | |
"assignments": { | |
"assignments": [ | |
{ | |
"id": "620479c1-2b59-4040-acc7-d21c1f14576d", | |
"name": "correctDateTime", | |
"value": "={{ $json.currentDate.toDateTime() }}", | |
"type": "string" | |
}, | |
{ | |
"id": "e6489a8b-56fd-4f46-8411-9f475c9478a8", | |
"name": "plusTwoHours", | |
"value": "={{ $json.currentDate.toDateTime().plus(2,'hours') }}", | |
"type": "string" | |
}, | |
{ | |
"id": "1e3603c3-b07f-4c7b-acd4-c8f94ced8c11", | |
"name": "split_date_time", | |
"value": "={{ $json.currentDate.toDateTime().format('yyyy-MM-dd') }} {{ $json.currentDate.toDateTime().format('T a') }} ", | |
"type": "string" | |
} | |
] | |
}, | |
"options": {} | |
}, | |
"type": "n8n-nodes-base.set", | |
"typeVersion": 3.4, | |
"position": [ | |
440, | |
0 | |
], | |
"id": "54ab2caa-1f58-465b-b485-f4e7776dc9bc", | |
"name": "Set Fields" | |
} | |
], | |
"pinData": {}, | |
"connections": { | |
"When clicking ‘Test workflow’": { | |
"main": [ | |
[ | |
{ | |
"node": "Create Date & Time", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
}, | |
"Create Date & Time": { | |
"main": [ | |
[ | |
{ | |
"node": "Set Fields", | |
"type": "main", | |
"index": 0 | |
} | |
] | |
] | |
} | |
}, | |
"active": false, | |
"settings": { | |
"executionOrder": "v1" | |
}, | |
"versionId": "26b9a539-1238-4463-9604-8ad4d1e440f8", | |
"meta": { | |
"instanceId": "12aa4b47b8cf3d835676e10b2bf760a80a1ff52932c9898603f7b21fc5376f59" | |
}, | |
"id": "P34BghTYKPhYPg6v", | |
"tags": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment