IFTTT Integration for notification on receiving a Twilio SMS doesn't work


#1

Hi,

I’m working with an Asset Tracker v2.0. I’m using a Twilio webhook to SMS me a Google Maps link containing the current location.

I also created an IFTTT recipe saying If Particle Published an event, then the contents of the event be displayed in the notification.

This is what my Particle code looks like:

\#include <AssetTracker.h

int flag = 1;

AssetTracker t = AssetTracker();

void setup()
{
    t.begin();
    t.gpsOn();
    Serial.begin(9600);
}

void loop()
{
    t.updateGPS();
    if (t.gpsFix()) 
    {
        if (flag == 1)
        {
            String urlStart = "https://www.google.co.in/maps/@";
            String latlon = t.readLatLon();
            String zoom = ",20z";
            String location = String(urlStart+latlon+zoom);
            Particle.publish("twilio", location, PRIVATE);
        }
        Serial.println(t.readLatLon());
        flag = 0;
    }
}

And this is what my IFTTT Recipe looks like:

I’m not sure where I’m going wrong, but the notification never pops up after the SMS is received.
Please help! :slight_smile:

I’ve edited your post to properly format the code. Please check out this post, so you know how to do this yourself in the future. Thanks in advance! ~Moors7


#2

Solved the error. Not sure how to delete this post :confused:


#3

If you could tell us what the error was, others might learn of it too


#4

I made the Event Contents field blank. I’m pretty new to IFTTT. So my assumption is, if you specify a value for Event Contents, it pushes a notification only if the Event publishes that value. If you leave it blank, it pushes a notification no matter what value is published.


#5

Thank you for posting your solution, we like to keep these posts up in case anyone else runs into the same problem as you did we have an answer!

Kyle