Issue while sending automatic WhatsApp message template using 360Dialog provider

I wrote a Node.js code to automatically send a WhatsApp template message(360Dialog) when it receives a incoming message. But as soon as It captures the incoming message through Webhook it continuously start sending the template message instead of just sending once.

index.js

const express = require('express');
const bodyParser = require('body-parser');
require('dotenv').config();

const webApp = express();

webApp.use(bodyParser.urlencoded({
    extended: true
}));
webApp.use(bodyParser.json());
const PORT = 3000;

webApp.get('/whatsapp', (req, res) => {
    res.send(`Hello World.!`);
});

let appServer = webApp.listen(PORT, () => {
    console.log(`Server is up and running at ${PORT}`);
});

const WA = require('./sendTemplate');

// Route for WhatsApp
webApp.post('/whatsapp', async (req, res) => {

    
    WA.sendMessage();
    
  // console.log(req.body['messages'][0]['type']);

});

sendTemplate.js

var request = require('request');

function sendMessage(){
    
var options = {
  'method': 'POST',
  'url': 'https://waba.360dialog.io/v1/messages',
  'headers': {
    'D360-API-KEY': '',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "to": "",
    "type": "template",
    "template": {
      "namespace": "69bcc88a_fffa_4488_90ba_1957221dffa1",
      "language": {
        "policy": "deterministic",
        "code": "en"
      },
      "components": [
        {
          "type": "body",
          "parameters": [
            {
              "type": "text",
              "text": "John"
            }
          ]
        }
      ],
      "name": "welcome"
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});


}
module.exports = {
    sendMessage
}


As soon as I execute node.js file it waits from an incoming message once it receives the message from the user, it starts sending the template message one after the other, instead of just sending the message once.

How can I solve this?