n8n
Workflow
Get Today S Date And Day Using The Function Node
This n8n workflow retrieves tasks and integrates with various services. Get Today S Date And Day Using The Function Node - ready to import and run in your n8n instance.
n8n
workflow.json
About This Script
This n8n workflow retrieves tasks and integrates with various services. Get Today S Date And Day Using The Function Node - ready to import and run in your n8n instance.
Features:
- Custom JavaScript function processing
- Retrieves data from external sources
Source Code
{
"nodes": [
{
"name": "On clicking 'execute'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
250,
300
],
"parameters": [],
"typeVersion": 1,
"id": "d3121aac-31f2-412c-8f3e-d86895f47bcb"
},
{
"name": "Function",
"type": "n8n-nodes-base.function",
"position": [
450,
300
],
"parameters": {
"functionCode": "var date = new Date().toISOString();\nvar day = new Date().getDay();\nconst weekday = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\n\nitems[0].json.date_today = date;\nitems[0].json.day_today = weekday[day];\n\nreturn items;"
},
"typeVersion": 1,
"id": "77de9f80-e3c2-48da-8757-4268c833a509"
}
],
"connections": {
"On clicking 'execute'": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
}
},
"n8n_version": "1.5.0"
}
Requirements
n8n instance, API credentials for connected services
Tags
#n8n
#automation
#workflow