
始める前に
- ラボでは、Google Cloud プロジェクトとリソースを一定の時間利用します
- ラボには時間制限があり、一時停止機能はありません。ラボを終了した場合は、最初からやり直す必要があります。
- 画面左上の [ラボを開始] をクリックして開始します
Create the app
/ 40
Create the Apps Script project
/ 30
Create the calendar event
/ 30
Apps Script is a cloud-based JavaScript platform that lets you automate tasks across Google products. With Apps Script, you write code in modern JavaScript and have access to built-in libraries for Google Workspace applications. AppSheet supports integration with Apps Script from within your AppSheet app by calling an Apps Script script from an AppSheet automation bot.
In this lab, you learn how to perform the following tasks:
Create an Apps Script project that includes simple code to create an event on Google Calendar.
Implement an automation bot in AppSheet that invokes Apps Script from a sample app.
Test the bot and verify that the calendar event is created.
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long lab resources will be made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It gives you new, temporary credentials to sign in and access AppSheet for the duration of the lab.
To complete this lab, you need:
Access to a standard internet browser (Chrome browser recommended).
Time to complete the lab.
Make sure you sign in to the lab using an incognito window.
When ready, click .
A new panel will appear with the temporary credentials that you must use for this lab.
If you need to pay for the lab, a pop-up will open for you to select your payment method.
Note your lab credentials. You will use them to sign in to AppSheet for this lab.
Click Open AppSheet to open the AppSheet UI in a separate browser tab or incognito window.
Click to sign in with Google.
In the Sign in with Google dialog, enter the provided Username, and click Next.
Enter the provided Password and click Next.
Click Accept to accept the terms.
To enable AppSheet to access the Google Drive folders associated with your lab account, on the AppSheet consent page, click Allow.
You're now signed in to AppSheet.
To view the AppSheet MyApps page, click X in the top-right corner of the Tell us about you so we can make better recommendations dialog.
The MyApps page might be empty since you do not have any apps yet.
When working on your own app, you normally would incrementally build the app over a continuous project timeline.
Apps that you build are saved and accessible in the Recent section on the Apps page until they are deployed and published.
In this task, you create the app that was built in a previous lab, using a template.
In the lab environment, the app built in a previous lab might still be listed in the Recent section. You cannot use this app to continue working on this lab because the underlying data is not available for use by the app.
The app must first be deleted before you continue with this lab.
If the Employee Onboarding
app is listed, on the 3-dots menu, click Delete.
To confirm the deletion, click Delete.
To continue building the Employee Onboarding
app in this lab, you must first recreate the app from a template.
To copy the Employee Onboarding app to your AppSheet account, click the link: Employee Onboarding
In the app preview, click Accept.
In the left navigation menu, click Copy app ().
In the Copy app form, for App name, type Employee Onboarding, and leave the remaining settings as their defaults.
Click Copy app.
AppSheet creates the app and copies the Google sheet that is used by the app to the /appsheet/data/EmployeeOnboarding-nnnnnnn
folder under the My Drive folder on Google Drive.
To go to the AppSheet editor, click Customize your app.
You can also access the app from the Apps page in the AppSheet UI under Owned by me.
Your app is set up with the original employee data, and you can now continue to build out the app's functionality.
Click Check my progress to verify the objective.
To use Apps Script, you create an Apps Script project that contains your Javascript code, libraries, and other files. In this task, you create a project and a simple function that creates an event on Google Calendar.
In a separate browser tab, navigate to drive.google.com.
In the navigation menu, click + New > More > Google Apps Script.
A new Apps Script project is created and displayed in a separate browser tab.
To rename the project, click the Untitled project, and in the Rename Project dialog, type Calendar Project, and then click Rename.
In the navigation menu, click Project Settings ().
In General Settings, for Time zone, select your current time zone.
To open the editor pane, in the navigation menu, click Editor ().
Copy and paste the following script code into the main project code pane, replacing the empty function:
To save the project, in the top bar, click Save (). A folder is created on Google Drive that contains your Apps Script project files.
AppSheet provides a sample project that contains a set of functions which you can use to help get started with integrating Apps Script in AppSheet automation.
Click Check my progress to verify the objective.
The next task is to create an automation bot in AppSheet and configure it with an event, process, and task to call a script.
The bot will use the Apps Script script created in the previous task to schedule a follow-up meeting on Google Calendar.
To create an automation bot, in the AppSheet UI, in the left navigation bar, click Automation () > Bots, and click Create a new Bot (+).
Click Create a new bot.
For the New Bot, click More () and Rename to Schedule follow-up meeting.
To configure an event that will trigger the bot, click Configure event.
For the Event name, type Follow-up meeting required, and press ENTER.
In the Settings pane, specify the following, and leave the remaining settings as their defaults:
a. For Event Type, click Data Change.
b. To trigger the bot for updates to the data rows in a table, click Updates only.
c. For Table, select Training.
d. For Condition, click Filter ().
In the Expression Assistant form, for Condition for event follow-up meeting required (Yes/No), type AND(ISNOTBLANK([Follow-up scheduled]), [Follow-up scheduled] > TODAY())
e. Click Save in the Expression Assistant form.
Continue configuring the process and its steps to be executed by the bot. Each step is configured to run a task when it is executed.
For Run this Process, click the arrow, and select Create new process, and then enable Linking.
To change the process name, click Process for Schedule follow-up meeting - 1, and type Create follow-up meeting
To add a step to the process, click Add a step.
For the Step name, type Create calendar meeting, and press ENTER.
To create a task, in the Settings pane, enable Linking.
a. For Task name, type Create calendar meeting with Apps Script
b. For the type of task, click Call a script.
c. For the Table name, select Training.
d. For the Apps Script Project, click the folder (), and select the Calendar Project that you created in an earlier task.
e. Click Authorize to authorize the Apps Script project to run.
i. Sign in to your Google Cloud account with your lab credentials.
ii. To allow the Calendar Project to access your calendars on Google Calendar, click Allow.
f. For the Function Name, select the createCalendarEvent function.
h. For the Function Parameters:
i. For title, click Filter (). In the Expression Assistant form, for Function parameter: title, type CONCATENATE("Follow-up meeting with: ", [Employee ID].[Name])
ii. Click Save in the form.
iii. For startDateTime, click Filter (). In the Expression Assistant form, for Function parameter: startDateTime, type [Follow-up scheduled], and click Save.
iv. For endDateTime, click Filter ().
v. In the Expression Assistant form, for Function parameter: endDateTime, type [Follow-up scheduled] + "000:30:00", and click Save.
To save your changes to the app, click Save.
In this task, you update the training record for an employee to set a follow-up meeting date and time in the app. You verify that the automation bot executes and a calendar meeting is created on Google Calendar.
To view and update employee training records, create a view in the app.
In the AppSheet editor, in the left navigation bar, click App () > Views ().
To add a new view, click Add View (+).
Click Create a new view.
In the new view form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
View name |
Training |
For this data |
Training |
View type |
table |
Position |
next |
Click Save.
The Training view is created and is now accessible from the app's navigation bar.
To view employee training records, in the navigation bar of the app preview, click Training.
To view and edit the training record of Employee1, Click Employee 1, and then click Edit ().
To edit the Follow-up scheduled date, type tomorrow's date and set an appropriate time.
For example, to schedule the follow-up meeting for May 25, 2023 at 9 AM, type: 05/25/2023 09:00:00 AM
Click Save in the app preview.
In a separate browser tab, navigate to calendar.google.com.
If prompted, sign in using your lab credentials.
Verify that an event is created on your calendar for the specified date and time. Also verify that the duration of the event is 30 minutes. You can now edit the event details to add the employee, other guests, description, etc.
Click Check my progress to verify the objective.
You've successfully integrated your AppSheet app with Google Apps Script.
In this lab, you learned how to perform the following tasks:
When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2022 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
このコンテンツは現在ご利用いただけません
利用可能になりましたら、メールでお知らせいたします
ありがとうございます。
利用可能になりましたら、メールでご連絡いたします
1 回に 1 つのラボ
既存のラボをすべて終了して、このラボを開始することを確認してください