Español

Lee este artículo en español.

Business Days in n8n: Add Working Days and Skip Public Holidays

Sooner or later a workflow needs a date that respects working days: an invoice due 10 business days after it is issued, a delivery promised in 3 working days, a reminder that must not go out on a public holiday, a report that should only run when the office is open. Adding days is easy. Skipping weekends and public holidays, in the right country, is the hard part.

One thing up front, because people search for it: n8n has no node for business days or public holidays. The Date & Time node offers seven operations: Add to a Date, Extract Part of a Date, Format a Date, Get Current Date, Get Time Between Dates, Round a Date and Subtract From a Date (n8n docs). Adding 10 days with it counts every Saturday, Sunday and holiday, and we found no other built-in node that adds working days or looks up public holidays (checked in n8n's source code on 19 October 2026). The usual way is to ask an API that knows the calendar: an HTTP Request node, which is what this guide does with the Cofferdock API.

What you get

One endpoint with four actions. You send the country (a two-letter code such as ES, US, GB or MX) and, if you want the holidays of a state or region, its code:

The calculation runs on Cofferdock's own servers with the holiday data built in. It calls no third-party service, so it answers in milliseconds.

What you need

Step by step: add business days to a date

{ "country": "ES", "date": "2026-12-23", "days": 5 }

The answer includes the date you want in result:

{ "success": true, "action": "add", "country": "ES", "date": "2026-12-23", "days": 5,
  "result": "2026-12-31", "result_weekday": "Thursday",
  "skipped": { "weekend_days": 2, "holidays": [ { "date": "2026-12-25", "name": "Christmas Day", "type": "public" } ] } }

Five business days after 23 December 2026 in Spain is 31 December, because it skipped the weekend and Christmas Day. The skipped field tells you what it jumped over, which is handy to explain a date to a customer.

Example 1: invoice due 10 business days after it is issued

  1. A trigger with the invoice data (a webhook from your store, a new row in Google Sheets).
  2. An HTTP Request node as above, with the JSON field in Expression mode so it can use values from the previous node:
{ "country": "ES", "region": "CT", "date": "{{ $json.invoice_date }}", "days": 10 }
  1. A next node that uses {{ $json.result }} as the due date: in the invoice PDF, in an email or in your accounting tool.

If invoice_date comes with a time (2026-12-23T18:00:00Z) it works too: only the date part is used, exactly as written, with no time-zone conversion.

Example 2: run only on working days

  1. A Schedule Trigger every morning.
  2. An HTTP Request node with the body { "country": "US", "date": "{{ $now.toFormat('yyyy-LL-dd') }}" } (the action is deduced: with only a date, it is check).
  3. An IF node on {{ $json.is_business_day }}: the true branch continues with your daily report; the false branch ends the run on weekends and holidays.

Remember that $now uses the time zone of your n8n workflow.

Example 3: how many working days did it take?

With { "country": "GB", "region": "ENG", "from": "2026-04-01", "to": "2026-04-30" } you get business_days, weekend_days and holiday_days, plus the holidays that fell on working days in that range. Both dates are counted.

Make it match your company

OptionWhat it does
regionThe code of a state, province or autonomous community to add its regional holidays, for example CT (Catalonia) or MD (Madrid) for Spain. A wrong code returns an error listing the valid ones.
weekendYour own working week, for example ["fri","sat"]. Default: Saturday and Sunday, or Friday and Saturday in 16 countries such as Saudi Arabia, Egypt or Israel. The response says which weekend it used.
extra_holidaysUp to 100 more dates that count as non-working days: your company's closing days, or a one-off holiday the data doesn't have.
typesWhich holiday types count. Default ["public"]; you can add bank, school, observance or optional.
languageThe language of the holiday names, for example es.

How reliable are the holidays?

The holidays come from an open dataset maintained by the community (date-holidays, under the CC BY-SA 3.0 license) that covers 207 countries and territories. We checked the 2026 national lists of Spain, England and the United States against the official sources (Spain's BOE, gov.uk and the US Office of Personnel Management) and they match on every holiday that falls on a weekday. Quality varies from country to country, and a one-off holiday announced late can be missing: Scotland's 15 June 2026 bank holiday for the World Cup is in gov.uk's list but not in the dataset. That is what extra_holidays is for. For legal deadlines, payroll or contracts, confirm the date with the official source.

Common errors and how to fix them

What you seeWhyFix
400 Unknown country "XX"The country is not a two-letter code that we support.Use ES, US, GB, MX... The full list is on the tool page.
400 Unknown region "ZZ" for ESThe region code doesn't exist for that country.The error lists the valid codes.
400 Invalid "date"The date isn't YYYY-MM-DD or is impossible (30 February).Check the expression that builds the date.
400 "days" must be a whole numberdays is empty, a decimal or too big.A whole number from -3650 to 3650.
401 Missing x-api-key / Invalid API keyThe header is missing, misspelled or the key was revoked.Header name exactly x-api-key.
429 Too many requests or Monthly limit reachedPer-minute limit of your plan, or no credits left this month.Add a Wait node in big loops, or upgrade / buy extra credits.

None of the 400 errors is charged.

Prefer to see it in code?

curl -X POST "https://api.cofferdock.com/business-days" \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "country": "ES", "date": "2026-12-23", "days": 5 }'

How much does it cost?

Each call uses 1 credit, whatever the action. To save credits in a loop, ask once for what you need: one list call returns every holiday of a year, and one between call counts a whole range. Every Cofferdock tool draws from the same credit pool.

FAQ

Does n8n have a native node for business days or holidays? No. The Date & Time node can add and subtract time, but it doesn't know about weekends or public holidays. You do it with the HTTP Request node calling the Cofferdock API.

Does it work for my country? It covers 207 countries and territories. Check the list on the tool page, and the regions with the error message of a wrong region.

What if my company works on Saturdays, or closes on its anniversary? Use weekend for your working week and extra_holidays for your own closing days.

Does it call another service every time? No. The holidays are built into our server, so there is no third party to be down or to slow you down.

Related guides

Full reference with every option: Business days and holidays API. No account yet? Create one for free and calculate your first due date today.