function getSentformPasstrainingtt2565(e)

{

var form = FormApp.openById('1gXA_u2eFACTSXDqsTR90IMj8LNwyUsk8DdQOW4nr3TQ'); //Replace your form id

var itemResponses = e.response.getItemResponses();

var text_data = 'สมัครเข้าอบรม : 2565';

for (var j = 0; j < itemResponses.length; j++) {

var itemResponse = itemResponses[j];

text_data += '\n'+itemResponse.getItem().getTitle()+': '+itemResponse.getResponse()

}

sendMS(text_data);

}

function sendMS(text)

{

var formData = {

'message': text,

};

var token = 'qtveAVUPqMf76MoTZtimBcibGo5IjZhIDr1iGuRGk26'; //Replace your LINE token id here

var options = {

'method' : 'post',

'headers' : {'Authorization': "Bearer "+token},

'contentType': 'application/x-www-form-urlencoded',

'payload' : formData

};

UrlFetchApp.fetch('https://notify-api.line.me/api/notify', options);

}