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

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

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

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

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.

1 Like

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

1 Like