Overview
This node checks if the current day matches specified days of the week and optionally if it falls within certain weeks of the month. It is useful for workflows that need to trigger or branch based on the day, such as scheduling tasks only on specific weekdays or particular weeks (e.g., first Monday or last Friday of the month).
Practical examples:
- Triggering a report generation only on Mondays and Wednesdays.
- Running a cleanup task on the last Friday of each month.
- Sending reminders on the first and third Tuesdays.
Properties
Name | Meaning |
---|---|
Days | The days of the week to monitor. Options: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday. |
Week | The week(s) of the month to monitor. Options: First, Second, Third, Fourth, Last. |
Output
The node outputs an array with one item per input item. Each output item contains a JSON object with two fields:
matched
(boolean): Indicates whether the current date matches the selected days and weeks criteria.day
(number): The numeric representation of the current day of the week (0 = Sunday, 1 = Monday, ..., 6 = Saturday).
Example output JSON:
{
"matched": true,
"day": 1
}
This means the current day is Monday and it matched the configured criteria.
Dependencies
No external services or API keys are required. The node relies solely on the system date/time.
Troubleshooting
- No matches found: If the node always outputs
"matched": false
, verify that the selected days and weeks include the current date. Remember that if no weeks are selected, the node will only check the day of the week. - Empty selections: If both "Days" and "Week" properties are left empty, the node will never match any date.
- Time zone considerations: The node uses the system's local date/time. If your workflow depends on a specific time zone, ensure the n8n server's time zone matches your expectations.