WEBVTT

00:00.080 --> 00:03.800
Okay, so we go back here again.

00:03.960 --> 00:06.240
We now need to make sure we press okay.

00:07.800 --> 00:10.040
And we we check that this is all good.

00:10.040 --> 00:12.280
It's all been created and it's there.

00:12.480 --> 00:14.200
We go back over here.

00:14.440 --> 00:21.600
And now it is time for us to go here and press this sign in with Google account.

00:22.000 --> 00:24.720
This is where the magic happens.

00:24.760 --> 00:25.080
Okay.

00:25.080 --> 00:25.760
Let's do this.

00:25.760 --> 00:26.880
Sign in with Google.

00:27.240 --> 00:29.600
Up has popped a screen like so.

00:29.640 --> 00:31.600
I'm going to use the same account.

00:31.640 --> 00:33.480
It has to be the same account.

00:33.760 --> 00:39.880
Amplify wants to access your Google account, allow you to see, edit, create and delete all your Google

00:39.880 --> 00:43.000
Drive files and and so on.

00:43.040 --> 00:45.240
Make sure you trust amplify.

00:45.640 --> 00:49.480
So this is this is the the Oauth2 process.

00:49.600 --> 00:58.400
And when I press allow Google is going to redirect back to the redirect URL that we configured just

00:58.400 --> 01:00.320
a moment ago in the Google screens.

01:00.320 --> 01:05.210
And that redirect URL takes it back to N810 again and it's expecting us.

01:05.210 --> 01:06.730
It's waiting for this to happen.

01:06.730 --> 01:08.130
And so then that happens.

01:08.130 --> 01:09.650
Connection successful.

01:09.850 --> 01:11.770
And can you see what I can see?

01:11.810 --> 01:12.530
Yes you can.

01:12.570 --> 01:13.090
You can see.

01:13.130 --> 01:15.570
Green account connected.

01:15.650 --> 01:22.010
We have just successfully completed a full OAuth two credentials flow.

01:22.250 --> 01:23.370
Congratulations.

01:23.370 --> 01:27.410
It would be a fair challenge to say to me why is that so hard?

01:27.450 --> 01:28.690
Why is that so involved?

01:28.690 --> 01:30.690
Why can't we just use an API key?

01:30.850 --> 01:33.530
We're used to API keys and they're so simple.

01:33.530 --> 01:39.250
And I guess it's important to have the context of of why this is such an involved process.

01:39.250 --> 01:42.050
Because we have enabled great powers.

01:42.250 --> 01:47.930
The idea of OAuth two is that it allows someone like us, supposing we were building a software product

01:47.930 --> 01:49.010
called amplify.

01:49.090 --> 01:52.890
Supposing amplify is something that we're later going to distribute to lots of people.

01:52.890 --> 01:59.010
But in order for amplify to work, amplify needs to have access to the user's Google Drive.

01:59.050 --> 02:02.370
Not to my Google Drive, but to the user's Google Drive.

02:02.530 --> 02:08.020
So the user is going to be able to authenticate, and they're going to allow their Google Drive to be

02:08.020 --> 02:10.780
operated on by my software called amplify.

02:11.140 --> 02:13.220
Well, that's quite, quite an undertaking.

02:13.220 --> 02:16.180
That's quite a lot of power that we're giving my software.

02:16.180 --> 02:22.100
And it's important that the end user is aware of what's going on that I am amplify that Google knows

02:22.100 --> 02:29.220
who I am and that it's okay for me amplify to have access to you the user's Google Drive.

02:29.460 --> 02:34.820
And that's why there's hoops to jump through because this is an important security allowance.

02:34.860 --> 02:37.140
We're getting rights to something big.

02:37.300 --> 02:41.940
And that's why you have to say this is you have to identify, amplify to Google, make sure that Google

02:41.940 --> 02:44.940
understands that and then go through these various hoops.

02:45.180 --> 02:49.780
And the reason it was somewhat simpler when we were just doing it for the sheets before, is it?

02:49.780 --> 02:54.900
Nan had already done a lot of that work in that case and and identified themselves to Google and acted

02:54.900 --> 02:57.460
like the, the amplify in that case.

02:57.620 --> 03:00.620
So, you know, this is one of those things you don't need to know this if you don't want.

03:00.620 --> 03:02.700
But if you're thinking, why is that so hard?

03:02.860 --> 03:10.280
Uh, keep in mind that this is a very powerful construct, and it allows for this very flexible ability

03:10.280 --> 03:17.120
to give someone else, to give our application the ability to authenticate, to be allowed to use another

