ESP8266 + IFTTT

Hey guys, i'm new here so i'm sorry if i'm posting in the wrong place :frowning:

I'm having a few issues to connecting ESP8266 with IFTTT service.

I know how to create a new Applet and how to configure it.

My doubt is how do i create this connection between ESP8266 to IFTTT service?

I have a ultrasonic sensor in my project. This sensor is going to be attached in a car. The main goal of the sensor, is "telling me" when if the car is overturned.

Here's my code to a best explanation:

#include <Ultrasonic.h>
#define pin_trigger D1
#define pin_echo D2

Ultrasonic ultrasonic(pino_trigger, pino_echo);

void setup()
{
Serial.begin(9600);
Serial.println(“Reading sensor data…”);
}

void loop()
{

float cmMsec;
long microsec = ultrasonic.timing();
cmMsec = ultrasonic.convert(microsec, Ultrasonic::CM);
if (cmMsec <=30)
{
Serial.println("Car OK");
}
else{
Serial.println("Car is overturned");
}
delay(1000);
}

In case the sensor detects a distance < 30, it means the situation is OK and the car is OK.. When something else happens, the sensor should send a trigger to IFTTT who is going to send to my phone a message saying the car is overturned.

My problem is, how do i put this condition inside my code? I know i should put this inside a IF sentence. But i dont know how to "call" the event because i see a lot of diferent codes to do it, and none of it worked on this projetc. I'm sorry, i'm new with programming, maybe is something easy to do, but i'm really losing my mind to do it.

What should i do? I just need to call the event?

There is two choices on IFTTT website:

I can make a POST or GET the web service: https://maker.ifttt.com/trigger/ESP_Ultrasonic/with/key/my-key

or:

I can use a curl comand line:
curl -X POST https://maker.ifttt.com/trigger/ESP_Ultrasonic/with/key/my-key

In this case to make the event work i just need to open a webpage from ESP8266 whith some of theses adresses above?
Can some of you guys help me? I dont know how to make my ESP8266 comunicate with IFTTT =(