User Tools

Site Tools


tutorials:using_mairlist_with_ifttt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tutorials:using_mairlist_with_ifttt [2016/01/11 08:58] – created twtutorials:using_mairlist_with_ifttt [2019/07/09 16:18] (current) – external edit 127.0.0.1
Line 11: Line 11:
 First of all, you need to create an account for IFTTT obviously if you don't have one already. So go to [[https://ifttt.com]] and follow the steps to sign up. First of all, you need to create an account for IFTTT obviously if you don't have one already. So go to [[https://ifttt.com]] and follow the steps to sign up.
  
-To fire triggers from mAirList, we will use the so-called ''Maker Channels'' -- a mechanism introduced by IFTTT 2015 that you can use to trigger actions through a simple HTTP POST call.+To fire triggers from mAirList, we will use the so-called //Maker Channels// -- a mechanism introduced by IFTTT 2015 that you can use to trigger actions through a simple HTTP POST call.
  
 Maker Channels are managed on [[https://ifttt.com/maker]]: Maker Channels are managed on [[https://ifttt.com/maker]]:
Line 21: Line 21:
 {{ :tutorials:pasted:20160111-095751.png?400 }} {{ :tutorials:pasted:20160111-095751.png?400 }}
  
 +==== Create Recipe ====
  
 +Once we have connected our Maker Channel and obtained your key, you can go to //My Recipes// in the menu, and create a new recipe. For the Trigger Channel, type "maker" and choose the //Maker// channel:
  
 +{{ :tutorials:pasted:20160111-095959.png?400 }}
 +
 +As we are going to trigger the action through an HTTP call from mAirList, choose //Receive a web request// as the trigger -- this happens to be the only option at the time of this writing:
 +
 +{{ :tutorials:pasted:20160111-100014.png?400 }}
 +
 +In the next step, enter a name for the trigger. This will be later used in the URL, so use lower case characters only, and no spaces. For our example, we choose ''playlist_empty'':
 +
 +{{ :tutorials:pasted:20160111-100126.png?400 }}
 +
 +In the remaining steps, we must specify to the action to take -- in our very simple example, we will just send an email to ourself:
 +
 +{{ :tutorials:pasted:20160111-100434.png?400 }}
 +
 +{{ :tutorials:pasted:20160111-100449.png?400 }}
 +
 +{{ :tutorials:pasted:20160111-100508.png?400 }}
 +
 +==== Test the Recipe ====
 +
 +To test the recipe, go back to [[https://ifttt.com/maker]] and click //How to Trigger Events//. The following web page will appear:
 +
 +{{ :tutorials:pasted:20160111-100906.png?400 }}
 +
 +In the topmost URL field, replace ''{event}'' with the name of our event: ''playlist_empty'':
 +
 +{{ :tutorials:pasted:20160111-101215.png?400 }}
 +
 +Now you can click //Test It// and wait for the e-mail to arrive.
 +
 +At the bottom of the page, we already see the HTTP POST URL that we will need in the final step when adding the action to mAirList: ''https://maker.ifttt.com/trigger/playlist_empty/with/key/<key>'', where ''<key>'' is the key that was obtained when you connected the Maker Channel.
 +
 +===== Set Up mAirList =====
 +
 +The final step is to make mAirList trigger the HTTP POST call when the playlist runs empty during automation.
 +
 +==== Create Script ====
 +
 +At this time, we cannot use HTTP POST calls directly in action lists, so we must create a very simple script first:
 +
 +<code language="pascal">
 +begin
 +  HTTPPost('https://maker.ifttt.com/trigger/playlist_empty/with/key/<key>', '');
 +end.
 +</code>
 +
 +Replace ''<key>'' by your IFTTT Maker Channel key, then save the script as e.g. ''ifttt_playlist_empty.mls''.
 +
 +==== Set Up Action ====
 +
 +Now that we have created the script, we can go to the configuration and add it as an action to the //When playlist runs empty in automation mode// condition:
 +
 +{{ :tutorials:pasted:20160111-102138.png?400 }}
 +
 +{{ :tutorials:pasted:20160111-102239.png?400 }}
 +
 +That's all. Now when the playlist runs empty, mAirList will make a call to IFTTT.
tutorials/using_mairlist_with_ifttt.1452502680.txt.gz · Last modified: 2019/07/09 16:19 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki