How to update a numeric variable via IFTTT

Apilio is natively integrated with IFTTT so you can combine almost 700 different brands of devices and services in your home routines. Apilio is a fantastic complement for IFTTT because you can create routines that combine multiple conditions, actions and delays.

:slightly_smiling_face: Why do we need Variables?

To allow you to use your devices with Apilio and build Conditions that use those devices, IFTTT can send event information over to Apilio, such as the temperature, the humidity level or for exampleā€¦the number of astronauts in space. Apilio will then store this information about your devices in its ā€œmemoryā€ in the form of Variables.

2 options for managing numeric variables from IFTTT

image

With IFTTT, you can use the following two actions when creating your own applet from scratch:

  • Update a numeric variable to a new value you specify
  • Do a mathematical operation (add or subtract) with a numeric variable

Letā€™s have a look at how you can setup and manage a numeric variable via IFTTT.

Setting up a numeric variable to check how many astronauts are out there

  1. In Apilio, create a numeric variable called ā€œastronautsā€ and set it to 6, which at the time of writing was the number of people out there in our vast space as per Nasa:

  1. Go to IFTTT now and select ā€œcreateā€ to start building your own applet (https://ifttt.com/create).

  1. For the ā€œIf thisā€ part, select the Space service, and the trigger ā€œAstronaut enters spaceā€

  1. For the ā€œthen thatā€ part, select the Apilio service, and ā€œDo a mathematical operation with a numeric variableā€ as your action. Then your ā€œastronautsā€ variable, ā€œaddā€ as your operation and add 1.

  1. Review and click complete to finish setting up your applet, you are done!

  1. You can also subtract astronauts when the come back home with the alternative trigger, ā€œAstronaut exits Spaceā€

This is just an example to show you a step-by-step setup, but the sky is the limit! Let us know how you are using your numeric variables with Apilio.

Example setup where a numeric variable is used as a counter

:bulb: Do you want to know more?

Have a look at these examples with the other types of variables:

Also check:

1 Like