IFTTT Integration (Trigger)

Introduction

The IFTTT can be triggered by using the buttons on the Display. In the following example, when the fourth button on the Display is pressed, a POST request is sent to the webhook of the IFTTT, and the IFTTT webhook will execute the action of sending the Email after receiving the request.

You can download the tutorial’s final sample project from this Github Page: https://github.com/myvobot/examples/tree/master/buttons

Setup

  • Login to IFTTT: https://ifttt.com

  • Go to the maker_webhooks page: https://ifttt.com/maker_webhooks.

  • Click [ Connect ] and then [ Documentation ].

  • You will see your webhook key, similar to dVcMCuct838W9ssxxxxxxxx, please replace this key with the WEBHOOK_KEY in the code.

Steps to create an IFTTT applet

If [ + ] This Then That

  1. Click the [ + ] of { If [ + ] This Then That } to enter the Choose a service page.

  2. Enter Webhooks in the [ Search services ] box.

  3. Click the [ Webhooks ] card to enter the Choose trigger page.

  4. Click the [ Receive a web request ] card to enter the Complete trigger fields page.

  • Set the name of the event in the [ Event Name ] column, such as the button, which needs to be the same as the event name in the IFTTT URL requested by the device.

  1. Click [ Create trigger ].

If This Then [ + ] That

  1. Click the [ + ] of { If This Then [ + ] That } to enter the Choose a service page.

  2. Enter Email in the [ Search services ] box.

  3. Click the [Email] card to go to the Choose action page.

  4. Click the [ Send me an email ] card to enter the Complete action fields page.

  • Fill in the message subject in the [ Subject ] column.

  • Fill in the message content in the [ Body ] column.

  1. Click [ Create action ] to enter the Review and finish the page.

  2. Click [ Finish ].

At this point, the If Maker Event “button”, then send me an email at xxx@email.com applet is created. When you press the button on the Display, you will receive the Email.