03:17.120 --> 03:18.440
user's Google Drive.

03:18.680 --> 03:23.560
In our case, it's quite a bit simpler because we are the user and it's our Google Drive, so it's not

03:23.560 --> 03:27.520
actually such a big deal what we're doing, which is why it was relatively smooth.

03:27.680 --> 03:32.760
Um, but that gives you the deeper insight into what OAuth two is all about.

03:33.400 --> 03:37.520
Okay, now that we've done this, what can we actually use it for?

03:37.560 --> 03:39.960
Let's let's let's do something with it okay.

03:40.080 --> 03:48.320
So first of all I have just gone into Google Drive and I've created a folder called Amplify File Drop

03:48.320 --> 03:50.600
in my drive amplify file drop.

03:50.600 --> 03:52.880
This is of course at Drive.google.com.

03:53.280 --> 03:54.840
If you're not familiar with Google Drive.

03:55.000 --> 03:56.240
And uh there we go.

03:56.280 --> 04:00.320
That folder has been created and now I'm going back into N810.

04:00.360 --> 04:03.160
Let's, uh, let's escape out of here.

04:03.400 --> 04:07.680
Let's go back into my project, into my first folder in here.

04:07.720 --> 04:11.530
I should probably give it a better name and we'll create a new workflow.

04:11.530 --> 04:13.610
Here we go inside the first folder.

04:13.610 --> 04:15.530
What is this workflow going to do?

04:15.570 --> 04:16.850
Well let's see.

04:16.890 --> 04:17.890
Let's add a first step.

04:17.890 --> 04:20.050
Let's go to Google Drive.

04:20.050 --> 04:21.090
Here it is.

04:21.330 --> 04:28.010
Google drive on changes involving a specific folder okay let's select that.

04:28.010 --> 04:28.730
Here we go.

04:28.770 --> 04:29.570
Credential.

04:29.570 --> 04:31.930
It fills in automatically with the Google Drive account.

04:31.970 --> 04:37.450
The thing that we did the mode the whole time is how often should it check in to see what's going on.

04:37.450 --> 04:44.130
We'll say every minute, which is the default um, and uh, trigger on changes involving a specific

04:44.130 --> 04:44.810
folder.

04:44.930 --> 04:46.010
That's what we want.

04:46.210 --> 04:48.330
Uh, folder will now select the folder.

04:48.330 --> 04:51.090
And then we're going to say what to watch for okay.

04:51.130 --> 04:53.690
For the folder I selected Amplify File.

04:53.690 --> 04:55.730
Drop the folder that I just set up over here.

04:55.890 --> 04:57.530
And now what to watch for.

04:57.730 --> 04:59.050
Look at what we could do.

04:59.090 --> 05:06.450
We are going to say when file is created uh file created right here.

05:06.690 --> 05:09.610
Uh, and uh, let's just check this out.

05:09.610 --> 05:10.780
This looks pretty good.

05:11.140 --> 05:16.980
Um, we can just test an event, and it says no data could be found.

05:16.980 --> 05:17.820
That seems good.

05:17.820 --> 05:18.580
That's fine.

05:18.580 --> 05:19.980
That's what we would expect.

05:20.180 --> 05:26.740
Uh, and, uh, yeah, there's also the ability to have an option to select, uh, what file type it

05:26.740 --> 05:29.220
looks for, but we will leave that without any properties.

05:29.300 --> 05:32.260
Let's now, uh, escape out.

05:32.260 --> 05:35.460
And here we have a Google file trigger.

05:35.740 --> 05:36.540
All right.

05:36.580 --> 05:36.980
Okay.

05:37.020 --> 05:42.340
Next up we're going to connect this I'm going to connect it to a pushover notification.

05:42.540 --> 05:44.100
Uh, push a message.

05:44.300 --> 05:51.100
Uh, and the credential that we'll connect with will we'll need to, uh paste in our credentials from

05:51.100 --> 05:52.020
pushover.

05:52.020 --> 05:54.940
So select create New credential.

05:54.940 --> 06:00.260
And remember we need to put the, the uh the token that goes into not the user one, but the one that

06:00.260 --> 06:04.020
begins with the letter A that hopefully you have that to hand.

06:04.020 --> 06:05.900
So I will then paste that in.

06:06.060 --> 06:12.310
And then when I've done that sorry I'll come back here, I'm going to paste in my user key there, and

06:12.310 --> 06:16.830
the message that I'm going to put in here is going to be a fixed message, which is going to be file

06:16.870 --> 06:23.470
has arrived, exclamation mark, and make that a nice and high priority so that it makes a noise.

