Today is about IFTTT – and we’ll explain how to connect nello one to IFTTT using a smart hack. That means you’ll find here the instructions for using IFTTT in combination with webhooks and nello one. At this point a big thank you to Thomas Kekeisen, who explains the whole procedure in his great blog article step by step.

What does that mean? IFTTT via Webhook?

If you follow the step-by-step instructions, you can select nello one as the trigger for the IFTTT applet (but not, let’s say that much in advance, as the action to be performed).

What is IFTTT?

Very simple: IFTTT is the abbreviation for “If This Then That”. IFTTT allows you to combine different services. A service is the trigger, i.e. the “This” part, which is triggered at a certain action. In our case this will be a webhook. The second part then describes the “That” part of IFTTT. So the action to trigger. This whole function is internally called “applet” by IFTTT.

That’s what you need:

Let’s turn to the prerequisites that must be fulfilled in order to use nello one with it:

  1. You need access to the nello Public API (simply login with nello username and password). You will then be asked to enter your details (Name, Allowed response type, allowed grant type etc.). Fill in your details and click on “Submit”. Then you will see the public API client_id and client_secret.
  2. You also need software to send POST, GET and PUT requests. We use Postman (free of charge). Simply create a free account with Postman.
  3. Furthermore you need an IFTTT account (also free) connected to IFTTT Webhook.

Let’s start with IFTTT integration

First we log in at Postman, because we need an access_token for further requests to the nello one server.

  1. Select POST at the top of the selection bar and copy https://auth.nello.io/oauth/token/ into the “Enter request URL” field. In the POST request we want to pass some information.
  2. Next select “Body” in the bar below the post command and “x-www-form-urlencoded” in the list below.
  3. Then copy the following values as key and your personal corresponding value into the displayed fields below. The value values can be found in the nello API client request. The front part of the info will be copied into the field “Key”, the back part “Value” will contain your personal data. The picture shows you how Postman looks like.
    • grant_type password
    • client_id [your client_id]
    • client_secret [your client_secret]
    • username [your username]
    • password [your password]

POST request Postman nello IFTTT

If you now press “Send”, you should get a response containing access_toke, refresh_token, scope and token_type. You can copy your access-token now. The whole thing will look like this:

Continue with nello authentication

Now we have the access_token for authentication in the next steps. Next we have to find the nello ID of the desired location. We perform a GET request. Select the GET request in Postman and copy the following link https://public-api.nello.io/v1/locations/ into the “Enter request URL” field. We only need one Authorization header, so select “Headers” in the bar below.

  • Key: Select “Authorization” in the drop-down menu
  • the corresponding value is: Bearer [your access_token], i.e. your access_token from the previous step

The answer of the server should look like this:

Copy your location ID.

Now to IFTTT

Now all we have to do is create an IFTTT applet and access our webhook. All you need to do is log in to the IFTTT website and connect your IFTTT webhook account. To do this, go to IFTTT Webhook and click “Connect”. Then click on Settings. There you should see the following:

IFTTT Webhook settings nello

The URL you see contains your webhook key. The webhook key is the part that is displayed after /use/. You can copy your webhook key right away, as you will need it again.

After that you need an IFTTT applet to link the webhook to your action. Just navigate to Name > New Applet on the IFTTT website. Now you can click on the “This” button and select your webhook. (To do this, search for “Webhook” in the search field, and Webhook will be displayed immediately). You have to give it a name. Here we call our webhook “bell_ring” and click on “Create trigger”. Then you can use the “That” button to select your preferred action that should be linked to your nello one.

Linking nello one and IFTTT

Now that all preparations for the nello API and the IFTTT applet have been made, we only have to merge them with a PUT request to “https://public-api.nello.io/v1/locations/[your location_id]/webhook/”. In Postman, select PUT (with the valid authorization-header) and copy “https://public-api.nello.io/v1/locations/[your location_id]/webhook/” with your location_ID into the “Enter request URL” field. Don’t forget to put your location ID into the URL! Below you choose “Body” and below that “raw” and “JSON (application/json)”. Please make sure that you have set the following keys for Headers:

  • Key: Select here “Authorization” in the drop-down –> the corresponding value is: Bearer [your access_token], so your access_token from the previous step
  • Key: Select “Content Type” –> the corresponding value is “application/json”.

We also have to teach our nello when to execute the webhook. To accomplish this, we send a JSON object with our request

The JSON object consists of:

  • url “https://maker.ifttt.com/trigger/[webhook_name]/with/key/[your webhook_key]”
  • actions: Describes the actions that trigger the webhook:
    • “tw”: ringing while a time window is active
    • “geo”: Ringing while Homezone Unlock is active
    • “deny”: Ringing without opening through nello one
    • “swipe” For manual opening with “Swipe To Unlock”.

Here is the construct to copy – don’t forget to use your webhook_name (in our case “bell_ring”) and your webhook_key:

 

{"url": "https://maker.ifttt.com/trigger/[webhook_name]/with/key/[your webhook_key]",
"actions": [
"tw",
"geo",
"deny"
]
}

In our example, the webhook is triggered when the bell rings. No matter if you ring the bell for time window or Homezone Unlock.

Our favorite IFTTT integration

With IFTTT many services are automatically linked. We would like to introduce our favourite combi: “Playing a song when the bell rings”. A nice way to replace the bell, but currently only possible for Android users (you also need the IFTTT App for Android). So every time someone rings your bell, a song is played on your smartphone. To do this, you can simply select “Android” as the action to be executed in IFTTT and then select a special song. (It is best to select a song with a unique name, otherwise you may have problems finding the song). We recommend My Doorbell 😁