Jump to content
Posted
  • Popular Post
comment_35854

Whatsapp Gateway | Multi Device


This script has been completely modified and many important features and fixes have been added by @Magd Almuntaser
He is now responsible for the updates of this script and has full intellectual property rights
So no one will violate the terms of use that he has set

Latest Features:
1. WhatsApp Account Connectivity

All types of WhatsApp Accounts to be able to connect with WhatsApp Gateway (Multi Number & Multi Device);
Ease of the WhatsApp Account connectivity process with a QRcode Scan or with an Authentication Code directly from your device.

2. Message

Availability of various types of (text messages, media, polls, lists, locations, VCard) can easily be used by you;
You can send mass messages for your marketing campaign activities, promotions or business programs easily and on a scheduled basis;
Setup automatic message replies with more natural (alami) and selected keywords for operational optimization of use;
Manage sent message history with automatic and scheduled deletions.

4. Integration

You can easily integrate your WhatsApp Account with various (AI) artificial intelligence services, namely ChatGPT, DALL-E, Gemini, and Cloude with API authentication codes only;
You can easily activate Ai for Single or Multiple use on your WhatsApp Account;
You can easily select Ai in your WhatsApp messages for WhatsApp Group, Private, or Both types;
You can easily setup call rejection automatically if there is a (Call) call and provide a specific response or information;
Setup your WhatsApp and Ai accounts more naturally (alami) with "Already read" status";
Setup your WhatsApp and Ai accounts more naturally (natural) with the status "Typing...".
You can easily integrate and communicate your services with the Webhook mechanism of WhatsApp Gateway | Multi Device.

5. Application Settings

Nowadays you can easily and quickly carry out the process of setting up the WhatsApp Gateway | Multi Device* application by Magd Almuntaser with the settings panel;
You can easily set up applications based on server ecosystem, smtp, etc quickly;
Multi language support (english, Indonesian, Indian, Spanish and Arabic) for easy use.

6. Developer Options

Currently WhatsApp Gateway | Multi Device* by Magd Almuntaser has provided various API services for your easy development consisting of:
        1). Send Message API
        2). Send Media API
        3). Send Poll API
        4). API Send Button
        5). Send API Templates
        6). Send List message API
        7). Send Location API
        8). Send VCard API
        9). Generate QR API
        10). Disconnect devices
        11). Create User API
        12). User Info API
        13). Device Info API
        14). Check Number API
        15). Webhook Example

Ease of setup and availability of the (API Key) API Key for authentication and authorization of your development process.

7. Security

Currently there is a 2 factor authentication (2FA) service available to maintain the security and comfort of application access;
A password reset service is available if you forget your account login information.


Coming Soon:

1. Landing page for Software as Service services (Subscription Services);
2. Payment gateway page management (QRIS, BCA virtual account, PayPal, Stripe);
3. Added user account management;
4. (ticket) obstacle reporting service for users and managers;
.. And many more.


 

  • Replies 4.1k
  • Views 248k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Magd Almuntaser
    Magd Almuntaser

    What's new in version 9.0.0 so far: - Added landing page (welcome page). - Added plans system. - Added cronjob page. - Added Multi-Keyword in autoreply. - Added send message with footer. -

  • Magd Almuntaser
    Magd Almuntaser

    This version will not be released soon, because there are many people who violate rights without permission.. I told everyone to use the script for free, but if you want to sell the version or redev

  • Magd Almuntaser
    Magd Almuntaser

    Today the version will be released, and this is what's new in version 8.5.0: - Added send sticker feature. - Added wysiwyg whatsapp (text editing tools). - Added location, vcard, sticker in camp

Posted Images

Featured Replies

comment_77658
1 hour ago, Pebrian said:

SHARE QURAN VIA GOOGLE APPSCRIPT (Script quran.php dari mamank @Magd Almuntaser)

Buka Google Spreadsheets lalu buat table seperti ini ( Your Website | Apikey | Sender | Tujuan | Text/Audio/Hybrid )

image.png.197932549ec8a943dd3e735bbb1e0812.png

atau bisa copy dari ini : https://docs.google.com/spreadsheets/d/1ICpCKMOSFOxDDeipt71wDHakocBVFmQVrpmguHWcEkM/edit?usp=sharing
 

lalu pergi ke Extensi -> AppScript

lalu copas script ini ke appscript lalu save.
 

