Halaman otomatis terbuka saat ada panggilan masuk dengan Apps Script
The website URL can be automatically displayed when an incoming call is received. If the URL of the web app's search results page follows a specific pattern, the URL can be used to search for the customer matching the phone number of the original call. If you use Google Sheets, you can also use Apps Script.
How it works?
1. Opening Google Apps Script
Open Google Sheets.
Click on
Extensions>Apps Scriptfrom the menu.This will open the Google Apps Script editor in a new window.
2. Writing Your First Script
In the editor, you’ll see an empty function called
function myFunction().You can write your own code according to your data, or use the sample code we have provided here:
function doGet(e) {
var htmlOutput = HtmlService.createHtmlOutput();
var phoneNumber = e.parameter.phoneNumber;
if (!phoneNumber) {
htmlOutput.append("<p>Please provide a phone number.</p>");
return htmlOutput;
}
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = sheet.getDataRange().getValues();
for (var i = 1; i < data.length; i++) { // assuming the first row is headers
if (data[i][15] == phoneNumber) { // assuming phone numbers are in the 16th column (index 15)
htmlOutput.append("<p>ID: " + data[i][1] + "</p>");
htmlOutput.append("<p>UPDATE: " + data[i][2] + "</p>");
htmlOutput.append("<p>SHIPPER: " + data[i][3] + "</p>");
htmlOutput.append("<p>CONSIGNEE: " + data[i][4] + "</p>");
htmlOutput.append("<p>ADDRESS: " + data[i][6] + "</p>");
htmlOutput.append("<p>STATUS: " + data[i][10] + "</p>");
found = true;
}
}
htmlOutput.append("<p>No data found for phone number: " + phoneNumber + "</p>");
return htmlOutput;
}3. Adding a Deployment
Once your script is ready, you might want to share it with others or trigger it from a web app. You can do this by deploying your script.
Click on the
Deploybutton in the top-right corner of the editor.Select
Test deploymentsorManage deployments.Choose
New deployment.In the deployment setup, select the type of deployment you want:
Web App: If you want to make the script accessible via a URL.
Set the necessary permissions, such as who can access the web app.
Once configured, click
Deploy. You will receive a URL or access link to your deployed app.

If you have obtained your Web App URL, you can proceed to MiiTel Admin to add the Web App link provided by Apps Script. Here’s how:
4. Copy a URL to MiiTel Admin
Visit https://account.miitel.jp/v1/signin and log in to MiiTel Analytics.
Click
Open MiiTel Admin on the top right of the page.
Click Call Settings > Softphone Setting.
For Page to open upon an incoming call, enter the URL of the page you would like to display when you receive an incoming call.
After adding the URL, in the
Merge Fieldssection, selectPhone Number.And click Save

Was this helpful?