Skip to content

Instantly share code, notes, and snippets.

function doGet(request){
//push noti api
var lntoken = 'YOUR_NOTIFY_TOKEN'
var messagefrom = request.parameter.messagefrom
var message = request.parameter.message
message = '\nmessage from: '+messagefrom+'\n\nmessage: '+message
var result = sendLineNotify(lntoken,message)
result = JSON.stringify(result);
return ContentService.createTextOutput(result).setMimeType(ContentService.MimeType.JSON);
}
@Mulannnnn
Mulannnnn / SaveDataToSheet.js
Last active December 12, 2023 04:48
Save parameter to google sheet
function doGet(request) {
var ss = SpreadsheetApp.openByUrl("*****");
var name = request.parameter.name;
var nickname = request.parameter.nickname;
var p_image_url = request.parameter.p_image_url;
var sheet = ss.getSheetByName('*****');
var today = new Date();
var date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
var dateTime = date + ' ' + time;
function doGet(request) {
var ss = SpreadsheetApp.openByUrl("YOUR_SHEET_URL");
var sheet = ss.getSheetByName('YOUR_SHEET_NAME');
const dataRange = sheet.getDataRange();
const values = dataRange.getValues();
const headerRow = values.shift();
const randomIndex = Math.floor(Math.random() * values.length);
const rowData = values[randomIndex];
function doGet(request) {
var url = "YOUR_SHEET_URL"; //เปลี่ยน
var ss = SpreadsheetApp.openByUrl(url);
var sheetName = 'YOUR_SHEET_NAME'; //เปลี่ยน
var c1 = request.parameter.col1;
var c2 = findColumnValue(ss, sheetName, c1, 2);
var c3 = findColumnValue(ss, sheetName, c1, 3);
var c4 = findColumnValue(ss, sheetName, c1, 4);
{
"type": "bubble",
"hero": {
"type": "video",
"url": "https://www.youtube.com/watch?v=BuvkPnzHVdw",
"previewUrl": "https://i.ytimg.com/vi/BuvkPnzHVdw/maxresdefault.jpg",
"altContent": {
"type": "image",
"size": "full",
"aspectRatio": "16:9",
{
"type": "bubble",
"size": "mega",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "box",
"layout": "vertical",
{
"type": "carousel",
"contents": [
{
"type": "bubble",
"size": "kilo",
"body": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "bubble",
"header": {
"type": "box",
"layout": "horizontal",
"paddingAll": "xs",
"contents": [
{
"type": "image",
"url": "https://logos-world.net/wp-content/uploads/2021/09/Nintendo-Switch-Symbol.png",
{
"type": "bubble",
"size": "giga",
"header": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "ยอดค้างชำระทั้งหมด",
{
"type": "bubble",
"header": {
"type": "box",
"layout": "vertical",
"contents": [
{
"type": "text",
"text": "ยอดที่ต้องชำระ",
"weight": "bold",