function sendQuranMessage() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var YOUR_WEBSITE = sheet.getRange('A2').getValue();
  var API = sheet.getRange('B2').getValue();
  var YOUR_NUMBER = sheet.getRange('C2').getValue();
  var AUDIO = sheet.getRange('E2').getValue();
  
  var dataRange = sheet.getRange(2, 4, sheet.getLastRow() - 1, 1);
  var ALL_NUMBERS = dataRange.getValues();

  var TAFSIR = "kemenag";
  var SHAIKH = "alafasy";

  ALL_NUMBERS.forEach(function(row, index) {
    var number = row[0];
    number = String(number).trim();
    
    var randomAyat = getAyatFromAPI();
    
    Logger.log(randomAyat);
  
    var arabic = randomAyat.arab;
    var indonesia = randomAyat.translation;
    
    var surahNumber = randomAyat.number && randomAyat.number.inSurah ? randomAyat.number.inSurah : 'Unknown Surah';
    var numberInSurah = randomAyat.number && randomAyat.number.inQuran ? randomAyat.number.inQuran : 'Unknown Ayat';
  
    var tafsirQuran = randomAyat.tafsir && randomAyat.tafsir[TAFSIR] && randomAyat.tafsir[TAFSIR].short 
      ? randomAyat.tafsir[TAFSIR].short 
      : 'Tafsir tidak tersedia';
  
    var audioUrl = randomAyat.audio[SHAIKH];
  
    var MessageTemplate = `*Ayat Alquran*

    {{arabic}}

    {{indonesia}}

    *(Qs. {{S}}:{{Q}})*

    *Tafsir (${TAFSIR}):*
    {{tafsir}}

    *Sedekah Jariyah*`;
    
    var Message = MessageTemplate.replace("{{arabic}}", arabic)
                                 .replace("{{indonesia}}", indonesia)
                                 .replace("{{Q}}", numberInSurah)
                                 .replace("{{S}}", surahNumber)
                                 .replace("{{tafsir}}", tafsirQuran);
    
    if (AUDIO == 2) {
      Logger.log("Mengirim Teks ke nomor: " + number);
      Logger.log("Pesan Teks: " + Message);
      sendTextMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, Message);
      
      Logger.log("Mengirim Audio ke nomor: " + number);
      Logger.log("URL Audio: " + audioUrl);
      sendAudioMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, audioUrl);
      
    } else if (AUDIO == 1) {
      Logger.log("Mengirim Audio ke nomor: " + number);
      Logger.log("URL Audio: " + audioUrl);
      sendAudioMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, audioUrl);
      
    } else {
      Logger.log("Mengirim Teks ke nomor: " + number);
      Logger.log("Pesan Teks: " + Message);
      sendTextMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, Message);
    }

    Utilities.sleep(2000);
  });
}

function getAyatFromAPI() {
  var url = "https://quran-api-id.vercel.app/random";
  var response = UrlFetchApp.fetch(url);
  var data = JSON.parse(response.getContentText());
  
  Logger.log(data);
  
  return data;
}

function sendTextMessage(YOUR_WEBSITE, API, sender, number, message) {
  var url = YOUR_WEBSITE + "/send-message";
  var payload = {
    'api_key': API,
    'number': number,
    'sender': sender,
    'message': message
  };
  
  var options = {
    'method': 'POST',
    'contentType': 'application/json',
    'payload': JSON.stringify(payload),
    'muteHttpExceptions': true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  Logger.log("Response from server: " + response.getContentText());
}

function sendAudioMessage(YOUR_WEBSITE, API, sender, number, audioUrl) {
  var url = YOUR_WEBSITE + "/send-media";
  var payload = {
    'api_key': API,
    'number': number,
    'sender': sender,
    'media_type': 'audio',
    'caption': '',
    'url': audioUrl
  };
  
  var options = {
    'method': 'POST',
    'contentType': 'application/json',
    'payload': JSON.stringify(payload),
    'muteHttpExceptions': true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  Logger.log("Response from server: " + response.getContentText());
}

lalu tambahkan trigger sesuai kebutuhan kalian. contoh 15/30/60 menit sekali


Jika pilih hybrid akan seperti ini
image.png.3b99040e17f25408d6fcf1240a908726.png

Notes
 


 

Kalau kirim dengan list message bagaimana tuan?

comment_77662
3 hours ago, Pebrian said:

SHARE QURAN VIA GOOGLE APPSCRIPT (Script quran.php dari mamank @Magd Almuntaser)

Buka Google Spreadsheets lalu buat table seperti ini ( Your Website | Apikey | Sender | Tujuan | Text/Audio/Hybrid )

image.png.197932549ec8a943dd3e735bbb1e0812.png

atau bisa copy dari ini : https://docs.google.com/spreadsheets/d/1ICpCKMOSFOxDDeipt71wDHakocBVFmQVrpmguHWcEkM/edit?usp=sharing
 

lalu pergi ke Extensi -> AppScript

lalu copas script ini ke appscript lalu save.
 

function sendQuranMessage() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var YOUR_WEBSITE = sheet.getRange('A2').getValue();
  var API = sheet.getRange('B2').getValue();
  var YOUR_NUMBER = sheet.getRange('C2').getValue();
  var AUDIO = sheet.getRange('E2').getValue();
  
  var dataRange = sheet.getRange(2, 4, sheet.getLastRow() - 1, 1);
  var ALL_NUMBERS = dataRange.getValues();

  var TAFSIR = "kemenag";
  var SHAIKH = "alafasy";

  ALL_NUMBERS.forEach(function(row, index) {
    var number = row[0];
    number = String(number).trim();
    
    var randomAyat = getAyatFromAPI();
    
    Logger.log(randomAyat);
  
    var arabic = randomAyat.arab;
    var indonesia = randomAyat.translation;
    
    var surahNumber = randomAyat.number && randomAyat.number.inSurah ? randomAyat.number.inSurah : 'Unknown Surah';
    var numberInSurah = randomAyat.number && randomAyat.number.inQuran ? randomAyat.number.inQuran : 'Unknown Ayat';
  
    var tafsirQuran = randomAyat.tafsir && randomAyat.tafsir[TAFSIR] && randomAyat.tafsir[TAFSIR].short 
      ? randomAyat.tafsir[TAFSIR].short 
      : 'Tafsir tidak tersedia';
  
    var audioUrl = randomAyat.audio[SHAIKH];
  
    var MessageTemplate = `*Ayat Alquran*

    {{arabic}}

    {{indonesia}}

    *(Qs. {{S}}:{{Q}})*

    *Tafsir (${TAFSIR}):*
    {{tafsir}}

    *Sedekah Jariyah*`;
    
    var Message = MessageTemplate.replace("{{arabic}}", arabic)
                                 .replace("{{indonesia}}", indonesia)
                                 .replace("{{Q}}", numberInSurah)
                                 .replace("{{S}}", surahNumber)
                                 .replace("{{tafsir}}", tafsirQuran);
    
    if (AUDIO == 2) {
      Logger.log("Mengirim Teks ke nomor: " + number);
      Logger.log("Pesan Teks: " + Message);
      sendTextMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, Message);
      
      Logger.log("Mengirim Audio ke nomor: " + number);
      Logger.log("URL Audio: " + audioUrl);
      sendAudioMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, audioUrl);
      
    } else if (AUDIO == 1) {
      Logger.log("Mengirim Audio ke nomor: " + number);
      Logger.log("URL Audio: " + audioUrl);
      sendAudioMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, audioUrl);
      
    } else {
      Logger.log("Mengirim Teks ke nomor: " + number);
      Logger.log("Pesan Teks: " + Message);
      sendTextMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, Message);
    }

    Utilities.sleep(2000);
  });
}

function getAyatFromAPI() {
  var url = "https://quran-api-id.vercel.app/random";
  var response = UrlFetchApp.fetch(url);
  var data = JSON.parse(response.getContentText());
  
  Logger.log(data);
  
  return data;
}

function sendTextMessage(YOUR_WEBSITE, API, sender, number, message) {
  var url = YOUR_WEBSITE + "/send-message";
  var payload = {
    'api_key': API,
    'number': number,
    'sender': sender,
    'message': message
  };
  
  var options = {
    'method': 'POST',
    'contentType': 'application/json',
    'payload': JSON.stringify(payload),
    'muteHttpExceptions': true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  Logger.log("Response from server: " + response.getContentText());
}

function sendAudioMessage(YOUR_WEBSITE, API, sender, number, audioUrl) {
  var url = YOUR_WEBSITE + "/send-media";
  var payload = {
    'api_key': API,
    'number': number,
    'sender': sender,
    'media_type': 'audio',
    'caption': '',
    'url': audioUrl
  };
  
  var options = {
    'method': 'POST',
    'contentType': 'application/json',
    'payload': JSON.stringify(payload),
    'muteHttpExceptions': true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  Logger.log("Response from server: " + response.getContentText());
}

lalu tambahkan trigger sesuai kebutuhan kalian. contoh 15/30/60 menit sekali


Jika pilih hybrid akan seperti ini
image.png.3b99040e17f25408d6fcf1240a908726.png

Notes
 


 

image.thumb.png.9e2bb217d95b67e6369df6e522b7aa35.png

 

function 6 otomatis ya 

comment_77663
On 9/9/2024 at 3:53 PM, Enno The Explorer said:

Masya Allah..Amaziing mas 😍👍👍👍

saran aja klo bisa penulisannya Ayat Al Quran | Surat: abx | Qs.01:01

sama buat pilihan terjemahan per Ayat bisa ga mas, sprt ini :
 

image.png.12b2e01f0206450ddeb1a31e3c749d8a.png

noted revisi nanti untuk ayat | surrah | QS

untuk perayat saat ini dari api nya tidak menyediakan

On 9/9/2024 at 4:38 PM, pak kacung said:

Kalau kirim dengan list message bagaimana tuan?

list message nya bagaimana?
surat 1
surat 2

apa gitu? belum coba saya mungkin bisa di kreasi sendiri 

On 9/9/2024 at 6:18 PM, Bajra Al Faruq said:

image.thumb.png.9e2bb217d95b67e6369df6e522b7aa35.png

 

function 6 otomatis ya 

untuk function 6 itu di generate otomatis /random, karna saya mengambil api nya random, dan setiap nomor yang tertempel pada "Tujuan" akan di generate satu per satu, agar menghindari spam whatsapp,

  • Author
comment_77664
2 minutes ago, Pebrian said:

noted revisi nanti untuk ayat | surrah | QS

untuk perayat saat ini dari api nya tidak menyediakan

list message nya bagaimana?
surat 1
surat 2

apa gitu? belum coba saya mungkin bisa di kreasi sendiri 

untuk function 6 itu di generate otomatis /random, karna saya mengambil api nya random, dan setiap nomor yang tertempel pada "Tujuan" akan di generate satu per satu, agar menghindari spam whatsapp,

I have done with murasaki for them via php you can use it and convert it to appscript

quran.php

  • Author
comment_77665
3 hours ago, Enno The Explorer said:

Masya Allah..Amaziing mas 😍👍👍👍

saran aja klo bisa penulisannya Ayat Al Quran | Surat: abx | Qs.01:01

sama buat pilihan terjemahan per Ayat bisa ga mas, sprt ini :
 

image.png.12b2e01f0206450ddeb1a31e3c749d8a.png


Why do you want to use appscript when the file is ready php just put it in cronjob and it will work 😅

comment_77667
On 9/9/2024 at 7:22 PM, Magd Almuntaser said:

I have done with murasaki for them via php you can use it and convert it to appscript

quran.php 21.38 kB · 0 downloads

thanks bro. i convert to appscript

Update Script

function sendQuranMessage() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var YOUR_WEBSITE = sheet.getRange('A2').getValue();
  var API = sheet.getRange('B2').getValue();
  var YOUR_NUMBER = sheet.getRange('C2').getValue();
  var AUDIO = sheet.getRange('E2').getValue();
  
  var dataRange = sheet.getRange(2, 4, sheet.getLastRow() - 1, 1);
  var ALL_NUMBERS = dataRange.getValues();

  var TAFSIR = "kemenag";
  var SHAIKH = "alafasy";

  ALL_NUMBERS.forEach(function(row, index) {
    var number = row[0];
    number = String(number).trim();
    
    var randomAyat = getAyatFromAPI();
    
    Logger.log(randomAyat);
  
    var arabic = randomAyat.arab;
    var indonesia = randomAyat.translation;
    
    var surahNumber = randomAyat.number && randomAyat.number.inSurah ? randomAyat.number.inSurah : 'Unknown Surah';
    var numberInSurah = randomAyat.number && randomAyat.number.inQuran ? randomAyat.number.inQuran : 'Unknown Ayat';
  
    var tafsirQuran = randomAyat.tafsir && randomAyat.tafsir[TAFSIR] && randomAyat.tafsir[TAFSIR].short 
      ? randomAyat.tafsir[TAFSIR].short 
      : 'Tafsir tidak tersedia';
  
    var audioUrl = randomAyat.audio[SHAIKH];
    
    var surahName = getSurahName(surahNumber);
  
    var MessageTemplate = `*Ayat Al Quran | Surat: ${surahName} | Qs: ${surahNumber}:${numberInSurah}*

    {{arabic}}

    {{indonesia}}

    *Tafsir (${TAFSIR}):*
    {{tafsir}}

    *Sedekah Jariyah*`;
    
    var Message = MessageTemplate.replace("{{arabic}}", arabic)
                                 .replace("{{indonesia}}", indonesia)
                                 .replace("{{tafsir}}", tafsirQuran);
    
    if (AUDIO == 2) {
      Logger.log("Mengirim Teks ke nomor: " + number);
      Logger.log("Pesan Teks: " + Message);
      sendTextMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, Message);
      
      Logger.log("Mengirim Audio ke nomor: " + number);
      Logger.log("URL Audio: " + audioUrl);
      sendAudioMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, audioUrl);
      
    } else if (AUDIO == 1) {
      Logger.log("Mengirim Audio ke nomor: " + number);
      Logger.log("URL Audio: " + audioUrl);
      sendAudioMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, audioUrl);
      
    } else {
      Logger.log("Mengirim Teks ke nomor: " + number);
      Logger.log("Pesan Teks: " + Message);
      sendTextMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, Message);
    }

    Utilities.sleep(2000);
  });
}

