The use of parameters

This guide requires that you have set up AssistantComputerControl, and are willing to go a little advanced.

NOTE: This currently only works for Google Assistant, as Amazon hasn't enabled the use of variables on IFTTT (yet)

The use of parameters for actions. The setup guide shows you how to use actions that don't require a parameter, but some actions either support or require the use of parameters. In this guide you will learn how to use them.

A parameter is an unknown user-decided information in the phrase you tell your assistant. Say you want to say "Hello" to a random person. You could say "Hello Brian" and "Hello Elizabeth". Your assistant would not be looking for the names Brian and Elizabeth, but rather just "Hello", and the word that follows. In an IFTTT applet, you'd make it like this; "Hello %", the % being a variable representing the name/word that should take its place.

The quick technical explanation is that a parameter is just action:parameter in the "Create a file" > "Content" field in IFTTT. Fx; mute:true

Using parameters

Let's use the set_volume action for this guide. This action requires a parameter [as seen here]. This parameter on this specific action, has to be a whole number between 0-100.
All the setup required will be done in IFTTT.

Step 1

Upon creating the applet we want to choose "Say a phrase with a number" instead of "Say a simple phrase"
This step is a bit different than the "... simple phrase" one. In the "What do you want to say?" field(s) you can use the # symbol as a placeholder for where the number is supposed to be.

IMPORTANT NOTICE: Use the # symbol as the last thing in the sentence. "... set pc volume to 40 percent" will most likely not work, but "... set pc volume to 40" always will*

Creating the triggerCreating the trigger

Step 2

In the "+That" step we will select "Dropbox" again and choose "Create a text file", fill in the file name ("computerAction") and in ¨the Content field it becomes interesting.

The field has a placeholder, NumberField ({{NumberField}}) which represents the number we are going to use as parameter.

All you have to do is type in "set_volume:" before the placeholder and you're set!

Dropbox file contentDropbox file content

Done

That's how you use number-parameters!

  • More in-depth explanation: IFTTT will sometimes treat a number-parameter like a word if it isn't the last word in the pickup-phrase. So the if anything comes after the number, like "percent", IFTTT might pick it up as "five" instead of "5"

Did this page help you?