Usage - Creating Triggers, Actions and Recipes

There are two components in alxIFTTT, Triggers and Actions.  Triggers send events to IFTTT and Actions receive events from IFTTT.  Both of these components utilize the IFTTT "Maker" service which is a generic service for sending and receiving events.  

Triggers

Triggers allow the Niagara Station to send an action with values to the IFTTT API.  These are the "this" portion of an if-this-then-that applet.  The "Event Name" property can be set to any unique name, this is the ID that IFTTT will use when matching it to an action.  Each Trigger allows three optional values which can also be used in an IFTTT applet.

To set up a Trigger for the "this" portion of your applet, first select the "Maker" Trigger Service followed by selecting "Receive a Web Request".  In Step 3 type in the exact event name you supplied in your MakerTrigger component.

Actions

Actions are blocks that receive an event and information from an IFTTT applet.  They're the "that" portion of an if-this-then-that.  An Action has a single property called "URL" which is the URL that IFTTT will be using to communicate with the Action.  This URL should reflect the username, password, public IP, and HTTPS settings you configured in the IFTTT Service.  

When an Action is received from IFTTT, all values sent along with the Action will be populated into slots in the action component.

To receive an Action from IFTTT as the "that" portion of a Applet

  1. Select the "Maker" channel
  2. Choose "Make a Web Request"
  3. Paste in the URL from your "MakerAction" block into the URL field

If you would like to receive data from the applet, select Method "POST" and Content Type of "application/x-www-form-urlencoded".  Then each value needs to be formatted in a URL form-encoded manner.  The URL form-encoded format is name=value&name2=value2& (etc.).  IFTTT provides a list of usable values from the "this" portion of the Applet which can be accessed by clicking on the beaker on the right-side of the "Body" input.  This will place dynamic values in double curlys.

Example:

To receive the "Temperature" and "Status" from a "this" action, the BODY would look like:

temperature={{Temperature}}&status={{Status}}