WEBVTT

00:01.360 --> 00:02.160
Welcome back.

00:02.200 --> 00:08.880
In this video I will show you how to set up AI automation, which is very helpful and can save you a

00:08.880 --> 00:09.600
lot of time.

00:10.320 --> 00:13.600
This automation summarizes your daily emails.

00:15.160 --> 00:21.080
So imagine you receive lots of emails overnight and each morning you just want a quick summary to know

00:21.080 --> 00:24.200
what's important without reading each email individually.

00:25.000 --> 00:27.960
So with this automation you will save a lot of time.

00:31.160 --> 00:36.000
And the great news is we don't even need to build this automation from scratch.

00:37.040 --> 00:42.640
We will build more complex and advanced AI automation in the next lessons, but in that case, we will

00:42.640 --> 00:50.840
use a pre-built ready to use template that is available directly in any template library.

00:51.800 --> 00:57.400
Now I'm going to show you how you can find and import the template we are going to use.

00:58.040 --> 01:00.400
So first let's create new workflow.

01:04.960 --> 01:13.000
Now if you are, if you are using a cloud version on the left hand side you will see templates uh section.

01:13.640 --> 01:14.560
Just click on it.

01:16.480 --> 01:19.000
So to find the exact workflow we'll use today.

01:19.560 --> 01:20.360
Type type.

01:20.400 --> 01:21.680
Email summary agent.

01:27.800 --> 01:28.520
Hit enter.

01:29.520 --> 01:34.400
And as you can see there are over 1500 uh, automation templates available.

01:34.400 --> 01:35.800
Most of them are free to use.

01:38.760 --> 01:40.160
We are interested in this one.

01:48.480 --> 01:52.640
Now just click on Use Workflow and then choose to copy it.

01:52.640 --> 01:55.680
So use workflow.

01:57.840 --> 02:01.280
And copy template to clipboard as a JSON file.

02:02.850 --> 02:04.090
Then go back to 2010.

02:07.290 --> 02:12.090
And just use Ctrl Plus V.

02:14.330 --> 02:21.290
Now in the setup credentials lesson, I've showed you how to set up credentials for most of the services.

02:22.170 --> 02:29.730
So if you are using a cloud version of an A-10, it should be saved and you can manage all your credentials

02:29.730 --> 02:31.130
in credentials section.

02:36.250 --> 02:41.330
But just make sure that when you open Gmail a node.

02:46.290 --> 02:47.570
Is successfully connected.

02:48.450 --> 02:50.970
If not, just simply sign in to your Google account.

02:52.370 --> 02:55.570
And the same for OpenAI node.

02:56.170 --> 02:57.330
Just simply open it.

02:58.250 --> 02:59.410
Click on this little pen.

03:01.610 --> 03:05.290
And the message connection tested successfully should pop up.

03:05.690 --> 03:12.810
If not, go back to the setup credentials lesson and enter your API keys here.

03:15.930 --> 03:17.850
Now it's ready to go and we can move on.

03:20.050 --> 03:30.610
There is another way of importing templates from a library by simply importing templates directly to

03:30.650 --> 03:32.290
your cloud workspace.

03:32.690 --> 03:43.810
So instead of copying templates as a JSON and importing them manually, you can simply click on Import

03:43.850 --> 03:46.610
template to your cloud workspace.

03:46.610 --> 03:53.650
But this is working just if you are using a cloud version cloud version of an A-10.

03:56.850 --> 04:04.660
Now this method allows you for setting up credentials before modifying the workflow itself.

04:05.420 --> 04:09.700
So you can simply just select credentials you want.

04:11.540 --> 04:12.940
I'm going to choose this one.

04:14.060 --> 04:18.020
And for OpenAI this one and hit continue.

04:20.820 --> 04:26.740
And now the template has been successfully imported into your N810 environment.

04:27.700 --> 04:32.780
And the credentials are also successfully connected.

04:33.980 --> 04:34.860
As you can see.

04:37.500 --> 04:38.500
Now OpenAI.

04:40.900 --> 04:41.180
Yes.

04:41.180 --> 04:41.660
Awesome.

04:42.820 --> 04:44.700
Now let's quickly explore the nodes.

04:44.740 --> 04:48.940
So the first node schedules when this automation runs.

04:49.260 --> 04:51.900
So right now it's set to 7 a.m. every day.

04:51.900 --> 04:56.180
But you can adjust it to whatever it fits your routine best.

04:56.260 --> 05:01.900
For instance, maybe you prefer your email summaries at midnight or every Sunday morning at 9 a.m.,

