[MUSIC PLAYING]
CHRISTIAN SCHALK: Hello, and welcome to the "Building
with AppSheet" series, where I discuss and demonstrate how
to build applications with AppSheet and Google
technologies.
I'm Christian Schalk, a Google Developer advocate.
And in this episode, we'll introduce AppSheet Automation.
What is AppSheet Automation?
AppSheet's new Automation capability
allows you to configure a bot that binds events
to automated processes that perform
a variety of business tasks.
For example, from the task-tracking app
from my earlier videos, we could configure a bot to, one,
react to the event of updating a task's due date,
and then, two, trigger a process that both changes the task
status to in progress, as well as
sends an email to the task owner notifying them of this change.
This is, of course, a simple example.
But before continuing, let's walk
through AppSheet Automation's different components
and terminology.
The key components of AppSheet Automation
include a bot, which allows you to create or orchestrate
automated workflows by combining events with processes.
An event itself, which is triggered
whenever data is changed or when it is specifically scheduled.
The process, which is the overall business process
that the bot orchestrates, and includes all of the steps
and tasks associated with it.
And the step, which is an individual step in a process
that executes business tasks.
And finally, tasks carry out specific actions
defined in the process, such as updating a value,
sending an email or notification,
or branching on a logical condition.
Let's dig further into tasks.
The different types of tasks include
notifications, such as SMS, email,
mobile; a data change, such as adding, deleting, or updating
rows; a webhook, which is a standard way
to call third-party REST services;
and file creation, which allows the process to generate
a template-based Google Doc.
To better understand how to create automations,
though, let's walk through a simple example.
So for our demo, we return to the familiar task-tracking
application.
And if you recall, we have two tables, tasks and owners.
And then in this simplified version, I just have two views.
One's for a task and then one for its owners.
And so now we're going to go ahead and click on
the new Automation option here on the menu.
And just to describe the process that I'm going to create,
it's going to have an event that's
going to be triggered whenever the task's due date is changed.
And then I want to have a simple task
to update one of the columns, which
is to say, update the task to just say in progress.
And then I want to introduce a branch condition
to check the priority.
And I'm going to check to see if it's a high priority task,
and I'm going to do a special operation for high priority
tasks only.
And then for everything else, I want to do something else.
So let's get started.
Let's go ahead and create a new bot.
And you'll notice as I'm creating the new bot,
it has actually a lot of suggestions here.
And these are actually complete bots
that will be complete once I select it.
But in my case, I'm going to go ahead and select the option
here to Create a custom bot.
And now, I just have to choose an Event.
And again, these suggestions are based off of usage patterns
that I've already done before.
And so in this case, I have this Tasks Due Date is changed.
And then you can see on the right,
it has a particular condition, which
just checks to see if the due date has actually changed.
And then now I just have to define the process by adding
a series of steps to it.
So let's click Add a step.
In this case, I want to go ahead and just update the data.
I want to change the Status to say In Progress.
Now I'm going to introduce a branch condition,
so I click that.
And I happen to have this Check if Priority is less than 2,
so that's essentially a branch on a condition type,
and it's using that expression.
And so if the answer is no, meaning that's low priority,
I'm going to go ahead and do this other step here,
where I'm going to send, essentially,
an email to the owner.
And if I look over here, I'm not really
going to customize anything.
I'm just going to use the default content.
So it's going to generate an automated subject and email
body.
For the other condition, where it is yes,
meaning it's high priority or priority 1,
I'm going to do kind of the same operation,
but I'm going to customize it further.
So instead of just sending a generic email to the owner,
I want to update the step name here.
I'm going to say high priority.
So I'm going to essentially send a high priority
email to the task owner.
And then here, instead of using the default content,
I'm going to update that to be something else.
I'm going to actually add the email content directly.
So to do this, I'm just going to go ahead and paste
what I have in my buffer, which in this case,
I happen to have a bit of text there
that gets their attention, meaning
they have a high priority task.
And there we go.
So now I have an updated email subject
and email body, which basically hopefully gets their attention.
And it will also then fill that into the body.
So I'll click Save.
And now we're just going to test it
by updating a task's due date.
So I open up the preview window.
And I'll just scroll down and I'll select only my tasks.
And let's first update this particular task, which
is a low priority, priority 4.
And we'll change the due date.
I'll just grab any date here and I'll click Save.
And then we're going to be watching the Status
column here.
So when this switches to In Progress,
we will know that it was updated.
And there we go.
Now it says In Progress.
So let's check our email.
And we should see-- yep, there it is--
a very generic email that just gives us
the values of the actual task itself,
so pretty straightforward.
So now let's go back and let's update a high priority
task, which happens to be this Complete Budget Proposal task.
I open that up in the editor, and let's just grab a new date,
and I click Save.
And as before, we'll wait for the status to update.
And there we go.
It says In Progress.
But let's go back to our email.
Do a refresh.
And there we go.
We see our high priority email has now been sent.
So it's essentially done a different operation.
So as you can see, it's pretty straightforward.
With just a few simple steps, I was
able to create a relatively sophisticated bot that
has this event.
It has a couple of steps.
It has a branch condition.
And it has some customized tasks in order for this whole process
to run.
This concludes the AppSheet Automations introduction
episode.
Stay tuned for more coverage of this important capability
in future episodes.
And for more info on AppSheet, Google Cloud, and Google
Workspace, check out the links in the description below.
And for more videos like this, make
sure you subscribe to this series so you don't miss out.
As always, thanks for watching.
[MUSIC PLAYING]