function getAyatFromAPI() {
  var url = "https://quran-api-id.vercel.app/random";
  var response = UrlFetchApp.fetch(url);
  var data = JSON.parse(response.getContentText());
  
  Logger.log(data);
  
  return data;
}

function sendTextMessage(YOUR_WEBSITE, API, sender, number, message) {
  var url = YOUR_WEBSITE + "/send-message";
  var payload = {
    'api_key': API,
    'number': number,
    'sender': sender,
    'message': message
  };
  
  var options = {
    'method': 'POST',
    'contentType': 'application/json',
    'payload': JSON.stringify(payload),
    'muteHttpExceptions': true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  Logger.log("Response from server: " + response.getContentText());
}

function sendAudioMessage(YOUR_WEBSITE, API, sender, number, audioUrl) {
  var url = YOUR_WEBSITE + "/send-media";
  var payload = {
    'api_key': API,
    'number': number,
    'sender': sender,
    'media_type': 'audio',
    'caption': '',
    'url': audioUrl
  };
  
  var options = {
    'method': 'POST',
    'contentType': 'application/json',
    'payload': JSON.stringify(payload),
    'muteHttpExceptions': true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  Logger.log("Response from server: " + response.getContentText());
}

function getSurahName(surahNumber) {
  var surahList = {
    1: 'Al-Fatiha',
    2: 'Al-Baqara',
    3: 'Aal-e-Imran',
    4: 'An-Nisa',
    5: 'Al-Maeda',
    6: 'Al-Anaam',
    7: 'Al-Araf',
    8: 'Al-Anfal',
    9: 'At-Taubah',
    10: 'Yunus',
    11: 'Hud',
    12: 'Yusuf',
    13: 'Ar-Rad',
    14: 'Ibrahim',
    15: 'Al-Hijr',
    16: 'An-Nahl',
    17: 'Al-Isra',
    18: 'Al-Kahf',
    19: 'Maryam',
    20: 'Taha',
    21: 'Al-Anbiya',
    22: 'Al-Hajj',
    23: 'Al-Mumenoon',
    24: 'An-Noor',
    25: 'Al-Furqan',
    26: 'Ash-Shuara',
    27: 'An-Naml',
    28: 'Al-Qasas',
    29: 'Al-Ankaboot',
    30: 'Ar-Room',
    31: 'Luqman',
    32: 'As-Sajda',
    33: 'Al-Ahzab',
    34: 'Saba',
    35: 'Fatir',
    36: 'Ya Seen',
    37: 'As-Saaffat',
    38: 'Sad',
    39: 'Az-Zumar',
    40: 'Ghafir',
    41: 'Fussilat',
    42: 'Ash-Shura',
    43: 'Az-Zukhruf',
    44: 'Ad-Dukhan',
    45: 'Al-Jathiya',
    46: 'Al-Ahqaf',
    47: 'Muhammad',
    48: 'Al-Fath',
    49: 'Al-Hujraat',
    50: 'Qaf',
    51: 'Adh-Dhariyat',
    52: 'At-Tur',
    53: 'An-Najm',
    54: 'Al-Qamar',
    55: 'Al-Rahman',
    56: 'Al-Waqia',
    57: 'Al-Hadid',
    58: 'Al-Mujadila',
    59: 'Al-Hashr',
    60: 'Al-Mumtahina',
    61: 'As-Saff',
    62: 'Al-Jumua',
    63: 'Al-Munafiqoon',
    64: 'At-Taghabun',
    65: 'At-Talaq',
    66: 'At-Tahrim',
    67: 'Al-Mulk',
    68: 'Al-Qalam',
    69: 'Al-Haaqqa',
    70: 'Al-Maarij',
    71: 'Nooh',
    72: 'Al-Jinn',
    73: 'Al-Muzzammil',
    74: 'Al-Muddathir',
    75: 'Al-Qiyama',
    76: 'Al-Insan',
    77: 'Al-Mursalat',
    78: 'An-Naba',
    79: 'An-Naziat',
    80: 'Abasa',
    81: 'At-Takwir',
    82: 'AL-Infitar',
    83: 'Al-Mutaffifin',
    84: 'Al-Inshiqaq',
    85: 'Al-Burooj',
    86: 'At-Tariq',
    87: 'Al-Ala',
    88: 'Al-Ghashiya',
    89: 'Al-Fajr',
    90: 'Al-Balad',
    91: 'Ash-Shams',
    92: 'Al-Lail',
     93: 'Ad-Dhuha',
     94: 'Al-Inshirah',
     95: 'At-Tin',
     96: 'Al-Alaq',
     97: 'Al-Qadr',
     98: 'Al-Bayyina',
     99: 'Al-Zalzala',
    100: 'Al-Adiyat',
    101: 'Al-Qaria',
    102: 'At-Takathur',
    103: 'Al-Asr',
    104: 'Al-Humaza',
    105: 'Al-fil',
    106: 'Quraish',
    107: 'Al-Maun',
    108: 'Al-Kauther',
    109: 'Al-Kafiroon',
    110: 'An-Nasr',
    111: 'Al-Masadd',
    112: 'Al-Ikhlas',
    113: 'Al-Falaq',
    114: 'An-Nas'
  };

  return surahList[surahNumber] || 'Unknown Surah';
}


Added Delay 2 Second before send next number
Added Title (Ayat Al Quran | Surahs $Title | Qs Title

image.png.8c3e1f2ad27c6a5dfcd285bcd0572366.png


mybe next time I migrate this all source to my storage, because full surahs in api not working

 

thanks my friend @Magd Almuntaser

  • Author
comment_77668
4 minutes ago, Pebrian said:

thanks bro. i convert to appscript

Update Script

function sendQuranMessage() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
  var YOUR_WEBSITE = sheet.getRange('A2').getValue();
  var API = sheet.getRange('B2').getValue();
  var YOUR_NUMBER = sheet.getRange('C2').getValue();
  var AUDIO = sheet.getRange('E2').getValue();
  
  var dataRange = sheet.getRange(2, 4, sheet.getLastRow() - 1, 1);
  var ALL_NUMBERS = dataRange.getValues();

  var TAFSIR = "kemenag";
  var SHAIKH = "alafasy";

  ALL_NUMBERS.forEach(function(row, index) {
    var number = row[0];
    number = String(number).trim();
    
    var randomAyat = getAyatFromAPI();
    
    Logger.log(randomAyat);
  
    var arabic = randomAyat.arab;
    var indonesia = randomAyat.translation;
    
    var surahNumber = randomAyat.number && randomAyat.number.inSurah ? randomAyat.number.inSurah : 'Unknown Surah';
    var numberInSurah = randomAyat.number && randomAyat.number.inQuran ? randomAyat.number.inQuran : 'Unknown Ayat';
  
    var tafsirQuran = randomAyat.tafsir && randomAyat.tafsir[TAFSIR] && randomAyat.tafsir[TAFSIR].short 
      ? randomAyat.tafsir[TAFSIR].short 
      : 'Tafsir tidak tersedia';
  
    var audioUrl = randomAyat.audio[SHAIKH];
    
    var surahName = getSurahName(surahNumber);
  
    var MessageTemplate = `*Ayat Al Quran | Surat: ${surahName} | Qs: ${surahNumber}:${numberInSurah}*

    {{arabic}}

    {{indonesia}}

    *Tafsir (${TAFSIR}):*
    {{tafsir}}

    *Sedekah Jariyah*`;
    
    var Message = MessageTemplate.replace("{{arabic}}", arabic)
                                 .replace("{{indonesia}}", indonesia)
                                 .replace("{{tafsir}}", tafsirQuran);
    
    if (AUDIO == 2) {
      Logger.log("Mengirim Teks ke nomor: " + number);
      Logger.log("Pesan Teks: " + Message);
      sendTextMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, Message);
      
      Logger.log("Mengirim Audio ke nomor: " + number);
      Logger.log("URL Audio: " + audioUrl);
      sendAudioMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, audioUrl);
      
    } else if (AUDIO == 1) {
      Logger.log("Mengirim Audio ke nomor: " + number);
      Logger.log("URL Audio: " + audioUrl);
      sendAudioMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, audioUrl);
      
    } else {
      Logger.log("Mengirim Teks ke nomor: " + number);
      Logger.log("Pesan Teks: " + Message);
      sendTextMessage(YOUR_WEBSITE, API, YOUR_NUMBER, number, Message);
    }

    Utilities.sleep(2000);
  });
}