05:02.260 --> 05:04.100
or perhaps each night at 10 p.m..

05:04.140 --> 05:10.940
So simply click the note and adjust the timing that works best for you.

05:11.620 --> 05:18.380
So here you can change the trigger interval so you can switch to seconds, minutes, hours, days,

05:18.380 --> 05:22.140
weeks, months or set up a custom cron.

05:25.020 --> 05:27.140
Here you can choose.

05:30.260 --> 05:33.900
The number of days between triggers.

05:35.500 --> 05:42.740
Here you can set up the specific hour you want the workflow to be triggered.

05:43.340 --> 05:45.100
And here at which minute.

05:47.220 --> 05:49.100
Now let's go back to our workflow.

05:51.500 --> 05:56.740
Now when I make this workflow active just by clicking on this toggle.

05:58.900 --> 06:06.020
Every day at 7 a.m., this workflow will be triggered by, according to the New York Time Zone.

06:06.670 --> 06:14.390
And because I'm not based in New York, I'm going to change the settings to change the time zone to

06:14.630 --> 06:17.630
my local time zone for London Europe.

06:19.830 --> 06:20.870
And confirm it.

06:22.030 --> 06:28.270
And now this workflow will be activated every day at 7 a.m. in my local time zone.

06:30.630 --> 06:36.670
So that's why this is really important, to double check in the settings that you have set up the correct

06:36.710 --> 06:37.390
time zone.

06:37.790 --> 06:45.950
Because if you are importing templates from a library by default, it can be configured to use your

06:45.990 --> 06:51.590
timezone or any other time zone which could cause issues if you live elsewhere.

06:51.830 --> 06:53.950
And this mistake happens frequently.

06:54.590 --> 06:57.510
So select the correct time zone and let's move on.

06:57.710 --> 07:03.150
Now as you can see why it's important the template from the library.

07:04.950 --> 07:08.350
It comes with Beautiful notes.

07:09.070 --> 07:11.470
And they're called sticky notes.

07:11.870 --> 07:18.190
And you can simply add them to your workflows by searching sticky notes.

07:23.510 --> 07:24.590
And you can always.

07:27.070 --> 07:32.950
Use it to help you understand or make some notes inside your workflows.

07:33.190 --> 07:35.430
So for example here you can change the color.

07:37.230 --> 07:43.030
And by double clicking you can edit it and add any text you want.

07:48.310 --> 07:49.550
For now let's remove it.

07:52.910 --> 08:01.710
And most of the templates available in the Naa10 library come with these notes.

08:01.710 --> 08:09.840
So here we can see that it starts the workflow every day at 7 a.m. you can adjust the time if you want

08:09.880 --> 08:10.160
to.

08:11.880 --> 08:13.600
You can see that the next node.

08:13.880 --> 08:20.600
So Gmail tool fetches all emails received in the past 24 hours from the email address, etc..

08:25.200 --> 08:31.760
So as you can see, according to this node, it grabs every email received in the past 24 hours.

08:33.040 --> 08:35.800
So let's open it and let's see what's inside.

08:40.480 --> 08:42.240
So as a result we have a message.

08:42.680 --> 08:44.600
So we want to fetch a message.

08:44.600 --> 08:49.080
So email you can also fetch a labor draft or treat.

08:51.360 --> 08:53.960
You have different options to choose from.

08:54.440 --> 09:00.960
We can fetch many emails so we can get we can use get many operation.

09:01.680 --> 09:02.800
We can delete emails.

09:02.800 --> 09:03.960
We can add labels.

09:04.840 --> 09:10.680
You can even mark emails as read as only you can reply.

09:10.680 --> 09:15.600
We can send emails, you can send and wait for response.

09:16.360 --> 09:18.640
So you have plenty of options to choose from.

09:20.400 --> 09:23.800
In that case, we want to fetch multiple emails.

09:24.000 --> 09:27.880
So we're going to leave this operation as it is.

09:30.000 --> 09:34.560
Now we want to return all emails from the past 24 hours.

09:35.600 --> 09:37.600
And we want to simplify the output.

09:40.440 --> 09:44.520
Now this code snippet has been added by the author of this workflow.

09:47.840 --> 09:51.120
Now you can also turn it off and set up a limit.

09:51.320 --> 10:00.960
For example, let's say you want to fetch just last ten emails so you can change it, but you want to

10:00.960 --> 10:08.600
leave it as as written all as I want to have access and summarize all my emails from the past 24 hours.

