To have a chance at getting these cheap fares, we're going to need to know in nearly real time when they happen. To accomplish this, we'll use a service called If This Then That (IFTTT). This free service allows you to connect a huge number of services with a series of triggers and actions. Want to save as many pictures as you like on Instagram to your iPhone photos? Want to get an email every time a particular person tweets? Want your Facebook updates posted to Twitter? IFTTT can do all of this. Go through the following steps:
- The first step is to sign up for an account at http://www.ifttt.com.
- Once you've done that, you'll need to sign up for the Maker channel, https://ifttt.com/maker_webhooks, and the SMS channel, https://ifttt.com/sms.
- Maker allows you to create IFTTT recipes by sending and receiving HTTP requests.
- Once you've created an account and activated the Maker and SMS channels, click My Applets from the home page, and then click New Applet:
- Then, click on this, as shown in the following screenshot:
- Then, search for webhooks and click Receive a web request:
- Then, we'll create an event called cheap_fares:
- Once you fill out the event name, click Create trigger. Next, we'll set up the +that:
- Click that, and then search for SMS and select it:
Then, choose Send me an SMS:
- After that, we'll customize our message:
Once this is complete, click on Finish to wrap-up the setup:
To test the setup, go to http://www.ifttt.com/maker_webhooks and click on Settings. You should see your account information that includes a URL with a secret key. Copy and paste that URL into your browser. It should have a form with your secret key and a place to fill in the values that correspond to your city and price.
Fill in cheap_fares for event, and place the city and fare into value1 and value2, respectively:
Finally, click Test It, and you should receive a text message in just a few seconds.
Now that we have all the pieces in place, it's time to pull it all together into a single script that will monitor fares 24/7.