Connect IFTTT with Node-RED

Table of Contents
Connect IFTTT with Node-RED

Thanks to IFTTT you can connect the Playground and various apps you use. And that’s really cool. Learn how to do it.

What is IFTTT?

This stands for If This, Then That. IFTTT is an online service that links action and reaction. So when something happens, something else reacts automatically right away. And it’s you who decides about all these things when you programme them.

As a bonus, IFTTT connects programmes and apps. 👌 For example, you can set up sending text messages at a certain time of the day, reminders of starred emails in your mailbox, get notifications about new tweets of a girl or a boy who you secretly admire, and so on. Amazing! 🤡

You can create your own IFTTT through a special interface, which you simply connect to the Playground.

How do you introduce IFTTT to the Playground? Try it on the example of a smart doorbell.

  1. Register at Fortunately, this service is free. 🤑 Here, you will start using something called Applet. Applet is the name for the set reaction to an action. To create a new Applet, click on Create under your icon.

IFTTT registration

  1. A page with large text IF THIS THEN THAT will come up. Click on THIS.

IFTTT and playground

  1. Lots of options will pop up on you. Select WebHooks. With the Webhooks service, you can create your own IFTTT projects that connect the Playground with various online apps.

WebHooks and IFTTT

You have to click on Connect, Receive and web request buttons, respectively.

Then you can name the Event. Go crazy there, but don’t forget the name of the Event. 👀 This name will be important when connecting to your mobile and the Playground later.

IFTTP connection with playground

Then confirm the name with the Create trigger button. 🙌

  1. Now click on THAT.

IFTTT and playground

Choose what should happen as a reaction to an action. For now, we’ll set up notifications. So go find Notifications

IFTTT notification

… and confirm them clicking on Connect and Send a notification from the IFTTT app buttons, respectively.

You will now create the contents of the notification. In the next field, type what you want the notification to tell you. And because you are creating a smart doorbell 🔔, you will need a message like this: Somebody’s at the door {{OccurredAt}}

IFTTT notification

Curly brackets is a variable that will send you information when the button was pressed. So keep them there.

Our tip: For further experiments, you can use the Add ingredient button to set various other variables.

Is your message ready? Confirm it with the Create Action button.

IFTTT in playground

  1. Go to the Finish line! 👇

IFTTT in playground

Do you see “Connected”? You are there! 👍

IFTTT in playground

  1. But that’s not all, the connection must also be tested. Click on the Webhoooks icon.

IFTTT in playground

  1. Select Documentation at the top right…

IFTTT in playground

… and you get to a page with lots of text. But don’t get scared. 😱

Click on the Event field and rewrite it to the name of your event, as you entered it before. In this case it will be _zmacknutetlacitko. Thanks to this, everything becomes identified and interconnected.

IFTTT in playground

  1. Take your mobile phone 📱 and install the IFTTT app: a link to Google Play and a link to Apple Store.

Sign in with the same account as on the web. ****

  1. On your computer, click on the Test it button. Keep the page on.

IFTTT in playground

You should automatically see on your mobile that it works. 👌

IFTTT in playground

  1. Now connect IFTTT with the Playground. Open the Playground.

At the top right, you see the menu (three bars). When you click on them you will see Import and Clipboard under it.

Copy the following text code here. This will open the preset flow.

[{"id":"e507a379.e9d1d","type":"mqtt in","z":"dfc861b.b2a02a","name":"","topic":"node/push-button:0/push-button/-/event-count","qos":"2","broker":"b9592cd0.2b74f","x":660,"y":760,"wires":[["5d4d5593.80242c"]]},{"id":"62133f2.84223c","type":"http request","z":"dfc861b.b2a02a","name":"","method":"POST","ret":"txt","url":"","tls":"","x":1010,"y":760,"wires":[[]]},{"id":"5d4d5593.80242c","type":"change","z":"dfc861b.b2a02a","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":860,"wires":[["62133f2.84223c"]]},{"id":"b9592cd0.2b74f","type":"mqtt-broker","z":"","broker":"","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]

IFTTT propojení s playgroundem

You see three nodes in the flow:

  • the first is the classic MQTT node,
  • the second one is the Change node with the delete feature. This will give your HTTP request the form it is supposed to take,
  • the third one is the HTTP node which you will otherwise find in the Function section. With this node you can connect the Playground to a web service such as IFTTT. It can process the HTTP requests.
  1. Copy the code from the IFTTT web...

MQTT node and HTTP node

  1. … and paste it in the Playground to properties of the HTTP request node.

IFTTT in playground

  1. Save the node by clicking on Done button. Let the electronic doorbell be set.
  2. Now just push the good old Deploy button...
  3. … and celebrate you can do yet another cool thing. 👏 When you press the button on the box, it will show on your mobile that you have pressed it. After clicking on the notification, you will see the detailed Applet.

IFTTT in playground

  1. Place the box instead of the doorbell and when someone rings you will know even when visiting a neighbour. You won’t miss any friends anymore. 👋