10:09.730 --> 10:11.570
And now let's move on.

10:11.570 --> 10:14.210
So we want to simplify the output.

10:16.970 --> 10:19.250
Now we want to keep it as a simplified.

10:20.410 --> 10:23.330
We can simply hover over on it.

10:23.330 --> 10:31.090
And you can see that it means that whether to return a simplified version of the response instead of

10:31.090 --> 10:31.970
the raw data.

10:32.250 --> 10:34.010
So we want a simplified version.

10:36.490 --> 10:41.050
Now this is JavaScript code added by the author of this workflow.

10:41.890 --> 10:46.290
You can expand it by simply clicking on this little button.

10:50.370 --> 10:57.570
So this script generates a Gmail search query to find emails from this specific email address.

10:59.810 --> 11:05.610
And received after yesterday in a specific format.

11:06.210 --> 11:08.450
But you don't need to know how to write this code.

11:08.450 --> 11:13.850
You can simply Just ask any LLM like ChatGPT or Claude.

11:15.970 --> 11:17.050
All right, let's move on.

11:21.410 --> 11:23.730
The next note is called aggregate node.

11:23.970 --> 11:27.930
You can simply find it just by searching aggregate.

11:28.450 --> 11:35.530
It's a we can use it to combine a field from many items into a list in a single item.

11:35.890 --> 11:42.250
So in that case, it organizes the fetched email data by extracting fields like sender, receiver,

11:42.290 --> 11:44.930
CC and previous snippet.

11:45.850 --> 11:46.970
So let's open it.

11:50.970 --> 11:54.130
It aggregates all item data into a single list.

11:54.410 --> 11:56.330
You can switch to individual fields.

11:58.730 --> 12:02.730
We also want to output data in field.

12:03.410 --> 12:05.290
We include a specific fields.

12:06.930 --> 12:11.730
The fields we want to include a ID from two cc See snippet.

12:12.370 --> 12:17.650
So all the data fetched from your emails and that's basically it.

12:18.490 --> 12:22.610
Now let's move on to the next node which is message model node.

12:25.610 --> 12:34.290
This is where the magic happens because here we are using LM to summarize our emails and combine all

12:34.290 --> 12:37.210
the fetched emails into a summary.

12:40.010 --> 12:42.410
Here, as you can see, this is a message model.

12:42.930 --> 12:49.770
So we can use it to message LMS in that case OpenAI models.

12:50.850 --> 12:54.450
You can find it by simply searching for OpenAI.

12:58.050 --> 13:02.250
And message model as a text action.

13:05.530 --> 13:09.890
Here you can configure it and specify all the parameters.

13:10.570 --> 13:15.780
But for now let's remove it because we have already configured this node in our workflow.

13:17.180 --> 13:18.220
So let's open it.

13:20.020 --> 13:21.220
And as you can see here.

13:23.820 --> 13:25.900
As a resource we have text.

13:28.740 --> 13:31.780
As operation we want to message a model.

13:32.020 --> 13:35.340
But we can classify text for relations.

13:35.340 --> 13:37.780
We can make a custom API calls.

13:38.140 --> 13:40.300
But let's leave it for now.

13:41.820 --> 13:48.260
Here we can choose LM we want to message to.

13:48.300 --> 13:54.260
So in that case we are using GPT four mini which is very cost effective and very fast.

13:54.740 --> 14:03.860
But you can easily switch to other llms like GPT 3.5 turbo, GPT four, GPT four or GPT four.

14:03.900 --> 14:04.180
Oh.

14:11.340 --> 14:12.220
Oh 1st May.

14:14.300 --> 14:18.020
Basically you have access to all OpenAI's models.

14:23.860 --> 14:25.660
Then as a message, we have a text.

14:26.300 --> 14:29.100
We can simply expand it and make it bigger.

14:29.780 --> 14:36.820
To switch to expression by clicking on this button here you can see how everything is structured.

14:37.260 --> 14:38.940
So how the prompt looks like.

14:39.940 --> 14:44.140
Go through this image summary and identify all key details mentioned.

14:44.500 --> 14:49.900
Any specific issues to look at and actions items and use this format to output.

14:51.260 --> 14:53.540
In this prompt we ask LLM.

14:53.780 --> 14:58.180
So in that case GPT for all to use this format to output.

15:00.260 --> 15:01.460
All the information.

15:02.340 --> 15:10.540
So when we fetch all the emails, GPT four will summarize all these emails and use this JSON format

15:10.540 --> 15:16.590
to structure the email we are going to receive as a summary.