06:23.670 --> 06:25.190
That's going to be great.

06:25.270 --> 06:25.550
Okay.

06:25.590 --> 06:30.390
I'm now going to put in my credentials that I'll do carefully to make sure I get them right.

06:30.430 --> 06:32.710
The one that begins with an A is what I'll put in the credential.

06:32.710 --> 06:36.310
The one begins with a you will go here and then I will save it.

06:36.470 --> 06:38.150
Okay I did that.

06:38.150 --> 06:39.750
And now let's go over here.

06:39.750 --> 06:41.710
Let's go to Amplify File Drop.

06:41.910 --> 06:49.830
And now let's make a new Google doc in here a new blank document that we will say wow.

06:50.790 --> 06:52.670
And we will call it wow.

06:53.110 --> 06:53.590
There we go.

06:53.590 --> 06:55.030
It does it automatically.

06:55.190 --> 06:58.910
And now if I go back here we should see that wow is there.

06:58.910 --> 07:04.670
We come back here and we execute the workflow and Pam the workflow executed.

07:04.910 --> 07:06.550
And I just got to push over.

07:06.550 --> 07:10.630
My volume is turned off but I just got to push over.

07:10.670 --> 07:12.990
Let me take a look at that notification.

07:13.150 --> 07:16.890
Uh, just in case you don't believe me, here it is.

07:17.330 --> 07:20.130
And it says file has arrived.

07:20.330 --> 07:22.930
Uh, there it is.

07:23.050 --> 07:26.090
So it appears to work nicely.

07:26.210 --> 07:31.690
Uh, it is able to monitor for files arriving and send push notification.

07:31.810 --> 07:38.090
Um, but of course, we actually want to see this happening live, in which case we would need to publish.

07:38.210 --> 07:39.730
Okay, so I'm pressing.

07:39.770 --> 07:40.370
I've saved it.

07:40.370 --> 07:41.650
I'm pressing publish.

07:42.170 --> 07:43.290
Publish this.

07:44.130 --> 07:45.090
Off it goes.

07:45.370 --> 07:46.170
Got it.

07:46.650 --> 07:52.970
All right, back we come to the amplify file drop, and I guess we're going to we're going to duplicate

07:52.970 --> 07:53.210
this.

07:53.250 --> 07:54.130
Make a copy.

07:56.450 --> 07:57.050
Make a copy.

07:57.050 --> 07:57.730
There it is.

07:58.210 --> 08:00.650
And now the one minute countdown begins.

08:01.690 --> 08:02.690
Up to a minute.

08:02.890 --> 08:08.370
Uh, so, uh, I have to sit here talking to you, politely, hoping that it's not going to be too long.

08:08.890 --> 08:13.410
Um, and meanwhile, I guess we can come back here to my workflow.

08:13.450 --> 08:14.010
We can.

08:14.250 --> 08:17.580
We can, um, go to executions.

08:17.980 --> 08:19.300
We can see what's happening.

08:19.300 --> 08:19.940
It's there.

08:21.500 --> 08:22.380
It's running.

08:23.180 --> 08:25.420
I don't have a pushover notification yet.

08:25.420 --> 08:26.500
I hope you're excited.

08:29.940 --> 08:35.060
I wonder, uh, okay, I think that's about a minute to go for me.

08:35.900 --> 08:36.700
Uh, so.

08:36.740 --> 08:41.060
So with any luck, we're going to have any minute now a notification come through.

08:43.740 --> 08:45.540
We will see back.

08:45.540 --> 08:46.540
We go over here.

08:47.900 --> 08:48.820
That's good.

08:49.580 --> 08:50.220
There we go.

08:50.420 --> 08:50.940
Haha.

08:51.540 --> 08:52.540
It happened.

08:52.580 --> 08:54.740
We got the notification and there we go.

08:54.780 --> 08:56.100
We get the succeeded.

08:56.300 --> 08:58.820
There was some dead air there for a minute, but it was worth it.

08:58.860 --> 09:00.180
It caught me off guard too.

09:00.300 --> 09:00.580
Uh.

09:00.620 --> 09:01.380
Very nice.

09:01.500 --> 09:06.380
Uh, and this also has given us an opportunity to see the executions appearing here, so it was worth

09:06.380 --> 09:07.020
the wait.

09:07.060 --> 09:08.380
We got that through.

09:08.420 --> 09:09.620
That's a success.

09:09.780 --> 09:16.740
Uh, we have a deployed Google Drive trigger that's listening for new things arriving and is able to

09:16.780 --> 09:18.220
send a push notification.
