IFTTT action – additional value parameters

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).

Dynamic Value Parameters

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.

Additional tips:

  • 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:

2 Likes

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

Hi!
The values 1 to 3 are available in the IFTTT applet composer as “ingredients” with the name “ApilioValue1” to “ApilioValue3”.
Here’s an example:
image
Click “Add ingredient” to insert those values into your URL.

1 Like

Thank you for the prompt reply.

Works great.

2 Likes

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.

Thanks!

1 Like

I think this is one for you @philipp!

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.

1 Like

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?

1 Like

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 :smiley:) 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.

1 Like

awesome use case, #amazing. thanks for sharing! I think the :mage:has some plans around data presentation that may help!

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! :grinning:

4 Likes

This is awesome :bowing_man: Looks like we have another :mage: :woman_mage: in the house. Thanks so much for sharing!

Hi @wookiebao ,
we made an update recently and using multiple variables in one field works now: {{var1}}||{{var2}}
:grinning:

1 Like

:star_struck: Thank you! am sure it will help users alot!

1 Like

Can I have suggestions on how to name the variables please?


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?

:sunglasses: Jt

1 Like

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):

I trigger this logic block by setting a condition “every_4_min” that is defined as follows, and having the logic block trigger via this condition:

Adjust the timing to suit your requirements (4 minutes is good for me, but not necessarily for your needs)

The IFTTT end is quite simple:

For “Add row to spreadsheet” I just use:


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.

Good luck,

Robin

2 Likes

Thank for taking the trouble Robin. As you see I have got it running

I have found the Cron expression for “between x-y times” so will try that by ucreating a new condtion with a time frame!!

:sunglasses: Jt

3 Likes

Thanks for helping out here!
We need to update the documentation on how to forward Tuya device data :pensive:

2 Likes