Quick overview
This workflow runs daily (or as a sub-workflow) and checks whether a given date is a business day by combining weekday rules with public-holiday data from the Nager.Date API, then routes execution to a “continue” or “stop” branch.
How it works
- Triggers every day at 7am, runs manually, or is called by another workflow with optional override inputs.
- Loads gate settings like country code, subdivision/region, timezone, working days, and an optional check date.
- Calculates the date to evaluate and requests public holidays for the current year and next year from the Nager.Date (nagerholidays.com) API.
- Determines whether the checked date is a business day based on working weekdays, matching national or subdivision holidays, and any custom closed/ignored dates, with a configurable fallback policy if holiday data is unavailable.
- Calculates the next business day (up to 31 days ahead) and outputs decision details like reason, holiday name, and warning messages.
- Routes execution to a “Continue: business day” path when it is a business day, or to a “Stop: not a business day” path otherwise.
Setup
- Update the gate defaults in the Set gate config step, including countryCode, subdivisionCode (optional), timezone, workingDays, and optional holidayTypes.
- (Optional) Set extraClosedDates, ignoreHolidayDates, and onHolidayDataFailure to match your business rules and desired behavior when the Nager.Date API is unavailable.
- Replace the “Continue: business day” branch with your real scheduled task, or call this workflow from another workflow and pass overrides (for example, checkDate and countryCode).