bberg / ifttt-proxy

REST proxy for IFTTT Maker Channel triggers

Home Page:http://ifttt-proxy.ben-berg.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ifttt-proxy

ifttt-proxy is a REST proxy for IFTTT Maker Channel triggers. Using ifttt-proxy you can flexibly connect your IFTTT channels to most public APIs.

IFTTT configuration

To use ifttt-proxy you need to set up two IFTTT recepies. The outbound recipie will send an IFTTT Maker Channel trigger to ifttt-proxy with information about the API request for ifttt-proxy to send, and the conifguration of the inbound channel. After receiving the response from the public API, ifttt-proxy will send a requet to IFTTT's maker channel triggering your inbound recipie.

flow

  1. IFTTT Trigger

ifttt-proxy architecture overview

inbound recipie

  1. Head to https://ifttt.com/maker and activate the Maker channel if it isn't already active
  2. Copy the key from https://ifttt.com/maker where it says Your key is:
  • get IFTTT maker key
  1. Create a new recipie
  • create new recipie
  1. Select Maker Trigger Channel
  • select maker channel
  1. Select Receive a web request Trigger
  • receive a web request
  1. Name the event. In this example we will get a stock quote so we'll use the event name stock_quote.
  • name the event
  1. Select any Action Channel. In this example we will use a simple IF Notification channel. This is good for testing.
  • name the event
  1. Select any Action.
  • select any action
  1. Click on the beaker to use the Value1 Ingredient to return the output from ifttt-proxy.
  • click the beaker to add ingredients
  • add the value1 ingredient

outbound recipie

  1. Create a new recipie
  • create new recipie
  1. Select any Trigger Channel
  2. Select the Maker Action Channel
  3. For URL enter http://ifttt-relay.ben-berg.com/api/v1/
  4. For Method select POST
  5. For Content Type select application/json
  6. For Body write a JSON object similar to the one below
  • ifttt_key is your Maker Key
  • event is the inbound recipie event
  • proxyRequest defines the paramaters of the proxied API request
  • parser defines what parts of the returned proxy request to send to the inbound request
{ 
 "ifttt_key":"UHGn54WbT1zbxipLfWF8h", 
 "event":"stock_quote", 
 "proxyRequest": { 
  "host":"query.yahooapis.com", 
  "path":"/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22ALRM%22)%0A%09%09&env=http%3A%2F%2Fdatatables.org%2Falltables.env&format=json", 
  "headers":{}, 
  "method":"GET" 
  }, 
 "parser":[
  ["query","results","quote","symbol"],
  ["query","results","quote","LastTradePriceOnly"]
 ]
}

About

REST proxy for IFTTT Maker Channel triggers

http://ifttt-proxy.ben-berg.com


Languages

Language:JavaScript 100.0%