Skip Predetermined Holidays

I have a few automations that should NOT run in the event of a holiday. What is the best approach? I can make a predetermined list of holidays, let’s say on Google Sheets, and I imagine adding it into the make workflow at the very beginning. I searched the existing community topics, but I have not found anything. Please let me know the best and easiest approach to achieve this. Currently, my automations are set up to run Mon-Fri, just looking to skip a few days throughout the year when a holiday is on a weekday. Thanks!

Hey there,

your approach sounds about right. You can use the internal make data store as well. Add the holiday dates inside and have the scenario only proceed if it cant match a date to what is inside the data store.

You can get a list of holidays from this API on RapidAPI hefesto-technologies-hefesto-technologies-default/api/public-holidays7.

Then, you can create a filter like this:

Module Export - quick import into your scenario

You can copy and paste this module export into your scenario. This will import the modules (with fields/settings/filters) shown in my screenshots above.

  1. Move your mouse over the line of code below. Copy the JSON by clicking the copy button on the right of the code, which looks like this:

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the editor.

  3. Click on each imported module and re-save it for validation. There may be some errors prompting you to remap some variables and connections.

JSON module export — paste this directly in your scenario

{"subflows":[{"flow":[{"id":1,"module":"http:ActionSendDataAPIKeyAuth","version":3,"parameters":{"auth":5269,"handleErrors":false,"useNewZLibDeCompress":true},"mapper":{"ca":"","qs":[],"url":"https://public-holidays7.p.rapidapi.com/{{formatDate(now; \"YYYY\")}}/AU","gzip":true,"method":"get","headers":[{"name":"X-RapidAPI-Host","value":"public-holidays7.p.rapidapi.com"}],"timeout":"","useMtls":false,"bodyType":"","serializeUrl":false,"shareCookies":false,"parseResponse":true,"followRedirect":true,"useQuerystring":false,"followAllRedirects":false,"rejectUnauthorized":true},"metadata":{"designer":{"x":0,"y":150,"name":"This Year's Public Holidays"},"parameters":[{"name":"auth","type":"keychain:apikeyauth","label":"Credentials","required":true},{"name":"handleErrors","type":"boolean","label":"Evaluate all states as errors (except for 2xx and 3xx )","required":true},{"name":"useNewZLibDeCompress","type":"hidden"}]}},{"id":3,"module":"builtin:BasicRouter","version":1,"parameters":{"else":1},"mapper":null,"metadata":{"designer":{"x":300,"y":150}},"routes":[{"flow":[{"id":4,"module":"util:SetVariable2","version":1,"parameters":{},"filter":{"name":"PH","conditions":[[{"a":"{{first(map(1.data; \"date\"; \"date\"; formatDate(now; \"YYYY-MM-DD\")))}}","o":"exist"}]]},"mapper":{"name":"text","scope":"roundtrip","value":"{{formatDate(now; \"YYYY-MM-DD\")}} is not a public holiday!"},"metadata":{"designer":{"x":600,"y":0}}}]},{"flow":[{"id":2,"module":"util:SetVariable2","version":1,"parameters":{},"filter":{"name":"Not PH","conditions":[[{"a":"{{first(map(1.data; \"date\"; \"date\"; formatDate(now; \"YYYY-MM-DD\")))}}","o":"notexist"}]]},"mapper":{"name":"text","scope":"roundtrip","value":"{{formatDate(now; \"YYYY-MM-DD\")}} is not a public holiday!"},"metadata":{"designer":{"x":600,"y":300}}}]}]}]}],"metadata":{"version":1}}

Note: Did you know you can reduce the size of blueprints and module export code like the above, using the Make Blueprint Scrubber?

How to call an API on RapidAPI

Use the HTTP “Make an API Key Auth Request” module.

Create a new keychain connection and insert your RapidAPI API Key.

Key: <YOUR_RAPIDAPI_KEY>
API Key parameter name: X-RapidAPI-Key

You can reuse this RapidAPI keychain for all API calls to RapidAPI – you’ll just need to change the X-RapidAPI-Host value based on the API you are calling.

Hope this helps! Let me know if there are any further questions or issues.

@samliew