Yes! With IFTTT Pro+ you can add a filter code to only run actions when certain conditions are met. This article uses the same ideas as Can I make my Applets run only at certain times?, so you can refer to it for a more in-depth how to.
When you have an Applet with a trigger and at least one action, you can add filter code to it. If you want your actions to run on weekdays, you can use the code below.
let day = Meta.currentUserTime.day()
if (day === 0 || day === 6) {
// Add the action you want to skip inside these curly braces
}
Below the filter code editor, you will find a list of commands to skip actions you added to your Applet. Copy the one that ends with .skip()
and insert it between the curly braces ( { }
) in the above code.
For example, the skip code for the Twitter - Post a tweet action is Twitter.postNewTweet.skip()
.
To skip this action on weekends, use the following code:
let day = Meta.currentUserTime.day()
if (day === 0 || day === 6) {
Twitter.postNewTweet.skip()
}
If you have more than one action, and want to skip them all, you can insert each command on a new line before the closing curly brace ( }
).
The IF condition in this code checks if the current day is 0 (Sunday) or 6 (Saturday) and skips the action if the condition is true.
To reverse the logic and only run the action on weekends, the code can be slightly modified:
let day = Meta.currentUserTime.day()
if (day > 0 && day < 6) {
// Add the action you want to skip inside these curly braces
}