05 Jan, 23

Now you can automate Whatsapp notifications your Appointments, Meetings, Events, Birthday Wishes, Dates to Remember with Google Sheet. Learn how to send whatsapp notifications with google sheet by following these steps:

  • Give your sheet a name for example: Send notifications from Whatsender
  • Customize the four columns as shown in the image below

  • Select column A
  • Go to the Format menu and select Number / Date and Time

  • Customize the second row as shown in the image to test.
  • Pay attention to the cell “Day and Hour” must be formatted as | day/month/year – hour/minute | set the time to send the notification
  • For testing we suggest a few minutes after your current date and time.
  • Go to the Extensions menu and select Apps Script
#image_title
  • Copy and paste this script into your Apps Script deleting the existing lines
function myFunction() {

  var Whatsender_API = "https://api2.whatsender.it:10003/send?receiver="

  var Token_API = 'NHbTiAuewksKO5OtOWOwa' //replace with your own token
  var Telefono_Mittente = '39345123457' //replace with your number


  var values = SpreadsheetApp.getActiveSheet().getDataRange().getValues();
  for(n=1;n<values.length;++n){
    
    var cv = values[n][0];
    // More information on timezone: https://www.analyticstraps.com/utc-vs-gmt-vs-getspreadsheettimezone/
    var cell_date = Utilities.formatDate(new Date(cv),"GMT+1","dd/MM/yyyy-HH:mm");
    var today = (Utilities.formatDate(new Date(),"GMT+1","dd/MM/yyyy-HH:mm"));

    Logger.log("DATE TODAY " + today)
    Logger.log("DATE CELL " + cell_date)

    if (today == cell_date) {

      UrlFetchApp.fetch(Whatsender_API + values[n][2] + "&msgtext=" + values[n][3] + "&sender=" + Telefono_Mittente + "&token=" + Token_API);
      Logger.log(Whatsender_API + values[n][2] + "&msgtext=" + values[n][3] + "&sender=" + Telefono_Mittente + "&token=" + Token_API);
    }
  }
}

// FINE SCRIPT
  • Modify the script by pasting your Token_API and your Telephone_Sender that you find on the Whatsender Devices page

  • You can change the 2 Timezones of your country which are now set in the script to “GMT+1” more info on Timezone
  • Make sure you have replaced API_Token and Sender_Phone in your Google script
  • Now we can save and run the script as shown in the image
  • After saving, press the execute button, and wait for the authorization windows to appear
  • It is necessary to give all permissions

  • Now it is necessary that the script is authorized as you can see from the following images

 

 

 

  • The last step is to run the script from every minute
  • Go to Apps Script and select the Triggers button from the left menu

  • Click the button on the bottom right “Add Activator”
  • From the window that will appear, select the time execution in minutes as you see in the image

  • If you have configured everything as described and the date and time of the google sheet is equal to the current time, you will see send your notification from your phone Whatsapp.

Serve Aiuto?