Send SMS based on content

How to let the GSM module send a message to the customer whenever the customer sends a message to the SIM card number in the SIM800L with only the message content being “airtime”.

Have you got a program that can receive SMS messages and display them on the Serial Monitor? If not that should be the first step.

If you have a program that you need help with then post the program.

...R

//Include Library because we are using digital pins for connection
#include <SoftwareSerial.h>
#include “sms.h”
SMSGSM sms;
/Initializing digital pins for connection to serve as Rx and Tx
Rx pin is 7 and Tx pin is 8
/
SoftwareSerial SIM800(7, 8 );

//Variable for storing incoming messsages content
char incoming_char = 0;

void setup()
{
// Baudrate for serial monitor
Serial.begin(19200);
//Baudrate for GSM shield
SIM900.begin(19200);
// Give time to log on to network.
delay(20000);

}

void loop()
{

// Now we simply display any text that the GSM shield sends out on the serial monitor
if(SIM800.available() >0)
{
//Get the character from the cellular serial port.
incoming_char=SIM800.read();
//Print the incoming character to the terminal.
Serial.print(incoming_char);
}
}

Yes I have a code that prints out

The code you have posted just prints each character as it is received. It is not collecting a complete message. If you want to search for a particular word then you need to capture the complete message

Have a look at the second example in Serial Input Basics.

...R