1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

datetime → Check if Date is a Holiday

AI-generated

Overview

The "Check if Date is a Holiday" operation in the datetime resource of the 1001fx n8n node allows you to determine whether a specific date is a public holiday in a given country (and optionally, state). This can be useful for automating workflows that depend on business days, scheduling, or sending notifications based on holidays.

Practical examples:

  • Automatically skip sending marketing emails on national holidays.
  • Adjust workflow schedules to avoid running tasks on non-working days.
  • Validate user input or bookings against local holidays.

Properties

Name Meaning
Date The date to check. Supported formats include:
- DD.MM.YYYY
- DD.MM.YY
- DD.MM.YYYY HH:mm
- DD.MM.YY HH:mm
- MM-DD-YYYY
- MM-DD-YYYY HH:mm
- MM-DD-YY
- MM-DD-YY HH:mm
Country 2-character country code (e.g., "US", "DE") or full country name without whitespaces (e.g., "UnitedStates", "Germany"). Extensive list of supported countries and codes.
state State code (optional). Used for countries where holidays may vary by state/region.

Output

The output will be a JSON object indicating whether the provided date is a holiday in the specified country (and state, if provided). The exact structure depends on the API response, but typically includes fields such as:

{
  "isHoliday": true,
  "date": "2024-12-25",
  "holidayName": "Christmas Day",
  "country": "US",
  "state": "CA"
}

If the date is not a holiday, "isHoliday" will be false, and other fields may be empty or omitted.

Dependencies

  • External Service: Requires access to the 1001fx API.
  • API Key: You must configure the 1001fxApi credential in n8n.
  • Environment: No special environment variables are required beyond standard n8n setup.

Troubleshooting

Common issues:

  • Invalid date format: Ensure your date matches one of the supported formats. Incorrect formats may result in errors or unexpected results.
  • Unsupported country/state: If an invalid or unsupported country/state code is used, the node may return an error or no results.
  • Missing credentials: If the 1001fxApi credential is not set up, the node will fail to connect to the API.

Error messages and resolutions:

  • "error": "Invalid date format" — Check and correct the date input format.
  • "error": "Country not supported" — Use a valid country code or name from the options list.
  • "error": "Authentication failed" — Ensure your API key is correctly configured in n8n.

Links and References

Discussion