Apilio allows you to pass on up to 3 values to IFTTT with any of your IFTTT actions. These parameters can be either Static Values or Dynamic Values. Let’s see how you can set these up:
Additional Value Parameters
When triggering an IFTTT applet, it is possible to pass up to three Value parameters with your IFTTT event name. Those parameters are named Value1 to Value3. Within an applet, the content of those parameters is accessible as ingredient and can be passed to the outgoing action. The Value parameters can either be of Static or Dynamic type.
Please note: it is not mandatory to send any Value parameters to IFTTT for a delay to work.
Static Value Parameters
You can set static Values here and they will be passed with every call. This is handy if you have setup a generic applet in IFTTT (e.g. send a notification) which you want to use in multiple logicblocks with only the values changing (e.g. to track which logicblock fired the action).
In other cases, you might want to pass along the content of a variable instead of a static Value. You can do this by entering the variable reference in double curly braces.
Example: {{nv-3955}}. You can find the variable reference on the variable or device detail page.
Static content and variables can be combined in one field
You can use multiple variables in one field, so e.g. “{{nv-3955}} || {{sv-4043}}” would work
If you make a mistake in the syntax, the string will not be modified and passed as is.
If you enter a variable name that does not exist, Apilio will replace the string with the text “variable_not_found”. This will also be the case if you rename or delete a variable which was used in a action.
After you save a logicblock you can use these values in IFTTT as “ingredients” with the name s “ApilioValue1”, “ApilioValue2” and “ApilioValue3”, for example, in a notification:
I am using the IFTTT applet "If IFTTT receivs a “xxx” event, then Make a web request. How can I use the Apilio Logicblocks value1, 2 and 3 to pass string values so they can be used to compose part of the URL of the IFTTT applet ?
Thanks
Is it possible to nest dynamic values in the Value fields - my use case is the status of 4 door variables that I would like to pass to a notification - with only three value fields, I think I would need to send two notifications. If so, what is the proper syntax to combine or nest those values.
Hey @jeffhomancpa,
it is currently not possible to nest or combine those dynamic values. So I would do as you suggested and create two notifications to have all 4 values sent across.
is it possible to allow for concatenation of values in each field? i.e {{var1}}||{{var2}} using “||” as the delimiter. Then when it goes to IFTTT, we can use the filter code to split the values into var1 and var2?
That won’t work currently because it only matches one pair of double brackets.
What is the use case for this? Do you want to send them along to a Google Sheet?
my use case (pretty sure some of the users will want to do something similar ) is creating different boolean variables and using them as “switches”. It allows me to use it in different conditions for my logicblocks, such that it checks for isColdWeather, isOnVacation, etc, then my logicblock will execute accordingly based on whether the conditions are true or not.
I use Shortcuts to toggle each variable between true and false. But from time to time, i’ll get lost with the different variable states, so i use another logicblock to send to IFTTT the different variables states so that i can use Notifications in IFTTT to return the states.
In current case, i can only send 3 states for each notification.
I also have another logicblock that writes variables to my google sheet, but its static value, so i use “|” to concate the values into a long string. Then when it reach my google sheet, i have a cell formula to split the strings into its different values and pass to multiple cells in the same row. Something like that:
SPLIT(INDIRECT(ADDRESS(ROW(),COLUMN()-1)),"|")
So it takes the concatenated string passed from Apilio to IFTTT, then split the values into 5 other cells.
ah ha! i think i have figured a way out of this - retrieving multiple variables and present it is a an “readable” manner. I make use of Apilio’s API, which allows user to query for boolean variables, in conjunction with iOS shortcuts, i queried each variable i want and package these variables nicely into a message that will eventually display as a notification when i run that shortcut.
Apilio team, the API is great! hope you guys can expand more on it!
So variable 1 is identifying my Tuya red thermometer using the name I’ve given it in the Tuya App, variable 2 is “current temperature” which I hope means it will log the temperature of the red thermometer at that time. Finally it would be great if variable 3 gave the contemporaneous outside temperature too. I know how to create a logicblock using weather station/IFTTT as a trigger - how can I identify it as a variable and what name do I use.
Am I anywhere near using this for my purposes please?
Hi @JtGIlbert
I have a Tuya thermostat called “Pool thermostat” that sets temperature as well as recording this. I’ll run through how it is possible to record the temperature from this Device–adjust to suit the requirements of yours.
If you select Devices and then click on this particular one you see (for this device) the following:
The temperature is returned by this device in the status “Upper temp”. If you look to the right you will see that Apilio associates this value in my system with the reference nv-8876
If you create a logic block with the following action chain then this will send that value to IFTTT (put the reference name between double curly brackets):
This means you could pass up to 3 values from Apilio if you wanted
I should note that I’m not sure that @pebneter has documented this use of references yet, but it certainly works and is a great way to pass information that Tuya provides.