Limiting IFTTT applets to run every hour All questions

Sometimes you want an IFTTT applet to only run once every hour, but this can be tricky when there’s only one condition available in the applet. Paired with SEQUEmatic, you can limit your IFTTT to run only once per hour (or day or any other frequency you’d like)!

We’ve built a shared sequence to help get you started, so click this link and import it into your account. Then, we’ll take a look below at what this sequence does as well as the settings you need in IFTTT to make it work.

How the sequence works

Let’s run through the sequence step by step:


  1. The sequence is triggered by the IFTTT webhook service (you’ll need the URL from this trigger when setting up the IFTTT applet futher below)
  2. It checks the variable ran_within_hour and only continues if it is false (ie it didn’t run in the last hour)
  3. It then makes a call back to IFTTT via a webhook to trigger the rest of the IFTTT applet
  4. The variable ran_within_hour is set to true so that the condition in step 2 will fail if the applet fires again in the next hour
  5. It will pause for 1 hour (you can adjust this to any other duration you wish)
  6. Finally ran_within_hour is reset to false so that if the applet is triggered again the sequence can run

To get this running, you will need to create two IFTTT applets which are described below.

The IFTTT applets

You probably already have a working IFTTT applet and this is what you’re wanting to limit to once an hour. We’re going to break that applet into two separate applets, with the SEQUEmatic sequence in between.


The IF THIS applet

Your IF THIS applet can have any type of trigger. In this example we’re going to use the location applet when I enter a certain area. The important part here is the THEN THAT component which will use the webhook service to make a web request. When setting up the web request you only need to provide the URL. This should be copied from the trigger step in your SEQUEmatic sequence. Leave everything else with the default settings. You can view the full applet here.


The THEN THAT applet

You will need to create a second applet to take care of the THEN THAT component. Here the trigger should be the webhook service when it receives a web request. The event name should match the event name in step 3 of the sequence. In our example this was trigger_event. You can use any meaningful name here, as long as it matches in both IFTTT and SEQUEmatic.

For the action you can use any other IFTTT service – this would be the THEN THAT step from your original applet. I’m going to have it turn on my Philips Hue balcony light. You can view the full applet here.

Finishing up

That’s just about it. Be sure to enable both your IFTTT applets as well as the SEQUEmatic sequence. If you haven’t used IFTTT with your SEQUEmatic account before then you’ll also need to set up your IFTTT key in your account settings. You can read more about this here.

Finally, if you want to use this for multiple IFTTT applets, you will need to use a different variable name otherwise the sequences will interfere with one another. You can just duplicate your sequence, or import the template again, and modify the variable ran_within_hour in steps 2, 4 and 6 to any other variable name.

If you have any questions, post in the Q&A forum, leave a message in the comments below or contact me directly. Happy automating!

Asked by Derek on July 20, 2020, at 11:11am

Hello!

I hope you are well during this time.

Im really excited to use this service and this is a really helpful guide. I have set up both applets and put in my IFTTT ket but for some reason the second applet will not trigger no matter what I do. Pleas ecould you advise me on what steps i could take to get this to work?


Best,

Conor

Hi Conor. I can see you have two sequences set up. Which one are you having trouble with? Lights on when home seems to be running fine. Is it lights on with alarm that is causing problems?

Yes it was both causing problems but i managed to fix the lights on when home lsat night before i went to sleep. I cant see why the alarm one wouldnt work? As far as i can tell ive set it up the same way barring the varibale names and the time paused.

Can you clarify what you mean by not working? I can see in your sequence log that it has been running. Is the sequence not triggering from IFTTT? Or is there a step in the sequence which is not behaving as expected?

Hi sorry for not clarifying before. The sequence was not calling the IFTTT event. I managed to fix this by adding a step at the start of the sequence that just defines the variable as false. After testing once it worked and then of course I deleted the additional step as setting to false immediately makes the sequence useless but for some reason it continues to work after that! so it's all sorted now! thank you so much for your replies, I hope you have a great week!

Ah great, glad it's working. I'll take a closer look at this and might need to update the documentation so it's clear what will happen if a variable is checked when it doesn't exist.

In future, you can also create new variables on the variables page.

oh I see! this is my first time using the service but that makes a lot of sense, thank you so much!

Hi


Am I assuming that the URL is returning true or false depending on the run state ?

Secondly, my IFTTT key doesnt seem to be saving, despite hitting the save button.


Any help here would be apprecaited.

Thanks


Hi Kim. The URL won't actually return anything.  You need to feed the URL into your IFTTT applet so that when the applet fires it will trigger the SEQUEmatic sequence.  SEQUEmatic will check the ran_within_hour variable within your account.  The first time it runs, if the variable doesn't exist it will be created automatically.

Regarding your IFTTT key, I can see you've set it in the sequence itself which should work fine. For some reason there's a problem with the timezone setting on your account. Can you try setting that and then update your IFTTT key?

If you're still having trouble, send me an email with the location for your timezone and I can update this for you.

Hi

I worked on this all night before i saw Conor's comment about having to set the variable to "False" before the sequence would fire the Event Trigger back to IFTTT.  Recommend adding that to the setup instructions.  Thanks for laying this out.  I have been looking for a solution and this fits my needs perfectly!  

Hi, having trouble with it triggering ifttt on the second part. any suggestions?? ifttt doesn't receive the trigger from the automation here. i guess im not sure what to set to false from conner's comment

There is an answer pending moderator review

Post a reply

The SEQUEmatic bot is still new and learning. If you don't get the answer you need, just ask to speak with Derek and your chat will be transferred.