Effortlessly Get Today's Date and Day with n8n
detail.loadingPreview
Unlock the power of real-time date and day information within your n8n workflows. This simple yet effective workflow leverages the Function node to dynamically capture and format the current date and day of the week.
About This Workflow
This n8n workflow demonstrates a fundamental yet powerful use case: retrieving and processing current date and time information. At its core, it utilizes the versatile 'Function' node, allowing you to inject custom JavaScript logic directly into your automation. By triggering the workflow manually, you can instantly capture the current date in ISO format and the current day of the week as a human-readable string. This foundational capability is crucial for a myriad of automated processes that require time-sensitive data, from scheduling and logging to conditional logic based on the day.
Key Features
- Dynamically retrieve the current date in ISO 8601 format.
- Get the current day of the week as a text string (e.g., 'Monday').
- Utilize custom JavaScript within the n8n Function node.
- Simple manual trigger for immediate execution.
How To Use
- Add a 'Manual Trigger' node to your n8n canvas.
- Add a 'Function' node and connect it to the 'Manual Trigger'.
- In the 'Function' node's 'Function Code' parameter, paste the provided JavaScript:
var date = new Date().toISOString(); var day = new Date().getDay(); const weekday = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; items[0].json.date_today = date; items[0].json.day_today = weekday[day]; return items; - Execute the workflow by clicking the 'Execute' button on the 'Manual Trigger' node.
- Check the output of the 'Function' node to see the 'date_today' and 'day_today' fields.
Apps Used
Workflow JSON
{
"id": "6c545ec4-cc96-4c42-afa3-19e24b1f1b23",
"name": "Effortlessly Get Today's Date and Day with n8n",
"nodes": 13,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 6c545ec4-cc96...
About the Author
Crypto_Watcher
Web3 Developer
Automated trading bots and blockchain monitoring workflows.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.