15:17.430 --> 15:21.430
So it's a summary of emails with point one, two and three.

15:21.710 --> 15:23.550
We have actions, we have names.

15:23.990 --> 15:31.870
And of course as the input data, we have all the emails fetched from the last 24 hours in a JSON format

15:31.870 --> 15:32.350
as well.

15:33.190 --> 15:35.710
Finally we have the Gmail node again.

15:36.110 --> 15:41.550
So this time this node sends summarized email directly back to you.

15:42.470 --> 15:43.550
So let's open it.

15:46.550 --> 15:49.630
And your Gmail account should still be connected.

15:51.350 --> 15:56.990
You have resource as a message, but you can also select label, draft or treat.

15:59.230 --> 16:00.670
We want to send an email.

16:00.670 --> 16:03.030
So we use send operation.

16:04.070 --> 16:08.790
Here you can specify what email address you want to.

16:09.030 --> 16:10.750
You want the email sent to.

16:11.510 --> 16:14.590
So let's say I'm going to provide my email.

16:23.670 --> 16:24.910
Now here is a subject.

16:24.910 --> 16:30.950
We have the same code as in the previous node, so let's expand it.

16:32.190 --> 16:35.590
As you can see and you also have a time zone.

16:38.870 --> 16:40.830
As you can see this is the same code.

16:41.590 --> 16:46.470
So here we specify the format we want to receive email in.

16:47.710 --> 16:49.630
And we also have a time zone.

16:51.190 --> 16:52.390
So now let's close it.

16:53.070 --> 16:58.630
And when I scroll down you see that the email type we have HTML.

16:59.110 --> 17:05.870
That's why in the message field we provide HTML structure.

17:06.870 --> 17:09.470
But you can easily switch to text.

17:09.870 --> 17:13.950
But remember to change the structure of the message as well.

17:14.270 --> 17:15.350
So let's open it.

17:17.520 --> 17:20.280
So this is the HTML of the message.

17:28.920 --> 17:35.400
So basically thanks to this HTML code we receive beautifully formatted email with our summary.

17:38.320 --> 17:41.400
You don't need to know how to write from scratch.

17:41.800 --> 17:44.040
You can just simply copy and paste it.

17:44.040 --> 17:50.480
Or you can always use ChatGPT or any other large language model to help you understand it.

17:51.760 --> 17:52.840
Let us close it for now.

17:56.320 --> 18:02.440
Here you have option to append an attribution, which basically means that at the bottom of the email

18:02.440 --> 18:05.240
you will see information that the email was sent by an A-10.

18:05.440 --> 18:06.600
But we don't need that.

18:10.920 --> 18:12.240
Now let's test this workflow.

18:12.240 --> 18:15.360
So let's press on Test Workflow button.

18:17.800 --> 18:27.440
And now, as you can see, it stops at the edge image node because it fetches fetches image from the

18:27.440 --> 18:30.520
past 24 hours starting from right now.

18:30.720 --> 18:35.080
So if no new emails arrived in the last minute, there is nothing to summarize yet.

18:35.560 --> 18:45.720
So to check this functionality and see how the how it goes through, just simply click on the second

18:45.720 --> 18:48.760
node, go to settings.

18:50.920 --> 18:53.360
And toggle this option.

18:55.680 --> 18:57.160
To always output data.

18:58.120 --> 19:01.120
And now when you click this workflow again.

19:03.760 --> 19:06.200
You can see that it was successfully executed.

19:06.800 --> 19:12.840
And now when I go to my email inbox you can see that it's working.

19:12.840 --> 19:17.000
And I got in my summary but I, I didn't get any.

19:18.210 --> 19:22.250
content because I didn't receive any email in the last couple of minutes.

19:23.890 --> 19:27.970
So now let's go back to our workflow and let's open this node.

19:30.610 --> 19:31.770
And as you can see here.

19:34.490 --> 19:35.730
When I switch to JSON.

19:39.370 --> 19:42.650
In the output section we see that the email was sent.

19:43.210 --> 19:47.410
You have ID, threat id and label IDs and so on.

19:49.050 --> 19:52.250
So now the last step is to make our workflow active.

19:54.650 --> 19:55.610
Let's confirm it.

19:57.290 --> 20:05.410
And now every single day at 7 a.m., I should receive a summary of my emails from the last 24 hours.

20:05.930 --> 20:08.450
Beautifully formatted as you have seen.

20:12.530 --> 20:13.730
It will look like that.

20:15.810 --> 20:18.250
But with the actual summary of emails and actions.
