Viewing your data is great, but you cannot watch it 24/7. Triggers give you the ability to be notified if a condition that you specify on your data is reached. For example, "send me an email if temperature is greater than 95".
Set Up an Email Notification on Trigger
Click on the settings link under the bucket name in the bucket shelf. Once the Settings dialog box opens, click the "Triggers" tab at the top left (if you do not see the Triggers tab, you may be on a free account that does not offer this functionality). Let's set up an email notification whenever myNumber is greater than 20. Select or type myNumber in the "Stream Key" input field under "Trigger condition". Next, select '>' as the operator and type 20 in the "Value" field. Click the '+' icon to add this trigger condition.
You need to specify an action if this condition is detected. Type your email address into the "Contacts to notify" field. If this is the first time you have set up a trigger for this email address, you will be asked to create a new contact and enter in a verification code that will be emailed to that address. Once complete, click the '+' icon to add this trigger notification.
That is it. Your trigger is now live and should look like the above screenshot. Time to test your new trigger. Stream in some new values into myNumber (see Step 1) including a value that will fire off the trigger (e.g. myNumber=22).
You should get an email that your trigger fired.
Set Up a SMS Notification on Trigger
If you live in the US, you can set up a SMS trigger the same way as an email trigger. Instead of placing your email address in the "Contact to notify" field, use your cell phone number. You will be asked for a verification code that will be sent to that number before you can proceed. Now, you can get an instant notification about your data no matter where you are at.
You can learn more about triggers here.
Comments
0 comments
Article is closed for comments.