0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions108

Overview

The "Date & Time" resource with the "Holidays" operation in this node allows users to retrieve holiday information for a specified year and country, optionally filtered by state. This is useful for workflows that need to account for public holidays, such as scheduling tasks, sending notifications, or adjusting business logic based on local holidays.

For example, a user might want to:

  • Automatically skip sending marketing emails on public holidays.
  • Adjust delivery schedules around national holidays.
  • Generate reports that exclude holidays from working days calculations.

Properties

Name Meaning
Year The year for which to retrieve holiday data (e.g., "2024").
Country Code The two-letter country code representing the country to get holidays from (e.g., "DE" for Germany).
State Optional: The state or region code within the country to further filter holidays (e.g., "BW").
Code Variables A collection of code variables defined in the code editor, allowing dynamic values to be passed. Each variable has:
- Variable Name or ID: Selectable from predefined variables or specified via expression.
- Value: The value assigned to the variable.

Output

The node outputs an array of JSON objects representing the holidays for the specified year and location. Each object typically contains details about a holiday, such as its name, date, and possibly other metadata depending on the external service's response.

If multiple input items are processed, the output will be a combined array of all results.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authentication with the external "0CodeKit" service.
  • The node makes HTTP POST requests to the endpoint path dateandtime/holidays with parameters including year, country code, and optional state.
  • No additional environment variables or configurations are explicitly required beyond the API key credential.

Troubleshooting

  • Common issues:

    • Invalid or missing country codes may result in errors or empty holiday lists.
    • Providing an invalid year format could cause the request to fail.
    • If the API key credential is not configured or invalid, authentication errors will occur.
    • Network connectivity issues can prevent successful API calls.
  • Error messages:

    • Authentication failures: Ensure the API key credential is correctly set up.
    • Validation errors: Check that the year is a valid string representing a year and that the country code matches expected ISO standards.
    • Empty results: Verify if the specified state code is correct or try omitting it to get country-wide holidays.

Links and References

  • n8n Expressions Documentation — For using expressions in variable fields.
  • External API documentation for the "0CodeKit" service (not publicly linked here) would provide detailed info on holiday data structure and supported countries/states.

Discussion