
始める前に
- ラボでは、Google Cloud プロジェクトとリソースを一定の時間利用します
- ラボには時間制限があり、一時停止機能はありません。ラボを終了した場合は、最初からやり直す必要があります。
- 画面左上の [ラボを開始] をクリックして開始します
App created
/ 25
File automation task created
/ 25
Inspection files created
/ 25
AppSheet enables you to create files and reports for your app with automation. The data for the file or report comes from the tables used by the app. As your app is used and the data is updated, the generated file contains the latest app data.
With automation, you can generate a file or report on a regular schedule or based on a data change event in the app.
In this lab, you learn how to perform the following tasks:
Create a simple template to generate a file with AppSheet automation.
Create and configure a task, process, data change event, and bot to generate a file on Google Drive.
Use a template with start expressions to generate a report.
Create and configure a task, process, scheduled event, and bot to send an email with the generated report as an attachment.
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 be deleted before you continue with this lab.
If the Facility Inspections
app is listed, on the 3-dots menu, click Delete.
To confirm the deletion, click Delete.
To continue building the Facility Inspections
app in this lab, you must first recreate the app from a template.
To copy the Facility Inspections app to your AppSheet account, click the link: Facility Inspections
In the app preview, click Accept.
In the left navigation menu, click Copy app ().
In the Copy app form:
a. For App name, type Facility Inspections
b. For Category, select Inspections & Surveys.
Leave the remaining settings as their defaults, and click Copy app.
AppSheet creates the app and copies the Google sheet that is used by the app to the /appsheet/data/FacilityInspections-nnnnnnn
folder under the My Drive folder on Google Drive.
Click Customize your app to go to the AppSheet editor.
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 facilities data source, and you can now continue to build out the app's functionality. In this lab, you will create automation bots to generate files and reports on the inspection data used in the app.
Click Check my progress to verify the objective.
AppSheet automation includes a task category that creates a file on your cloud provider's file system.
In this task, you create and configure the automation components to create a file on Google Drive. The file will contain the data for a newly created facility inspection.
In the AppSheet UI, in the left navigation bar, click Automation () > Tasks.
To create a task, click Create a new Task (+).
In the new task form, specify the following:
Property |
Value (type or select) |
Task category |
Create a new file |
Task name |
Create inspection file |
Table name |
Inspections |
HTTP Content Type |
You use a template to provide and format the contents of the generated file. For Template, click Create.
AppSheet creates a template file on Drive and displays the document ID.
To view the contents of the template, click View.
Edit the template to make the following changes:
a. Change the title heading from Create inspection file to Inspection file.
b. Add a header below the title: Created on: <<_TODAY>>
Format the header as a Heading 2 header in the Google doc.
In the AppSheet editor, for File Name Prefix, click Filter ().
In the Expression Assistant form, for File name prefix expression for action Create inspection file (Text), delete AppSheetDoc, and type [Status].
The data from each individual passed or failed inspection will be stored in its own file on Drive.
In the Expression Assistant, click Save.
Leave the remaining settings as their defaults for the task, and click Save.
Next, you create a process with a step that will execute the file creation task that was created earlier.
In the AppSheet UI, in the left navigation bar, click Automation () > Processes.
To create a process, click Create a new Process (+).
For the New Process, click More () and Rename to Create inspection file.
For Table, select Inspections. This process uses the Inspections table.
To add a step to the process, click Add a step.
For Step name, type Create inspection data file, and press ENTER.
Click the Create inspection data file step.
For the type of step, select Run a task, and then select the Create inspection file task that was created earlier.
Click Save.
With the process and task created, you now create and configure an event that triggers a bot to run the process.
In the AppSheet UI, in the left navigation bar, click Automation () > Events.
Click Create a new Event (+).
For the New Event, click More () and Rename to New inspection created.
For Event Type, select Data Change.
Click Adds only.
This event will be triggered when a row is created in the Inspections table using the app.
For Table, select Inspections.
Leave the remaining settings as their defaults, and click Save to save your changes to the app.
Finally, you create the automation bot that is triggered by the event. When the event occurs, the bot runs the process that it's configured with.
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 Inspection created.
In the bot definition, click Configure event.
Select the New inspection created event that you created in the previous task.
For Run this process, click the arrow to display a list of processes, and select the Create inspection file process that you created earlier.
Click Save.
Click Check my progress to verify the objective.
It's now time to test the automation that creates a file with inspection data from the app.
Before you can create an inspection, you must first add yourself as a facilities inspector in the app.
In the AppSheet UI, in the left navigation bar, click Data ().
In the app preview, click the main menu ().
In the app's main menu, click Inspectors.
To add yourself as an inspector, click Add ().
In the new inspector form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
First Name |
[your first name] |
Last Name |
[your last name] |
[your Google Cloud Username from the Qwiklabs credentials pane] |
|
Phone |
1-555-555-5555 |
Manager Email |
[your own email address] |
Shift |
Night |
Note: For the Manager Email, please provide your own email address in order to receive email from AppSheet. If you do not have one, you can sign up for a test Gmail account at mail.google.com.
In the app preview, click Save.
Wait a few seconds for the app to automatically sync the update to the backend, or to sync the data changes manually, click Sync ().
To create a new inspection, in the navigation bar at the bottom of the app preview, click Inspections.
Click the Pier 46 facility.
To add a new inspection, in the app preview, click Add ().
In the new inspection form, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
Inspection Point |
Loading Docks |
Well Lit? |
Y |
Surfaces Clean? |
Y |
Garbage Emptied? |
Y |
Doors Locked? |
Y |
Area Organized? |
Y |
Status |
Inspection Passed |
To go to the next page in the new inspection form, in the navigation bar of the app preview, click Next.
For Signature, click Tap to unlock, and using the mouse, draw a signature.
In the app preview, click Save.
Repeat the steps above to create a failed inspection by setting these values in the inspection form:
Property |
Value (type or select) |
Inspection Point |
Product Bins |
Well Lit? |
Y |
Surfaces Clean? |
Y |
Garbage Emptied? |
N |
Doors Locked? |
Y |
Area Organized? |
N |
Status |
Inspection Failed |
Click Next, provide your signature, and click Save in the app.
Wait a few seconds for the app to automatically sync the update to the backend, or to sync the data changes manually, click Sync ().
There should be two files created on Google Drive: one for each inspection that was created in the previous task.
In a separate browser tab, navigate to https://drive.google.com.
If prompted, sign in to Drive with your lab credentials.
In My Drive, open the AppSheet folder, and then from the AppSheet folder, open the data folder.
This is the default folder location on Drive that AppSheet uses to store your app's images and other files.
Open the FacilityInspections-nnnnnnn folder.
In this application folder, open the Files folder. There should be two files listed whose names begin with Inspection Passed and Inspection Failed.
Open each of the files to view its contents. Verify that the content is formatted based on the template that was used in the automation task.
In this task, you generate a report of the daily inspections created in the app. You use AppSheet's automation features to periodically send an email with the report as an attachment.
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 Daily inspection report.
To configure an event that will trigger the bot, click Configure event.
For the Event name, type Schedule daily inspection report, and press ENTER.
In the Settings pane, specify the following, and leave the remaining settings as their defaults:
Property |
Value (type or select) |
Event Type |
Schedule |
Schedule |
Daily |
Time |
[Type the current time] |
Time zone |
[Select the time zone nearest to you] |
Continue configuring the bot with a process, step, and task:
For Run this Process, click the arrow, and select Create new process, and then enable Linking.
To add a step to the process, click Add a step.
For the Step name, type Email inspection report, and press ENTER.
To create a task, in the Settings pane, enable Linking:
Property |
Value (type or select) |
Type of task |
Send an email |
Email Type |
Custom template |
Table name |
Inspections |
To provide the email address of the recipient, for To, click Add, and then type your own email address.
In the Settings pane, continue to configure the task by specifying the following:
a. For Email Subject, type Daily Inspection Report for: <<_TODAY>>
b. For Email Body, type Please review today's inspection report attached to this email.
c. Click Attachment settings.
d. For Attachment Content Type, select PDF.
e. For Attachment Template, click Folder ().
f. In the Upload from dialog, click Google Drive Files.
g. In the file chooser dialog, select the attachment template file DailyInspectionReport_AttachmentTemplate from My Drive. Click Select.
h. For Attachment Name, type Daily Inspection Report
The template uses a StartExpression with a condition to fetch rows from the Inspections table that have an inspection date that matches the current date. It formats the inspections into two separate tables in the report organized by passed and failed inspections. Each table uses column variables to display values from the relevant Inspections table columns for passed and failed inspections.
Leave the remaining settings as their defaults and click Save.
Now that you have all the automation components created, you can test report generation.
AppSheet will send email notifications from automation tasks only to the app creator while the app is in prototype state. For other users to receive notifications, the app must pass a deployment check and be deployed.
To run a deployment check, in the AppSheet UI, in the left navigation bar, click Manage () > Deploy tab and click Deployment Check.
Click Run deployment check.
There should not be any errors displayed for your app. Ignore the warnings, and click Move app to deployed state.
The event that was configured to trigger the report generating bot is on a fixed schedule. For lab testing purposes, you simply update the event's scheduled time to the current time.
In the AppSheet UI, in the left navigation bar, click Automation () > Bots.
Click Daily inspection report.
Select the Schedule daily inspection report event to view its configuration.
Update the time of the event to the current time or one minute after the current time.
To save your changes, click Save.
Wait for the event to trigger.
In a separate browser tab, access the email account that you configured for the task.
Verify that an email with the subject line: Daily Inspection Report for: [Today's date] was received.
Open the email and view the message content. Then, open the PDF attachment.
Verify that the contents of the file includes the two inspections created earlier in the lab.
Congratulations on completing this lab on report generation with AppSheet automation.
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 つのラボ
既存のラボをすべて終了して、このラボを開始することを確認してください