IFTTT filters

IFTTT have updated their maker service, adding filters. https://platform.ifttt.com/docs/maker_guide

As a Maker, you’ll be able to build multi-action Applets, use filter code to transform them, and publish your Applets for others to use.

Filter
We could title, save, and publish this Applet now — it’s good to go. As-is, it would save new RSS items to our Feedly and send us a notification. But we’re going to make it a little more interesting by adding some filter code.

In this case, we’re going to use some code that checks the time and then either sends a notification or saves the publication to Feedly. The syntax would look something like this:

var timeOfDay = Meta.currentUserTime.hour()

if (timeOfDay > 22 || timeOfDay < 8) {
  IfNotifications.sendNotification.skip("Too late")
} else {
  Feedly.createNewEntryFeedly.skip("I already know")
}

First we use Meta.currentUserTime to get the current time in the user’s timezone. Then we call hour() to get just the hour as an integer between 0 and 23, then we assign that to a variable called timeOfDay.

Our logic is as follows: we check timeOfDay to see if it’s less than 8 or greater than 22. When either of those are true then we want to skip() the IfNotifications.sendNotification and save the article to Feedly.createNewEntryFeedly instead.

@robmarkcole Hey do you happen to know how to change the time to something like 22:30 instead 22:00. I have no clue on how to include the minutes.

I don’t know any JavaScript, but would try 22.5

or ‘22:30’ like in templates etc…

Templates use Jinja not JavaScript

That doesn’t preclude that from being the correct syntax. We are both just guessing here and giving an option to try!