Copyright © 1999–2018 FastMail Pty Ltd
Sieve Notification Guide: IFTTT app
If-This-Then-That (IFTTT) can send out notifications via literally hundreds of different ways. This guide covers one type that our customers are often very interested in:
Sending an SMS to your phone via IFTTT
Connecting a notification from FastMail to IFTTT allows you to send an SMS to your phone via the SMS channel.
IFTTT only supports adding a single phone number to your IFTTT account. If you'd like to send an SMS from FastMail to a variety of different numbers, look at using Twilio notifications instead. You also might consider if you really need SMS: you can send notifications to your phone via the FastMail app instead.
Note that for IFTTT:
- Some carriers outside of the US are not yet supported.
- There's a limit of 100 SMS messages per calendar month for users in the US and Canada, and 10 SMS messages per month for users outside North America.
- The number you want to send to must first be activated with IFTTT. Only one number per IFTTT account.
- For non-US numbers, include the leading "00" and country code when registering for a PIN. If the PIN isn't received, the your phone carrier isn't supported and you'll need to use another method.
1. Create an IFTTT account
You'll need to sign up for IFTTT first if you don't already have an account.
2. Create a new recipe
Click on My Recipes and select to Create a Recipe
3. Set up the IF condition
The IF condition is how IFTTT knows which rule to match. It is where we match information being sent out from your FastMail rule into the IFTTT condition. We need to use a Maker channel.
Create a new trigger channel of type
Nothing to do here, just acknowledge this trigger will fire when FastMail sends it a web request.
Name the event that will arrive. This event name must match SOMETHING AT FASTMAIL RULE.
4. Set up the THEN condition: send an SMS
You've set up the "this" of "if this then that", now it's time to do "that".
Select the action channel of SMS. You'll need to Connect any phone you want to use with this channel by sending a PIN to that phone.
Non-US numbers need to use "00" and the country code with their number. If you do not receive a PIN, it may be that your carrier is not supported by IFTTT's SMS support.
Configure the message to be sent.
IFTTT configuration is now complete.
5. Go to the FastMail rules screen
Click on the edit custom sieve code link at the top of the page.
6. Add the new rule.
Add the new rule no earlier than the second sieve block down. This places it after the spam filtering has taken place.
Once your recipe has been created, go to https://ifttt.com/maker and copy the key off that screen: this forms part of the notify destination. Using the event example from above (and a fake key of "W9xjkl...IFS" for illustrative purposes only), this results in a notify snippet like:
notify :method "ifttt" :options ["W9xjkl2LDU2lFs:theSkyIsFalling", <options>] :message <text>;
Be aware that due to server limitations, the entire notification will be truncated to around 160 characters: it's not possible to send the contents of War & Peace in an SMS. You can use the options to truncate or shorten parts of the data being sent through in order to maximise the notification content.