All challenges

Challenge 20

Plan Your Long Weekends

Fill in a country and a year, and get back a calendar file with every long weekendA weekend made longer by a public holiday next to it, sometimes only if you take one day off in between. – and which single days off create them.

BeginnerComplexity:Time: 25–35 min

Your task

Show me next year's public holidays in my country and which single days off turn them into the longest breaks. Put them in my calendar.

Your bonus task

Leave out the breaks that fall inside the school holidays, when everywhere is busy and prices go up.

Example use cases

  • Anyone planning next year's days off in January, when the good dates are still free.
  • A team lead who wants to see when half the office will obviously be away.
  • Any form that answers with a file instead of a thank-you page – a ticket, a receipt or a report.

Before you start

  1. 01

    Sign up for n8n Cloud or open your n8n workspace. No other account is needed.

  2. 02

    Public holidays come from the free Nager.Date API, which needs no key. Its LongWeekend endpoint does the hard part for you: give it a year and a two-letter country code and it returns each long weekend with the bridge days it needs.

  3. 03

    School holidays for the bonus come from the free OpenHolidays API, also without a key. It covers EU countries only, so pick one of those to test the bonus.

  4. 04

    A warning for Ukrainian examples: under martial law public holidays are not days off in Ukraine, so use another country when you demonstrate this one.

  5. 05

    Nothing is sent anywhere. The result comes back in the browser as a file you can open.

What the workflow must do

  1. 01

    Submitting the form with a country and a year returns a calendar file, not a plain thank-you page, and opening it adds the breaks to a calendar.

  2. 02

    Each event says how many days off it gives and whether a bridge dayThe single working day between a public holiday and the weekend. Taking it off turns three days into four or five. is needed, and the longest breaks come first.

  3. 03

    The same form works for several countries: 2027 gives 10 long weekends in the United States, 2 of which need a bridge dayThe single working day between a public holiday and the weekend. Taking it off turns three days into four or five., and 4 in Germany, 1 of which needs one. Bonus: breaks overlapping the school holidays are gone.

Solution

See the workflow challenge answer

Reveal the completed workflow only when you are ready to compare it with your own.

Submit as solved

Ready to submit?

Submit when your team has a working workflow to demonstrate.

Solution

Reveal the workflow solution?

This will show the completed workflow for this challenge. Are you sure you want to continue?

Mentor review

Find a mentor and ask them to review.

Show them your working workflow. Once they approve it, collect the balloon for this challenge.