Currently, many Japanese companies have put in use reception systems using iPads. This time we will try it another way through using Google Home and some other services.
As a result, visitors’ information will be saved on the Spreadsheet and will be displayed and shot to Slack to notify Slack team members of having visitors to the company and reception.
Current Status
In the past, using a paper and a bell to notify employees of a company to pick out when customers came to the company.
The steps are usually filled out the personal information and the company then press the bell, there will be staff to welcome.
Instead, let us use GoogleHome to accomplish this task.
Structure diagram
Investment costs
With only a few hundred K, we have one Google Home. Hesitate without investing immediately.
Step
1. Register the formula into IFTTT
First we need to register the formula so that Google Home can respond by IFTTT. Select Google Assistant.
■ Input the Complete trigger fields
Entering 受 付 (receptionist) GGH will correspond to this Key.
To come here you just need to say 「OK! Google 受 付 株式会社 ◯◯ の 名 前 」「 OK! If I were ◯◯ from XYZ company thì the information would be recorded.
■ Input Update cell in spreadsheet
Which cell: Select B2 as the cell to be written.
2. Talk with Google Home
3. Edit spreadsheet of Google Drive
Add the “Visitors” sheet to the IFTTT folder.
■ Add Script
Click on Script editor in the tool and add the script.
■ Edit Script
From Google Home, the data will usually be updated in cell B2.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | function showStatus() { var mySheet = SpreadsheetApp.getActiveSheet(); // get sheet var currentRow = mySheet.getActiveCell().getRow(); // get dòng được update var myCell = mySheet.getActiveCell(); // get cell active if(myCell.getColumn() == 2) { // Check có phải là cột số 2 hay ko(Trường hợp spreadsheet sẽ là hàng B) // Ngày tháng update sẽ được ghi vào A1 var updateRange = mySheet.getRange('A' + currentRow); updateRange.setValue(Utilities.formatDate(new Date(), 'Asia/Tokyo', 'yyyy/M/d H:m:s')); var text = myCell.getValue() + '様が来訪されました'; // Ngài... đã đến thăm công ty slackPost(); // Thêm dòng mới mySheet.insertRowBefore(2); } function slackPost() { var url = 'https://slack.com/api/chat.postMessage'; var token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; var channel = '#チャンネル名'; // Tên Channel var username = '来訪通知'; // Báo có khách đến thăm var parse = 'full'; var icon_emoji = ''; var method = 'post'; var payload = { 'token' : token, 'channel' : channel, 'text' : text, 'username' : username, 'parse' : parse, 'icon_emoji' : icon_emoji }; var params = { 'method' : method, 'payload' : payload }; var response = UrlFetchApp.fetch(url, params); } } |
■ Get Slack token
In the script there is note get token of Slack. https://api.slack.com/custom-integrations/legacy-tokens
■ Rigister trigger run script
After the Spreadsheet value has been updated, run the script.
Trigger of the current project.
■ Example of Record
After performing the above steps, the actual will have the following noti: Just like the format we set above:
With username: 来訪 通知
Content: myCell.getValue () + ‘様 が 来訪 さ れ ま し た’
The content of GGsheet will automatically be updated as follows:
As the source above, the date will be updated in column A, corresponding to the KH talk content in column B.
New data will always be inserted into A2 and B2, respectively.