вторник, 1 января 2019 г.

How to Make Phone Numbers Callable in Google Sheets / Как сделать кликабельные телефонные ссылки в таблицах гугл

  1. Делаем всё как у  Amit Agarwal  по этой ссылке → link        
            
          
  2. Только обработчик делайте свой. Кстати  так можно собирать пары номер/имя контакта ;)
    
//Here is an example of my code:
function doGet(e) {
return HtmlService.createHtmlOutput("<script>window.top.location.href='tel:"+e.pathInfo+"';</script>");
}

//this is a function that fires when the webapp receives a POST request
function doPost(e) {
return HtmlService.createHtmlOutput("post request received");
}

//You need to publish this script as web-app lunching from yourself withanyone including anonymous users. 
//After you'll get url like this https://script.google.com/macros/s/AKfycbz3ts_vUuQTNwRy02KUu7XYw/exec
//So if you append / and phone number with leading symbol plus after .../exec → like this .../exec/+79031234567 it will work