function getAyatFromAPI() {
  var url = "https://quran-api-id.vercel.app/random";
  var response = UrlFetchApp.fetch(url);
  var data = JSON.parse(response.getContentText());
  
  Logger.log(data);
  
  return data;
}

function sendTextMessage(YOUR_WEBSITE, API, sender, number, message) {
  var url = YOUR_WEBSITE + "/send-message";
  var payload = {
    'api_key': API,
    'number': number,
    'sender': sender,
    'message': message
  };
  
  var options = {
    'method': 'POST',
    'contentType': 'application/json',
    'payload': JSON.stringify(payload),
    'muteHttpExceptions': true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  Logger.log("Response from server: " + response.getContentText());
}

function sendAudioMessage(YOUR_WEBSITE, API, sender, number, audioUrl) {
  var url = YOUR_WEBSITE + "/send-media";
  var payload = {
    'api_key': API,
    'number': number,
    'sender': sender,
    'media_type': 'audio',
    'caption': '',
    'url': audioUrl
  };
  
  var options = {
    'method': 'POST',
    'contentType': 'application/json',
    'payload': JSON.stringify(payload),
    'muteHttpExceptions': true
  };
  
  var response = UrlFetchApp.fetch(url, options);
  Logger.log("Response from server: " + response.getContentText());
}

function getSurahName(surahNumber) {
  var surahList = {
    1: 'Al-Fatiha',
    2: 'Al-Baqara',
    3: 'Aal-e-Imran',
    4: 'An-Nisa',
    5: 'Al-Maeda',
    6: 'Al-Anaam',
    7: 'Al-Araf',
    8: 'Al-Anfal',
    9: 'At-Taubah',
    10: 'Yunus',
    11: 'Hud',
    12: 'Yusuf',
    13: 'Ar-Rad',
    14: 'Ibrahim',
    15: 'Al-Hijr',
    16: 'An-Nahl',
    17: 'Al-Isra',
    18: 'Al-Kahf',
    19: 'Maryam',
    20: 'Taha',
    21: 'Al-Anbiya',
    22: 'Al-Hajj',
    23: 'Al-Mumenoon',
    24: 'An-Noor',
    25: 'Al-Furqan',
    26: 'Ash-Shuara',
    27: 'An-Naml',
    28: 'Al-Qasas',
    29: 'Al-Ankaboot',
    30: 'Ar-Room',
    31: 'Luqman',
    32: 'As-Sajda',
    33: 'Al-Ahzab',
    34: 'Saba',
    35: 'Fatir',
    36: 'Ya Seen',
    37: 'As-Saaffat',
    38: 'Sad',
    39: 'Az-Zumar',
    40: 'Ghafir',
    41: 'Fussilat',
    42: 'Ash-Shura',
    43: 'Az-Zukhruf',
    44: 'Ad-Dukhan',
    45: 'Al-Jathiya',
    46: 'Al-Ahqaf',
    47: 'Muhammad',
    48: 'Al-Fath',
    49: 'Al-Hujraat',
    50: 'Qaf',
    51: 'Adh-Dhariyat',
    52: 'At-Tur',
    53: 'An-Najm',
    54: 'Al-Qamar',
    55: 'Al-Rahman',
    56: 'Al-Waqia',
    57: 'Al-Hadid',
    58: 'Al-Mujadila',
    59: 'Al-Hashr',
    60: 'Al-Mumtahina',
    61: 'As-Saff',
    62: 'Al-Jumua',
    63: 'Al-Munafiqoon',
    64: 'At-Taghabun',
    65: 'At-Talaq',
    66: 'At-Tahrim',
    67: 'Al-Mulk',
    68: 'Al-Qalam',
    69: 'Al-Haaqqa',
    70: 'Al-Maarij',
    71: 'Nooh',
    72: 'Al-Jinn',
    73: 'Al-Muzzammil',
    74: 'Al-Muddathir',
    75: 'Al-Qiyama',
    76: 'Al-Insan',
    77: 'Al-Mursalat',
    78: 'An-Naba',
    79: 'An-Naziat',
    80: 'Abasa',
    81: 'At-Takwir',
    82: 'AL-Infitar',
    83: 'Al-Mutaffifin',
    84: 'Al-Inshiqaq',
    85: 'Al-Burooj',
    86: 'At-Tariq',
    87: 'Al-Ala',
    88: 'Al-Ghashiya',
    89: 'Al-Fajr',
    90: 'Al-Balad',
    91: 'Ash-Shams',
    92: 'Al-Lail',
     93: 'Ad-Dhuha',
     94: 'Al-Inshirah',
     95: 'At-Tin',
     96: 'Al-Alaq',
     97: 'Al-Qadr',
     98: 'Al-Bayyina',
     99: 'Al-Zalzala',
    100: 'Al-Adiyat',
    101: 'Al-Qaria',
    102: 'At-Takathur',
    103: 'Al-Asr',
    104: 'Al-Humaza',
    105: 'Al-fil',
    106: 'Quraish',
    107: 'Al-Maun',
    108: 'Al-Kauther',
    109: 'Al-Kafiroon',
    110: 'An-Nasr',
    111: 'Al-Masadd',
    112: 'Al-Ikhlas',
    113: 'Al-Falaq',
    114: 'An-Nas'
  };

  return surahList[surahNumber] || 'Unknown Surah';
}


Added Delay 2 Second before send next number
Added Title (Ayat Al Quran | Surahs $Title | Qs Title

image.png.8c3e1f2ad27c6a5dfcd285bcd0572366.png


mybe next time I migrate this all source to my storage, because full surahs in api not working

 

thanks my friend @Magd Almuntaser


put the codes in a file and attach it to the attachments so that your comment does not take too long 😅
Thank you for your effort 🙏

comment_77671
On 9/9/2024 at 7:40 PM, Magd Almuntaser said:


put the codes in a file and attach it to the attachments so that your comment does not take too long 😅
Thank you for your effort 🙏

your welcome bro.

In some surahs from archive org, api could not get them, because the repository may be dead.. https://quran-api-id.vercel.app/surahs

  • Author
comment_77672
50 minutes ago, Fud said:

Tidak bisa generate SSlScreenshot_2024-09-09-20-21-16-704_com.android.chrome-edit.thumb.jpg.82bf6d0d354ff5b3565b83e2feb266ff.jpg

Yes, sometimes the service does not work with everyone, this depends on what Let's Encrypt agrees with.. My programming when you press the generate button requests a certificate from Let's Encrypt, and they are the main controllers of approval or rejection

You can create SSL manually for free. You can enter in Google (ssl free) and more than one site will appear that offers SSL for free. After that, you can follow pages 40 and 41 for how to install the certificate

comment_77674

@Magd Almuntaser

I have two questions:

1-

Sometimes when using the QR-Code API for a number I’ve used before, it gives me an invalid data error.

And to connect with the same number, it doesn't work. The user had to add the number manually and, for example, change the last digit.

That was my first question.

2-

I have a website that uses mpwa v5, and it’s working fine, but I want to upgrade to the latest version mpwa v8. I want to migrate the same user data and keep the numbers connected.

So, I’m supposed to take the database and adjust it to be compatible with the latest version. However, the users' connected devices are not remaining connected. What are the folders that I should take and transfer?

Here are some updates that may be useful in the next version :

  • Create an API for creating campaigns with a list of numbers And another API for returning a campaign report information .
  • In planning system , add an option for each plan to set a limit on daily or monthly messages, or make it unlimited.
comment_77675
On 9/6/2024 at 5:05 PM, Getthecodenow said:

@Unicode now node connected but show waiting for node server on whatsapp connect 
QR not generateimage.thumb.png.469c03753171c03b02542d51746622e9.png

image.png

hi bro try to change theme to another theme, i face this issue too but after i change my theme its working.

 

Edited by Dewa IQOOZ7

  • Author
comment_77677
1 hour ago, Abdulrahman Mohamed said:

@Magd Almuntaser

I have two questions:

1-

Sometimes when using the QR-Code API for a number I’ve used before, it gives me an invalid data error.

And to connect with the same number, it doesn't work. The user had to add the number manually and, for example, change the last digit.

That was my first question.

2-

I have a website that uses mpwa v5, and it’s working fine, but I want to upgrade to the latest version mpwa v8. I want to migrate the same user data and keep the numbers connected.

So, I’m supposed to take the database and adjust it to be compatible with the latest version. However, the users' connected devices are not remaining connected. What are the folders that I should take and transfer?

Here are some updates that may be useful in the next version :

  • Create an API for creating campaigns with a list of numbers And another API for returning a campaign report information .
  • In planning system , add an option for each plan to set a limit on daily or monthly messages, or make it unlimited.

1- I think the number is logged out when trying to register a number that has already been registered .. I will review this issue.
2- you can transfer from 5v to 8.0.5 with these steps:
First: Make a backup of the entire previous script in case of any problems.
Secondly: make a backup of the (credentials) folder and the (.env) file.
Third: Remove the previous script files and upload the new version 8.0.5 and unzip it.. and return the credentials folder and the .env file.
Fourth: You must transfer the new variables from the new .env file to the existing .env file because there are new variables such as THEME_NAME and CHATGPT_URL, etc.
Sixth: This is the most important step. Open the following link in a browser until the number 0 appears. This way you will have updated your version:
 

http://yoursite.com/migrate
http://yoursite.com/storage-link

Note: If you see that there is a problem and it tells you that you need to scan the QR, you should change the APP_NAME to the old name in the old .env file and replace the credentials folder again.

As for the features:
Yes, I will do (create campaigns) via the API, and it is in my plan to use it in the plugins that I will develop for WordPress and WHMCS. However, it will be complicated to use unless you are a programmer who will know how to use it because you will use media, text, vcard, etc. through it, and it will be POST, not GET. Therefore, until now, I have not developed it, but it is in the plan.

Yes, I will set a limit for devices and the number of messages allowed for each number..and activate and deactivate features such as sending a normal message, a media message, etc.. Yes, there will be complete control over the plans so that the admin can set appropriate plans for his users.

49 minutes ago, Dewa IQOOZ7 said:

hi bro try to change theme to another theme, i face this issue too but after i change my theme its working.

 

 

btw sorry i want to ask, how to get api_key 😄

from user setting:
image.png.bed896f183583fe0762cefbc5599319c.png

comment_77688

QR Code not shown, just loading...

Even Node.js was created with NPM. There is any new Tutorial to install this script. You tube have old version tutorial.

In this version, the PORT disconnect issue shown .

download - 2024-09-09T133523.153.png

download - 2024-09-09T035513.934.png

  • Author
comment_77689
11 minutes ago, Owias said:

QR Code not shown, just loading...

Even Node.js was created with NPM. There is any new Tutorial to install this script. You tube have old version tutorial.

In this version, the PORT disconnect issue shown .

download - 2024-09-09T133523.153.png

download - 2024-09-09T035513.934.png


edit .env file:
 

APP_URL=http://yoursite.com
WA_URL_SERVER=http://yoursite.com:3100
TYPE_SERVER=other

and make sure you enter http not https ..
and try restart nodejs

comment_77690

Same issue.

I have tried everything. Can you install it for me. or do you have any Authantic tutorial?

There are 2 directries auto created in root side. I think so there is node js app issue or director issue.
 

download - 2024-09-10T025219.813.png

download - 2024-09-10T025418.115.png

  • Author
comment_77692
8 minutes ago, Owias said:

Same issue.

I have tried everything. Can you install it for me. or do you have any Authantic tutorial?

There are 2 directries auto created in root side. I think so there is node js app issue or director issue.
 

download - 2024-09-10T025219.813.png

download - 2024-09-10T025418.115.png

Ok send you details DM

comment_77698
12 hours ago, Magd Almuntaser said:

I have done with murasaki for them via php you can use it and convert it to appscript

quran.php 21.38 kB · 12 downloads

pakai script ini jika penerima ada 3 nomor,pesan langsung terkirim ke 3 nomor sekaligus dengan isi pesan yang sama. apakah bisa dibuat ada delay antar nomor dan pesan yang terkirim acak (tidak sama)

terima kasih sebelumnya mr. @Magd Almuntaser

comment_77699
1 hour ago, Jei Grey said:

pakai script ini jika penerima ada 3 nomor,pesan langsung terkirim ke 3 nomor sekaligus dengan isi pesan yang sama. apakah bisa dibuat ada delay antar nomor dan pesan yang terkirim acak (tidak sama)

terima kasih sebelumnya mr. @Magd Almuntaser

iya. baru juga mau komen yang sama. jadi +1 aja

sekalian tambahkan hadits juga bang @Magd Almuntaser

 

kalau utk delay @Jei Grey tinggal tambahkan sleep aja

image.png.ec2a401abf66d52b556465c262637deb.png

Edited by kecoamumet

comment_77701

@Gusik Prasetyo 🥰

On 8/25/2024 at 6:22 PM, Gusik Prasetyo said:

this tutorial to make MPWA autoreply using google sheet plus apps script.

1. make new sheet file using this format (1st row) Keyword, Type, Message, File

you can visit:

https://docs.google.com/spreadsheets/d/1svHPPF3hFyaPfkRxzN1wscR5A5bS21MzcjrH3NO51us/edit?usp=sharing

wsheet.jpg.b1a25516ac39374325eba53c0b89909e.jpg

 

2. then go to Extensions - Apps Script

appsscript.jpg.6ed7295ddac47fc78a363f1d113e9957.jpg

 

3. delete all data on there. copy and paste code bellow. and edit with your own data.

 

function doPost(e) {
    var data =  e.postData.contents;
    var json = JSON.parse(data);
    var number = json['from'];
    var senderMessage = json['message'];
    var file = json['bufferImage'];
    var pesan = senderMessage.toLowerCase();
    var newMessage = pesan.split(" ");
    var searchreply = autoreply(newMessage[0]);
    var type = searchreply[1];
    var messagetosend = searchreply[2];
    var file = searchreply[3];
    if(type == "file"){
        sendWaFile(number, messagetosend, file);
    } else if(type == "button") {
        sendWaButton(number, messagetosend, file);
    } else if(type == "list") {
        sendWaList(number, messagetosend, file);        
    } else {
        sendWaText(number, messagetosend);
    }
}
 
function autoreply(message){
  var sheetUrl = "https://docs.google.com/spreadsheets/d/1svHPPF3hFyaPfkRxzN1wscR5A5bS2jsdhjsdhuheheh/edit?usp=sharing"; //ganti dengan URL sheet kamu
  var sheetfile = SpreadsheetApp.openByUrl(sheetUrl);
  var sheet = sheetfile.getSheetByName("autoreply"); //sesuaikan dengan nama sheet yg d buat
  var data = sheet.getDataRange().getValues()
  var filterData = data.filter(function(keyword){
    if(keyword[0] == message){
      return keyword
      }        
    })
    if(filterData.length>0){
        return filterData[0]
    }
}
 
function sendWaText(number, messagetosend) {
  var APIKey = "Hcu8aDaGnxI6Utf9kWjQsjlpX5taFy" //ganti dengan API
  var sender = "628xxxxxxxxxx"  // ganti nomer HP
  var url = "https://websitekamu/send-message"; //ganti website
  var msgtext = {
    'api_key': APIKey,
    'sender': sender,
    "number": number,
    'message': messagetosend,
    };
  var response = UrlFetchApp.fetch(url, {
    "method": "POST",
    "contentType": "application/json",
    "payload" : JSON.stringify(msgtext),
      });
    Logger.log(response.getContentText());
}
 
//untuk kirim file
function sendWaFile(number, messagetosend, file){
  var APIKey = "Hcu8aDaGnxI6Utf9kWjQsjlpX5taFy" //ganti api
  var sender = "628000000000" // ganti nomer HP
  var url = "https://websitekamu/send-media"; //ganti website
  var msggmbr = {
    "api_key": APIKey,
    "sender": sender,
    "number": number,
    "media_type" : "image",
    "caption": messagetosend,
    "url": file
    }
  var response = UrlFetchApp.fetch(url, {
    "method": "POST",
    "contentType": "application/json",
    "payload" : JSON.stringify(msggmbr),
      });
    Logger.log(response.getContentText());
}
 
//fungsi button tidak bisa
//http://yourhost.com/send-button?sender=nomersender&api_key=yourapikey&number=nomertujuan&url=&footer=optional&message=Halo,ini pesan button&button=button 1,button 2,button 3
function sendWaButton(number, messagetosend, file){
  //var APIKey = "blablabla"
  //var sender = "blablabla"
  var url = "https://alamatwebsite/send-button";
  var msgbut = {
    "sender" : sender,
    "api_key" : APIKey,
    "number" : number,
    "url" : null,
    "footer" : "optional",
    "message" : messagetosend,
    "button" : file
    }
  var response = UrlFetchApp.fetch(url, {
    "method": "POST",
    "contentType": "application/json",
    "payload" : JSON.stringify(msgbut),
    });
    Logger.log(response.getContentText());
}

 

4. in left menus, choose Triggers

triggers.jpg.cf553ed27faf0ebcc6e40f9dffd666e5.jpg

 

5.  Click Add Trigger button in right bottom corner.

6.  make setting like picture bellow. click SAVE.

addtriger.jpg.053a6e898130aefe117adc67f4b4b4e7.jpg

 

7. Click DEPLOY in right top corner.

8. Select type: WEB APP. and make setting like picture. Click DEPLOY to finish it.

autowebhook.jpg.e2e67fa05cab4a05cba124d11bf07979.jpg

 

9. copy url and paste in your MPWA webhook. 

copyurl.jpg.581873383fcb7afc4a375c106be29699.jpg

 

 

@Enno The Explorer @JangE  thanks to @bloserda who teach me about this script.

Glad to hear that, lancar kang? 🥰

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.


Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Recently Browsing 1

Latest Updated Files