WEBVTT

00:02.000 --> 00:02.600
Hello.

00:02.800 --> 00:04.120
Welcome back to the course.

00:04.360 --> 00:07.080
Today we are going to build something really exciting.

00:07.480 --> 00:12.280
A complete human in the loop AI sales agents system using N810.

00:12.680 --> 00:17.600
So this is going to be a game changer for anyone doing a sales outreach.

00:17.920 --> 00:24.880
Because instead of just sending automated emails, these agents will write the first draft for us,

00:24.880 --> 00:31.840
then send it to us for approval or feedback, and then either send it out or revise it based on our

00:31.840 --> 00:32.440
input.

00:32.480 --> 00:33.560
Now what's really cool?

00:33.560 --> 00:38.000
We can do unlimited revisions until we are completely happy with the result.

00:39.000 --> 00:41.320
So we are going to learn a new concept today.

00:41.400 --> 00:47.520
The human in the loop methodology, which is absolutely essential for most use cases in production ready

00:47.560 --> 00:48.160
setups.

00:48.520 --> 00:54.200
Implementing the human in the loop approach makes our automations more production ready.

00:55.040 --> 01:02.880
So it's what separates amateur automation from professional grade systems that you can actually rely

01:02.880 --> 01:03.920
on in your business.

01:04.440 --> 01:10.520
So it's the difference between a cool demo and something you can actually put into production and trust

01:10.520 --> 01:11.680
with your reputation.

01:12.040 --> 01:17.160
So by mastering this concept today, you are not just learning how to build one workflow.

01:17.600 --> 01:22.920
You are learning a fundamental principle that you can apply to dozens of other automation scenarios.

01:23.640 --> 01:30.040
So whether it's content creation, customer support or any other business process where quality matters.

01:31.080 --> 01:33.280
This is very important concept.

01:33.440 --> 01:41.120
By the end of this tutorial, you will have a complete system that can automatically detect new leads

01:41.120 --> 01:42.120
from Airtable.

01:43.240 --> 01:44.320
As you can see here.

01:45.840 --> 01:48.600
So the Airtable is our CRM in that case.

01:49.240 --> 01:51.280
And I have created two bases.

01:51.280 --> 01:52.600
The first one is for leads.

01:53.840 --> 01:57.990
So new incoming leads are saved in this base.

01:58.590 --> 02:07.350
So as you can see the name of the lead, email the company name, intent, budget and the project they

02:07.350 --> 02:08.390
want us to build.

02:09.990 --> 02:13.630
So in that case, looking to streamline internal ops using agents.

02:14.790 --> 02:16.070
And we also have a timeline.

02:17.870 --> 02:20.670
And the second base is for projects.

02:21.510 --> 02:25.310
So here we can include the projects we've built in the past.

02:25.950 --> 02:33.550
So the first AI agent can write more personalized and convincing emails based on this project.

02:33.790 --> 02:42.070
Because based on this information can refer to the projects and the results we are able to achieve.

02:42.830 --> 02:51.710
So the first agent is the sales agent, which writes personalized sales emails using the large language

02:51.710 --> 02:53.470
model of of our choice.

02:53.870 --> 03:01.590
In that case we are using cloud from anthropic, then sends drafts to you for a human approval.

03:01.830 --> 03:03.950
So that's why it's called human in the loop.

03:05.390 --> 03:08.590
And as you can see here, this is the email I received.

03:10.470 --> 03:17.710
And I can either approve it or request a revision by clicking on respond.

03:27.270 --> 03:29.150
Here I can I can give a feedback.

03:29.830 --> 03:37.350
So for example please make it more concise and submit.

03:38.670 --> 03:39.030
Yes.

03:39.030 --> 03:45.150
So the revision agent accepts feedback and revises the emails and loops back for more feedback.

03:45.190 --> 03:50.430
Until until you are satisfied and finally sends the perfect email to your list.

03:50.670 --> 03:55.220
Now let's do a quick demo so I can show you how this setup works in action.

03:56.060 --> 04:01.260
So as you can see, the workflow is currently active and this node will trigger.

04:01.260 --> 04:07.140
Node is watching for a new lead coming to our table.

04:07.860 --> 04:08.900
So our CRM.

04:10.540 --> 04:18.300
Now when I go to this base and adding lead let's say Raymond Dunn.

04:20.500 --> 04:25.380
Email Nathan demos gmail.com.

04:27.980 --> 04:28.820
Company.

04:35.820 --> 04:38.900
And ah it should be here.

04:39.220 --> 04:40.620
Just copy and paste it here.

04:42.980 --> 04:43.980
And intent.

04:45.580 --> 04:47.860
The client is looking for an agent.

04:51.900 --> 04:53.020
And the budget is.

04:55.500 --> 05:01.340
One project description let's say, is going to copy this.

05:01.340 --> 05:09.340
So need an agent to handle inbound service requests and book technician appointments and paste it right

05:09.340 --> 05:09.820
here.

05:11.860 --> 05:13.380
And this project is urgent.

05:18.060 --> 05:21.700
And now when I go back to our workflow and hit test.

05:26.100 --> 05:30.020
As you can see, this node detects Anglet.

05:30.020 --> 05:37.220
And our sales agent is preparing a personalized email based on the inputs.

05:39.780 --> 05:43.860
And now the system sends the draft email for our approval.

05:44.460 --> 05:46.700
When I go to my Gmail inbox.

05:51.610 --> 05:52.850
And refresh it.

06:01.530 --> 06:09.370
As you can see, approval required for delete from company 1 to 3 is looking for an agent.

06:09.450 --> 06:13.930
The budget is 5 to 10 grants with an agent.

06:14.170 --> 06:16.370
Next 1 to 3 weeks.

06:16.370 --> 06:16.970
Timeline.

06:17.570 --> 06:22.730
Please approve or decline the sending of this message generated by our agent.

06:23.210 --> 06:23.690
Subject.

06:23.730 --> 06:27.690
Transforming your Service requests with Agent Adaptive AI.

06:28.690 --> 06:30.410
The company 1 to 3.

06:31.370 --> 06:32.890
I hope this finds you well.

06:32.930 --> 06:39.090
Thank you for reaching out to adaptive AI regarding your AI voice agent project for handling inbound

06:39.290 --> 06:42.090
service requests and booking appointments.

06:42.770 --> 06:48.290
We are excited about the opportunity to work with you and deliver an exceptional solution within your

06:48.330 --> 06:52.970
Argent timeline of one two weeks as adaptive AI.

06:53.010 --> 06:59.330
We specialize in developing cutting edge solutions tailored to our clients specific needs.

06:59.370 --> 07:05.850
Your project aligns perfectly with our expertise and we are confident that we can exceed your expectations.

07:06.250 --> 07:10.170
Let me share relevant success story that demonstrates our capabilities.

07:10.570 --> 07:17.450
Recently, we developed an invoice agent for appointment booking for a client in a similar industry.

07:17.850 --> 07:19.530
The results were impressive.

07:20.050 --> 07:29.770
So we have 65% reduction in missed appointments, 28% boost in lead to booking conversions and seamless

07:29.810 --> 07:31.450
handling of incoming calls.

07:31.610 --> 07:34.410
Lead qualification and appointment scheduling.

07:34.970 --> 07:37.690
And now when we check our second base.

07:38.770 --> 07:44.970
So the project base and we check the project I was agent for appointment booking.

07:46.240 --> 07:48.840
As you can see, you have the same information here.

07:49.160 --> 07:55.960
So build a voice agent that answers incoming calls, qualifies leads and schedules consultations.

07:56.120 --> 08:04.760
Results 65% reduction in missed appointments and a 28 boost in lead to booking conversions.

08:04.960 --> 08:10.480
So our AI sees agent based on the request from the client.

08:12.920 --> 08:16.160
So based on this product description.

08:18.440 --> 08:20.800
Checked for us the second base.

08:20.800 --> 08:21.920
So the projects.

08:24.120 --> 08:25.600
On the relevant project.

08:25.800 --> 08:28.600
So AI voice agent for appointment booking.

08:29.400 --> 08:37.080
And based on the details and based on the projects details crafted a personalized emails which can be

08:37.080 --> 08:38.320
sent to our lead.

08:40.200 --> 08:47.200
So now you can either Approve this email or ask for any improvements.

08:47.440 --> 08:53.240
So for the project, we envision crafting a sophisticated AI voice agent that will efficiently manage

08:53.240 --> 08:58.400
inbound service requests intelligently book technician appointments, improve customer satisfaction

08:58.400 --> 09:00.640
through quick and accurate responses.

09:00.960 --> 09:03.560
Optimize your team's workflow and productivity.

09:03.920 --> 09:15.040
So, given your urgent timeline, as you can see in the list base, the project timeline is urgent.

09:15.560 --> 09:17.080
So next 1 to 2 weeks.

09:18.840 --> 09:22.720
We prepared to fast track the development process without compromising on quality.

09:22.760 --> 09:28.960
Our agile methodology allows us to deliver high performing AI solutions within tight deadlines.

09:29.200 --> 09:35.320
To discuss your project in detail and provide you with a tailored proposal, I would like to invite

09:35.320 --> 09:36.720
you to book a call with me.

09:36.920 --> 09:40.040
You can use this link to schedule a time that works best for you.

09:40.400 --> 09:49.590
So I included the link to my calendar in the prompt in the system prompt for our sales agent.

09:50.830 --> 09:52.030
As you can see here.

09:55.950 --> 09:56.830
Right here.

09:59.990 --> 10:02.590
Include the link to book a call using this link.

10:02.590 --> 10:04.630
So this is the link to my personal calendar.

10:07.710 --> 10:08.870
And when I open it.

10:17.030 --> 10:20.430
The potential customer is able to book a call with me.

10:20.790 --> 10:23.990
So thanks to that, you will never miss a warm lead.

10:26.990 --> 10:32.150
And during our call, we'll dive deeper into your specific requirements, discuss potential features,

10:32.150 --> 10:37.310
and outline a clear roadmap for delivering your voice agent within the next one two weeks.

10:37.710 --> 10:38.550
You are eager to help.

10:38.550 --> 10:46.150
Company 1 to 3 Revolutionize its service request handling and appointment booking processes.

10:46.390 --> 10:48.670
Let's work together to bring your vision to life.

10:49.030 --> 10:50.550
Looking forward to speaking with you soon.

10:50.590 --> 10:51.150
Best regards.

10:51.190 --> 10:52.030
Damien SEO.

10:52.070 --> 10:52.870
Adaptive AI.

10:53.550 --> 10:57.950
So I believe this email is quite good but is a bit lengthy.

10:58.550 --> 11:05.550
So I would like our revision agent so the second agent to improve it.

11:09.030 --> 11:13.990
So I want our revision agent to make it shorter.

11:14.710 --> 11:16.230
So when I click on respond button.

11:21.550 --> 11:26.510
I can request something like please make.

11:29.030 --> 11:29.950
Shorter.

11:31.350 --> 11:31.710
Thanks.

11:31.750 --> 11:33.670
And now when I click when I hit submit.

11:37.110 --> 11:44.940
As you can see, our revision agent is working on a revision, and this agent is also using a cloud

11:44.940 --> 11:45.420
model.

11:46.580 --> 11:53.580
By the way, I believe that the cloud model is the best on the market for writing emails because it

11:53.580 --> 11:56.220
sounds very natural when it's prompted properly.

11:57.420 --> 11:59.420
And now I should receive a new email.

11:59.700 --> 12:01.260
So let's check my inbox.

12:03.500 --> 12:04.500
Let's refresh it.

12:09.020 --> 12:09.460
Yep.

12:14.340 --> 12:22.100
So, so from company 1 to 3, please approve or decline the sending of this message generated by Jim.

12:24.740 --> 12:27.780
Elevate your customer service with a voice agent.

12:28.180 --> 12:29.980
Adaptive AI's expertise.

12:30.140 --> 12:30.900
The demon.

12:31.180 --> 12:37.100
Thank you for your interest in adaptive AI services for company I was agent project.

12:37.740 --> 12:46.980
We are well equipped to meet your 1 to 2 week timeline and 5 to 10 K budget for revolutionizing your

12:46.980 --> 12:49.540
inbound service requests and appointment booking.

12:50.140 --> 12:53.300
Our recent successes demonstrate our capabilities.

12:53.940 --> 12:56.180
A Vos agent for appointment booking.

12:57.100 --> 12:58.300
The same information.

12:58.300 --> 13:01.740
So the numbers and the second example.

13:01.780 --> 13:09.740
As you can see, our sales agent was able to retrieve this information from project database.

13:10.420 --> 13:13.980
So the second base from our Airtable.

13:15.700 --> 13:24.500
So customer support automation for eCommerce delivered a 24 seven AI chatbot for customer support.

13:24.540 --> 13:32.180
It handled 82% of incoming queries without human escalation and improved response time by 70%.

13:37.330 --> 13:38.290
Is correct.

13:38.290 --> 13:42.890
So these results showcase our ability to deliver efficient, high impact solutions quickly.

13:43.770 --> 13:47.330
I would like to discuss how we can tailor our agents for company.

13:47.770 --> 13:48.770
I think it's great.

13:49.730 --> 13:50.970
I'm really happy with that.

13:52.450 --> 13:53.850
So I'm going to approve it.

13:56.610 --> 13:57.570
Respond button.

13:59.730 --> 14:00.970
And just type approved.

14:03.370 --> 14:04.450
And hit submit.

14:08.210 --> 14:10.890
As you can see workflow successfully executed successfully.

14:13.530 --> 14:15.090
So the email has been sent.

14:19.130 --> 14:22.970
And it should be sent to the email our lead provided.

14:25.090 --> 14:26.370
So let's check.

14:32.370 --> 14:33.010
All right.

14:46.610 --> 14:48.450
Okay, so elevator customer service.

14:48.490 --> 14:49.650
With voice agents.

14:50.410 --> 14:51.810
And now we can see the formatting.

14:53.010 --> 14:53.210
The.

14:53.210 --> 14:54.810
Damon, thank you for your interest.

14:57.930 --> 14:58.330
All right.

14:58.330 --> 14:58.930
Amazing.

14:58.930 --> 15:05.450
I think it's I think this email is convincing and it's a good example of a good sales email.

15:07.330 --> 15:11.890
You also have a link to my calendar to not to not miss any opportunity.

15:13.690 --> 15:14.010
Okay.

15:14.010 --> 15:14.530
Great.

15:14.530 --> 15:18.690
So now I'm going to show you how to build this setup step by step from scratch.

15:19.730 --> 15:22.930
So let's dive right in and build this step by step from scratch.

15:23.370 --> 15:25.490
All right first things first.

15:25.530 --> 15:32.880
We need to set up our Airtable base because this is where all our lead data is going is going to leave.

15:33.440 --> 15:35.600
So I'm going to create two tables.

15:36.320 --> 15:38.600
So the first one is going to be called leads.

15:39.200 --> 15:42.000
And this is where new form submissions will go.

15:42.160 --> 15:46.120
So basically you can create forms with all these fields.

15:46.440 --> 15:52.240
And then when a new lead submits a form all the data will be saved in this table.

15:54.760 --> 15:57.000
And the second table will be projects.

15:57.000 --> 16:08.200
So this is going to be our database of past work that the I sales agent can reference to make more convincing

16:08.240 --> 16:09.120
sales emails.

16:09.960 --> 16:12.400
So let me show you how to build it from scratch.

16:13.080 --> 16:15.280
So first you need to go to Airtable.

16:15.280 --> 16:15.800
Com.

16:19.560 --> 16:21.080
Or just simply Google it.

16:25.960 --> 16:26.520
Table.

16:29.960 --> 16:31.680
And you need to create an account.

16:31.680 --> 16:33.080
If you don't have one yet.

16:39.240 --> 16:42.560
Then please log in and what you need to do.

16:42.560 --> 16:47.000
You need to create a workspace by simply click on this plus button.

16:50.560 --> 16:54.240
Let's say human in the loop.

16:55.680 --> 16:56.840
This is our project.

17:03.240 --> 17:06.480
And we want to create this workspace from scratch.

17:06.520 --> 17:07.640
So start from scratch.

17:07.960 --> 17:11.280
Build your ideal workflow starting with a blank table.

17:12.720 --> 17:13.400
All right.

17:14.440 --> 17:16.280
And let's call this base.

17:20.040 --> 17:21.080
Human in the loop.

17:24.800 --> 17:27.360
Let's change the color to orange.

17:29.600 --> 17:30.480
Or maybe blue.

17:33.000 --> 17:34.320
And now the first table.

17:34.360 --> 17:35.240
As you can.

17:35.280 --> 17:38.840
If you can remember, it's for storing list details.

17:39.640 --> 17:42.560
So let's and hit save.

17:47.240 --> 17:47.960
All right.

17:50.000 --> 17:52.080
So now we need to create all the fields.

17:54.440 --> 17:55.720
So first we have a name.

17:57.440 --> 18:01.080
When we double click on it you can choose the type of the field.

18:01.600 --> 18:05.440
So in this in this one we want to be uh.

18:06.360 --> 18:10.040
So for this one we want it to be single line text.

18:11.880 --> 18:15.560
Then uh let's remove this one.

18:17.160 --> 18:18.240
So delete field.

18:20.000 --> 18:21.840
Actually let's remove all of them.

18:27.590 --> 18:28.150
Okay.

18:30.070 --> 18:30.270
Okay.

18:30.310 --> 18:33.750
So the next one will be will be the least email.

18:34.550 --> 18:36.470
So let's search for email.

18:39.470 --> 18:42.510
And you can as you can see automatically we have an email type.

18:43.830 --> 18:47.350
Let's call it email create field.

18:48.150 --> 18:49.030
The next one.

18:52.190 --> 18:55.750
We want to include company name.

18:55.750 --> 18:58.390
So it will be single line text as well.

18:59.710 --> 19:00.750
So company name.

19:03.830 --> 19:04.870
Create field.

19:10.310 --> 19:11.230
Then intent.

19:11.630 --> 19:14.150
So basically what they are looking for.

19:15.790 --> 19:17.390
So again single line text.

19:19.630 --> 19:20.470
Intent.

19:20.670 --> 19:21.670
Create field.

19:24.950 --> 19:26.470
The next one budget.

19:28.110 --> 19:29.590
So it will be single select.

19:31.310 --> 19:33.950
So you can include different budget ranges.

19:36.790 --> 19:39.750
Budget create fields.

19:42.150 --> 19:47.750
Of course as always I'm going to provide the copy of this base.

19:47.750 --> 19:51.550
So these two tables in the resources section of this lesson.

19:52.030 --> 19:57.390
But I want to show you how to create the tables in Airtable from scratch.

19:57.630 --> 20:06.310
So then you will be able to create tables from scratch yourself and use Airtable as a CRM for your future

20:06.310 --> 20:07.030
automations.

20:07.070 --> 20:07.470
All right.

20:07.470 --> 20:10.830
So now we have budget and we need to provide some options.

20:11.590 --> 20:15.150
So you need to double click on the first field.

20:17.590 --> 20:24.460
And as you can see there is no option to choose I'm going to check what you have here.

20:25.540 --> 20:27.020
We have in progress to do.

20:27.060 --> 20:27.540
Done.

20:28.260 --> 20:29.820
So let's add the three.

20:30.460 --> 20:31.420
So to do in progress.

20:31.420 --> 20:31.780
Done.

20:33.380 --> 20:39.500
So double click and just start typing to do and hit enter.

20:42.020 --> 20:44.300
Now let's add in progress.

20:47.260 --> 20:49.580
And hit enter to add option.

20:50.300 --> 20:59.980
And now when you want to check what budget options there are to choose from in the second field.

21:00.700 --> 21:04.300
So for the second lead it has been saved.

21:05.900 --> 21:08.300
So let's add done.

21:11.980 --> 21:14.140
We also have 5 to 10 k.

21:19.860 --> 21:21.140
210 K.

21:28.940 --> 21:31.540
0 to 5 k and ten k up.

21:49.980 --> 21:50.700
I create.

21:55.300 --> 21:58.460
The next field is product description.

22:00.100 --> 22:01.060
The long text.

22:04.500 --> 22:06.740
So looking for long text.

22:09.020 --> 22:10.340
Project description.

22:13.260 --> 22:14.140
Create field.

22:18.010 --> 22:18.970
And timeline.

22:22.090 --> 22:23.050
This is single select.

22:23.050 --> 22:23.570
Swell.

22:28.250 --> 22:29.650
To do in progress.

22:29.650 --> 22:30.610
Done in Argent.

22:32.410 --> 22:33.690
So let's add all of them.

22:39.650 --> 22:39.890
Okay.

22:39.890 --> 22:41.170
So it's a single select.

22:45.970 --> 22:48.890
Timeline create field.

22:50.130 --> 22:51.370
Let's add all the options.

22:53.930 --> 22:56.570
So again you have to do in progress.

22:56.570 --> 22:57.010
Done.

23:00.090 --> 23:05.250
Double click type to do save.

23:07.850 --> 23:08.770
In progress.

23:12.250 --> 23:12.850
And.

23:15.170 --> 23:15.850
Done.

23:15.890 --> 23:16.650
Enter.

23:17.690 --> 23:18.770
And also Argent.

23:18.810 --> 23:20.170
Next 1 to 2 weeks.

23:24.650 --> 23:25.730
The last option.

23:33.130 --> 23:34.530
1 to 2 weeks.

23:35.810 --> 23:36.130
Okay.

23:36.170 --> 23:36.730
Great.

23:40.330 --> 23:46.290
And the last field created will be automatically created once the new lead comes in.

23:49.250 --> 23:49.730
All right.

23:49.730 --> 23:52.210
So now is the time to create the second table.

23:53.010 --> 24:00.690
So yeah our sales agent will be able to check this table and collect better emails.

24:05.450 --> 24:09.290
So you can click on this drop down at table.

24:14.720 --> 24:15.760
Start from scratch.

24:19.080 --> 24:22.880
And name it projects.

24:23.880 --> 24:24.680
It's safe.

24:26.600 --> 24:28.680
We don't need attachments.

24:28.720 --> 24:29.560
Status.

24:33.640 --> 24:34.560
Right.

24:38.000 --> 24:41.200
Now, in the projects table, we have project and details.

24:41.840 --> 24:43.880
And this is single line text.

24:43.880 --> 24:45.320
And this is long text.

24:53.120 --> 24:54.920
Project single line text.

24:55.200 --> 24:58.800
Save and long.

24:59.800 --> 25:02.520
You can also search it right here.

25:04.480 --> 25:05.160
Text.

25:07.960 --> 25:09.040
And details.

25:11.000 --> 25:11.480
All right.

25:11.480 --> 25:11.840
Amazing.

25:11.840 --> 25:16.200
So now let's move on and jump into an item to create our system.

25:16.480 --> 25:23.200
Again, you can easily download this template from the resources section of this lesson and simply import

25:23.200 --> 25:28.760
it by clicking on this three dots import from file and so on.

25:29.760 --> 25:33.600
But I'm going to show you how to build the setup step by step from scratch.

25:34.760 --> 25:36.360
So now let's create a new workflow.

25:41.160 --> 25:47.160
Now we want this system to be activated when a new lead comes into our Airtable.

25:47.160 --> 25:48.160
So our CRM.

25:48.320 --> 25:53.200
So first we are going to add a table sugar node as a first step.

25:53.640 --> 25:56.800
So at first step search for a table.

26:00.760 --> 26:01.680
Press on that.

26:02.240 --> 26:05.560
So our workflow will be triggered on new Airtable event.

26:08.200 --> 26:09.550
Now what we want to do.

26:09.590 --> 26:17.030
We want to connect our table account and the tables we just created to our workflow.

26:17.150 --> 26:18.830
So we need to set up credentials.

26:19.190 --> 26:24.270
So simply click on this dropdown create new credential.

26:28.190 --> 26:34.790
And as you can see API key this type of connection API key was depreciated and can be used anymore.

26:35.390 --> 26:38.270
Please create a new credential of type access token instead.

26:38.630 --> 26:40.750
So we can't use this option anymore.

26:41.990 --> 26:43.430
We have two access token.

26:45.350 --> 26:49.630
And you have to make sure to enable the following scopes for our token.

26:50.430 --> 26:57.230
As you already know, N810 has a brilliant documentation, so you can open docs and follow the instruction

26:57.230 --> 26:57.910
from here.

27:01.030 --> 27:04.150
Step by step, just go through it.

27:09.630 --> 27:14.990
And you will find exactly the same information as I'm going to provide you in this part of this lesson.

27:15.350 --> 27:19.510
But I will show you everything visually so you can follow me.

27:21.310 --> 27:21.950
All right.

27:23.150 --> 27:26.270
So now let's go to our Airtable account.

27:31.430 --> 27:34.870
And I can't press on that.

27:40.150 --> 27:44.150
Scroll down, click on go to Developer Hub.

27:50.070 --> 27:51.230
Click on create token.

27:55.430 --> 27:56.510
Create new token.

27:59.030 --> 27:59.950
Name it somehow.

28:00.910 --> 28:02.270
Let's say human in the loop.

28:10.260 --> 28:11.620
Now we need to add scope.

28:13.420 --> 28:15.620
So let's go back to our workflow.

28:16.180 --> 28:22.900
As you can see we have to add data dot records read write and schema dot read.

28:27.940 --> 28:31.740
So add scope data records read.

28:33.780 --> 28:35.580
Data records right.

28:38.900 --> 28:44.660
So basically this node will be able to create, edit and delete records in our table.

28:51.220 --> 29:00.260
And the last one we want it to be able to see the structure of a base like table names or field types.

29:01.740 --> 29:02.100
Right.

29:02.580 --> 29:04.460
And also this token.

29:06.740 --> 29:09.140
Should access the following bases and workspaces.

29:11.540 --> 29:15.420
So you can only grant access to bases and workspaces that you have access to.

29:15.980 --> 29:17.580
So add all resources.

29:19.380 --> 29:26.740
So by doing this the connection we are setting up now will allow access to all the bases we have created

29:26.980 --> 29:28.580
and will create in the future.

29:28.860 --> 29:32.340
But you can restrict it to just one base.

29:32.340 --> 29:37.100
So basically the human in the loop base just created.

29:41.900 --> 29:46.060
So I'm going to leave it like that and click on Create token.

29:48.900 --> 29:50.020
Copy our token.

29:50.780 --> 29:51.500
Confirm.

29:52.660 --> 29:54.060
Go back to our workflow.

29:54.540 --> 29:58.100
Paste it right here and hit save.

30:00.420 --> 30:02.490
As you can see credentials successfully created.

30:04.490 --> 30:04.970
Great.

30:08.210 --> 30:12.810
Now we want this trigger note to watch our table.

30:13.130 --> 30:18.290
So the this table every minute.

30:20.690 --> 30:21.890
But it's completely up to you.

30:21.890 --> 30:25.690
You can change it to every hour, every day, every week, etc..

30:27.650 --> 30:29.090
Now you want it to.

30:31.530 --> 30:34.170
Check the base by ID.

30:36.570 --> 30:38.170
So go back to your base.

30:42.290 --> 30:46.370
And after this slash this is your base ID.

30:47.050 --> 30:48.850
So up everything after up.

30:52.010 --> 30:52.450
All right.

30:52.450 --> 30:52.970
Great.

30:52.970 --> 30:55.930
So let's copy it before the second slash.

31:05.370 --> 31:06.690
And let's paste it right here.

31:10.370 --> 31:14.970
And you also want it to search by ID for a table.

31:16.970 --> 31:23.210
So the same table is the second piece of this URL.

31:24.810 --> 31:29.690
So table copy it and paste it right here.

31:36.290 --> 31:37.610
Now the trigger field.

31:37.970 --> 31:43.250
As you can see I created time or last modified time field that will be used to sort records.

31:43.250 --> 31:48.930
If you don't have a created time or last modified time field in your schema, please create one because

31:48.930 --> 31:52.170
without this field trigger will not work correctly.

31:52.890 --> 31:57.250
And when we go back to your Airtable.

31:57.250 --> 31:57.290
table.

32:01.210 --> 32:03.530
And now when I add a new field.

32:04.970 --> 32:08.730
So create created time.

32:13.690 --> 32:14.970
Name it created.

32:20.370 --> 32:21.570
Hit create field.

32:23.170 --> 32:28.010
As you can see, this field is automatically populated.

32:30.970 --> 32:31.810
Alright, great.

32:31.810 --> 32:34.290
Let's go back to our workflow.

32:39.330 --> 32:42.810
And type the same name so created.

32:45.730 --> 32:46.130
All right.

32:46.130 --> 32:46.690
Amazing.

32:46.690 --> 32:48.050
So that's it for this note.

32:48.050 --> 32:50.210
We have done all the configuration.

32:52.050 --> 32:53.050
Now let's move on.

32:54.170 --> 32:54.850
Excellent.

32:54.890 --> 32:57.120
Now we're gonna get some data into the flow.

32:57.760 --> 32:59.280
So make this workflow active.

33:01.960 --> 33:02.560
Confirm.

33:06.640 --> 33:08.360
Now let's go to our tables.

33:10.440 --> 33:12.240
Let's provide some dummy data.

33:14.480 --> 33:15.160
Damon.

33:21.200 --> 33:22.480
At gmail.com.

33:24.600 --> 33:25.680
Company name.

33:33.240 --> 33:34.200
Was agent.

33:49.880 --> 33:55.120
Let's sign this one for the project description, let's say.

33:58.160 --> 33:59.680
AI voice agent.

34:02.160 --> 34:02.800
Handle.

34:05.600 --> 34:06.160
Calls.

34:10.480 --> 34:11.320
Timeline.

34:12.000 --> 34:12.800
Agent.

34:14.080 --> 34:14.400
All right.

34:14.440 --> 34:14.920
Great.

34:16.880 --> 34:18.600
Now let's go back to our workflow.

34:22.600 --> 34:23.960
And click on Test Workflow.

34:28.520 --> 34:30.200
Let's open the node to see the output.

34:32.680 --> 34:37.160
And as you can see we got all the data we just inserted into the table.

34:41.280 --> 34:48.360
So the name the email the company name intent budget project description agent to handle inbound calls,

34:48.400 --> 34:49.840
timeline and created.

34:50.000 --> 34:55.230
Of course you can also switch to schema and to JSON format.

34:59.790 --> 35:00.150
All right.

35:00.150 --> 35:00.750
Amazing.

35:01.550 --> 35:02.270
Let's move on.

35:02.670 --> 35:09.390
Now in the next step we want to add our sales agent, which will be able to process all this data and

35:09.390 --> 35:10.670
push it to the next node.

35:12.110 --> 35:14.470
So let's add an agent.

35:21.750 --> 35:22.870
Let's define below.

35:22.870 --> 35:28.310
So use an expression to reference data in previous nodes or enter static text.

35:35.510 --> 35:42.630
And for the prompt we want to inform our agent that this is incoming lead.

35:43.790 --> 35:48.270
So let's say let's switch to an expression mode.

35:50.590 --> 35:51.590
Let's explain it.

35:53.790 --> 35:54.190
Coming.

35:54.190 --> 35:54.670
Lit.

35:57.750 --> 35:59.750
And you have to list all these fields.

36:00.830 --> 36:06.070
So the first one name and simply drag and drop.

36:08.870 --> 36:09.790
Then email.

36:21.790 --> 36:23.230
Next we have company name.

36:36.390 --> 36:37.230
Intent.

36:45.110 --> 36:45.870
Budget.

36:56.420 --> 36:57.180
Description.

37:08.260 --> 37:08.860
Timeline.

37:17.740 --> 37:18.980
And created fields.

37:27.820 --> 37:32.980
So thanks to that, our agent will be able to retrieve this data dynamically.

37:33.740 --> 37:34.940
So it is not hardcoded.

37:39.620 --> 37:44.100
Like right now we require specific output format.

37:46.700 --> 37:47.420
Right.

37:48.660 --> 37:50.620
And now we want to add the system prompt.

37:50.620 --> 37:53.460
So at option System message.

37:57.980 --> 38:02.300
Let's switch to expression and expand it.

38:04.060 --> 38:06.580
Now I'm going to paste the prompt I prepared.

38:06.900 --> 38:13.100
And again when you import the template into your canvas it will be already set up for you.

38:13.380 --> 38:15.500
But you can easily modify it if you want to.

38:15.820 --> 38:17.340
So the prompt is overview.

38:17.380 --> 38:21.980
You are an expert salesperson for an agency that delivers solutions.

38:22.020 --> 38:27.820
Your job is to respond to incoming leads by addressing their needs in a professional manner.

38:27.940 --> 38:33.340
You will receive information like the leads, project description and timeline, and your goal is to

38:33.340 --> 38:36.980
convince them that we are the best agency on the market.

38:38.140 --> 38:38.740
But the tools.

38:38.740 --> 38:40.060
We have a project database.

38:40.100 --> 38:43.940
So we are going to connect our second table.

38:45.170 --> 38:47.010
So the products table.

38:47.730 --> 38:51.650
So the agent will be able to reference to that.

38:52.130 --> 38:56.810
So the product database is to use this tool to search through previous projects.

38:56.810 --> 38:59.050
We have completed rules.

38:59.050 --> 39:04.650
You will receive information about a lead and you need to craft a concise and professional email.

39:05.170 --> 39:08.970
Your main objective is to convince the lead to book a second call.

39:09.570 --> 39:13.370
Make them believe that we can deliver the project and exceed expectations.

39:14.530 --> 39:20.050
Retrieve information about relevant past project to include as proof of capability.

39:20.410 --> 39:28.490
Mention the client outcome or results we help them achieve and here include a link to book a call using

39:28.490 --> 39:29.050
this link.

39:29.250 --> 39:34.250
So here you can paste the link to your calendar email signature.

39:34.290 --> 39:38.170
Sign off emails as Damien CEO at adaptive AI.

39:38.650 --> 39:45.050
And here we are providing the current date and time for our agents to make sure it will not make mistakes.

39:45.370 --> 39:54.090
Of course, you can modify and change this prompt to meet your needs for your specific use case.

39:55.370 --> 39:56.250
Alright, great.

39:56.730 --> 39:57.730
Now let's move on.

40:02.690 --> 40:04.730
So we've done the configuration of this node.

40:07.650 --> 40:08.770
So you can just carry on.

40:09.330 --> 40:11.290
Now as you can see you have some issues.

40:12.410 --> 40:16.170
So no node connected to required input model.

40:16.370 --> 40:19.850
So we need to provide brain for our agent.

40:20.330 --> 40:25.930
So in this workflow we are going to use code from our topic.

40:26.330 --> 40:28.490
But I'm going to show you how to do it later.

40:29.050 --> 40:30.530
For now let's add the tool.

40:32.130 --> 40:35.930
So we are going to add the second table we've created earlier.

40:36.810 --> 40:38.130
So the project table.

40:41.320 --> 40:42.720
So let's search for a table.

40:47.720 --> 40:48.520
Alright, great.

40:49.240 --> 40:54.560
Just make sure we are connected to the correct Airtable account.

40:57.440 --> 41:01.280
So in my case it was a table.

41:01.280 --> 41:02.040
Account two.

41:07.360 --> 41:10.720
Of course, you can rename the name of the connection.

41:13.440 --> 41:14.560
By setting it up.

41:15.600 --> 41:15.880
Alright.

41:15.880 --> 41:16.200
Great.

41:16.200 --> 41:20.000
So two description set automatically resource record.

41:20.040 --> 41:26.840
Because we want to retrieve a record operation, we want to search for specific records or list all.

41:29.640 --> 41:32.480
And we want to retrieve a base from a list.

41:32.760 --> 41:35.640
So we want to connect to the human in the loop base.

41:38.280 --> 41:39.080
As you can see.

41:42.320 --> 41:43.280
And table.

41:43.720 --> 41:52.480
We want to use projects, not least because we want to give our agent access to the previous project

41:52.480 --> 41:54.440
we've done in our business.

41:57.480 --> 41:58.560
We want to retain all.

42:01.040 --> 42:01.360
Right.

42:01.360 --> 42:02.000
Great.

42:02.040 --> 42:02.320
Yes.

42:02.320 --> 42:06.640
So leave the search criteria empty so all the records will be returned.

42:06.800 --> 42:10.000
We don't need to add any option and to add any sort rule.

42:10.720 --> 42:10.960
Okay.

42:11.000 --> 42:11.280
Great.

42:11.280 --> 42:12.360
Let's let's move on.

42:16.000 --> 42:17.240
And let's rename it.

42:19.960 --> 42:21.120
Project database.

42:25.760 --> 42:26.560
Confirm.

42:31.400 --> 42:31.920
Okay.

42:32.720 --> 42:37.590
Now we don't want to add a memory for our agent in this workflow.

42:38.870 --> 42:40.430
So now let's add chat model.

42:41.550 --> 42:45.710
So basically we need to set up our large language models.

42:45.790 --> 42:48.550
So we are going to use two different models in this workflow.

42:48.910 --> 42:51.350
First drag in an anthropic chat model.

42:51.470 --> 42:56.110
So this is going to power our main sales agent and revision agent.

42:56.550 --> 43:01.030
And I'm using cloud because it writes really human like emails.

43:01.270 --> 43:04.110
So we'll need to add your anthropic API credentials here.

43:04.910 --> 43:14.750
So let's drag the search for anthropic actually by clicking on this plus button to add the chat model.

43:16.230 --> 43:17.350
Anthropic chat model.

43:18.870 --> 43:19.550
Okay great.

43:19.870 --> 43:26.230
Now if you don't have an account connected to an A-10, I'm going to quickly show you how to do it.

43:26.710 --> 43:32.190
But you can also find a dedicated tutorial in the How to Set up credentials section, where I provide

43:32.190 --> 43:33.230
more information.

43:34.550 --> 43:37.470
First thing first you need to create an account.

43:38.910 --> 43:42.430
So head over to console.com.

43:43.070 --> 43:44.390
Provide an email address.

44:02.430 --> 44:07.790
Go to your email inbox to get the verification code.

44:10.070 --> 44:11.670
Sign in to entropy console.

44:18.590 --> 44:19.590
Just wait a moment.

44:22.030 --> 44:22.950
Provide your name.

44:30.510 --> 44:31.270
Continue.

44:37.060 --> 44:37.980
What type of account?

44:38.020 --> 44:38.860
Sounds right.

44:39.220 --> 44:39.980
Individual?

44:40.260 --> 44:41.300
Not from a company.

44:47.100 --> 44:49.780
Now this is really important to use API key.

44:50.140 --> 44:56.460
So to make API calls to any of the Anthropic's models you need to add some credits.

44:56.900 --> 45:01.940
So you need to buy credits before you can create the API key.

45:02.820 --> 45:08.900
And because I already have multiple accounts, I'm going to login to my different account just to show

45:08.900 --> 45:11.340
you how to create an API key.

45:11.700 --> 45:12.060
All right.

45:12.060 --> 45:21.260
So once you top up your account click on get API key and you can press on this API keys icon.

45:23.220 --> 45:27.420
And here you can see all the billing details limits API keys etc..

45:29.700 --> 45:31.340
So I'm going to create a key.

45:33.660 --> 45:35.060
In the default workspace.

45:36.820 --> 45:37.940
The human in the loop.

45:42.900 --> 45:49.140
To know how much it will charge me for API calls for this specific workflow.

45:49.820 --> 45:52.500
So add copy key.

45:53.340 --> 45:54.940
Go back to the workflow.

45:59.100 --> 46:05.660
Click on the dropdown Create new credential and add API key.

46:07.420 --> 46:11.420
Press Save and Credential successfully created.

46:12.580 --> 46:14.700
And now you have access to all the models.

46:15.260 --> 46:20.180
So cloud 3.7, sonnet cloud sonnet four and so on.

46:22.740 --> 46:23.100
All right.

46:23.100 --> 46:23.780
Amazing.

46:26.740 --> 46:29.170
Now let's move it a bit right here.

46:32.010 --> 46:32.810
And hit save.

46:33.970 --> 46:37.170
Now we are gonna set email node.

46:37.570 --> 46:43.450
And this is a crucial node that many people miss because we need a set node to store the current version

46:43.450 --> 46:46.290
of the email as we go through revisions.

46:47.610 --> 46:51.050
So let's search for set node and configure it.

46:54.770 --> 46:55.810
So set node.

47:04.850 --> 47:08.930
Now let's name this email.

47:11.130 --> 47:14.130
As the value let's put output here.

47:17.010 --> 47:22.610
Now as you can see here the agent gave us a great email response.

47:23.610 --> 47:29.050
But everything is packed inside a single output object as a plain text.

47:29.730 --> 47:38.970
So we don't have separate fields like subject and email, which makes it harder to map or reuse this

47:38.970 --> 47:42.610
content in other steps, like sending an email automatically.

47:43.050 --> 47:48.810
And that's because we haven't added the structured output parser node.

47:50.370 --> 47:51.450
As you can see here.

47:53.850 --> 48:03.010
So that's the tool that tells the AI model hey, returned your output in clean structured JSON format

48:03.370 --> 48:04.930
so we can easily work with.

48:05.210 --> 48:06.890
So before we go any further.

48:09.010 --> 48:12.690
We need to add this node to fix that.

48:12.690 --> 48:20.610
By adding this structured output parser and updating our system prompt to return a proper to return

48:20.610 --> 48:22.050
a proper JSON object.

48:25.970 --> 48:26.650
All right.

48:27.330 --> 48:28.890
So let's close this node for now.

48:31.130 --> 48:36.410
And here we need to add output parser.

48:38.970 --> 48:41.330
So select this one structured output parser.

48:41.330 --> 48:43.770
Return data in a defined JSON format.

48:47.610 --> 48:50.250
Defined below schema manually.

48:53.610 --> 48:55.690
And I'm going to paste this code snippet.

49:01.770 --> 49:03.490
As you can see subject and email.

49:09.650 --> 49:11.810
So it will be formatted as you want.

49:13.610 --> 49:14.530
All right great.

49:17.250 --> 49:20.930
Now let's hit save and test the workflow again.

49:38.920 --> 49:40.320
Now let's open Edit Field.

49:41.840 --> 49:48.600
And as you can see now we have two separate fields inside this output object we have a subject and email.

49:49.520 --> 49:56.600
So here let's remove this and let's drag and drop the email field.

49:59.040 --> 49:59.400
Alright.

49:59.400 --> 50:00.000
Brilliant.

50:01.520 --> 50:02.760
That's it for this note.

50:04.200 --> 50:05.080
Hit save again.

50:05.800 --> 50:11.760
Now when our draft is ready because our SAS agent was able to prepare it for us.

50:12.280 --> 50:14.560
We need to get human feedback on the email.

50:14.760 --> 50:18.680
So we are going to use Gmail's send and wait functionality for this.

50:19.720 --> 50:22.800
So let's search for a Gmail node.

50:28.400 --> 50:30.680
I want to send a message and wait for a response.

50:33.680 --> 50:35.280
Now connect your Gmail account.

50:37.400 --> 50:40.240
As resource we have a message operation.

50:40.280 --> 50:41.680
Send and wait for response.

50:44.520 --> 50:45.920
Here you have to specify.

50:46.400 --> 50:50.960
Here you have to specify which email you want this draft be sent to.

50:52.760 --> 50:54.040
So enlightened demos.

50:57.000 --> 50:57.680
Dot com.

51:01.520 --> 51:04.480
Now for subject let's say.

51:07.680 --> 51:08.680
Make it capital.

51:11.320 --> 51:12.200
Required.

51:17.160 --> 51:17.560
Uh.

51:23.070 --> 51:28.270
And let's expand it in our name.

51:28.470 --> 51:32.350
Let's grab our new nickname and paste it right here.

51:34.430 --> 51:36.510
Make sure to switch over to Expression mode.

51:38.710 --> 51:39.990
And now for the message.

51:40.590 --> 51:42.390
And now for the actual message.

51:44.110 --> 51:45.390
Let's grab the name again.

51:45.390 --> 51:46.550
So the name of the lead.

51:48.310 --> 51:49.990
Make sure to switch to expression.

51:53.870 --> 51:55.750
From a company.

51:56.550 --> 52:00.190
So drag and drop this company name field to make it dynamic.

52:03.710 --> 52:04.630
It's looking.

52:07.190 --> 52:07.590
For.

52:09.870 --> 52:11.630
And let's grab an intent.

52:14.310 --> 52:16.110
We can expand it to make it easier.

52:21.910 --> 52:25.830
Um dot the budget.

52:28.670 --> 52:29.310
Is.

52:29.350 --> 52:33.670
And let's get a budget right here.

52:40.230 --> 52:41.630
With a specific timeline.

52:45.670 --> 52:46.910
And timeline here.

52:53.190 --> 52:54.950
Now please approve.

52:59.270 --> 53:00.310
Or decline.

53:05.270 --> 53:07.910
The sending of this, uh, message.

53:12.630 --> 53:16.700
Generated By Carl.

53:20.420 --> 53:20.900
Auer.

53:20.940 --> 53:27.820
SS agent and the subject field we can grab from the a agent node.

53:30.300 --> 53:31.340
Okay, great.

53:35.940 --> 53:36.820
And the email.

53:39.460 --> 53:40.860
From the edit fields node.

53:43.780 --> 53:44.700
Okay, perfect.

53:46.060 --> 53:47.060
Now let's close it.

53:49.500 --> 53:54.380
And for the response type we want to change it to free text.

53:54.380 --> 53:56.660
So user can submit a response via form.

53:57.700 --> 54:00.340
But you can also choose approval.

54:00.340 --> 54:05.300
So user can approve or disapprove from within the message or custom form.

54:05.300 --> 54:07.940
So user can submit a response via a custom form.

54:09.340 --> 54:09.460
Okay.

54:09.460 --> 54:10.780
So I'm going to stick with it.

54:13.660 --> 54:14.500
And hit save.

54:14.900 --> 54:22.460
Just to clarify, this is really important step because, uh, setting the response type to free text

54:23.780 --> 54:29.500
allows you to give detailed feedback, not just approve and decline.

54:31.140 --> 54:31.460
All right.

54:31.460 --> 54:31.940
Great.

54:31.940 --> 54:38.140
So now let's just rename this node to get feedback.

54:42.900 --> 54:43.740
Confirm.

54:46.340 --> 54:47.860
Uh resetting email.

54:47.860 --> 54:49.300
So set email.

54:53.700 --> 54:54.060
Okay.

54:54.060 --> 54:54.700
Great.

54:56.860 --> 55:02.620
Now we need to determine whether the human approved the email or wants revisions.

55:03.180 --> 55:05.700
So we'll use AI to classify the feedback.

55:06.820 --> 55:11.100
So now drag in a text classifier node.

55:12.170 --> 55:15.410
So let's search for text classifier.

55:23.970 --> 55:24.290
Yes.

55:24.290 --> 55:32.970
So basically at this stage we are classifying the feedback I'm going to show you this example.

55:36.250 --> 55:40.890
So the human the human can either approve the result or decline it.

55:41.490 --> 55:45.050
So we need to create two categories of feedback.

55:45.730 --> 55:46.690
So two branches.

55:50.890 --> 55:55.250
So we are going to classify the text from the feedback.

55:56.410 --> 55:57.370
So the data.

55:57.410 --> 56:07.970
So we need to drag and drop this field this object and add dot text because we want to change it to

56:09.050 --> 56:09.890
this form.

56:10.530 --> 56:17.890
So adding the text because we want to extract just the feedback text from the data object for classification.

56:18.330 --> 56:23.330
We don't need the content from the entire object, just the text.

56:27.850 --> 56:29.410
Now we need just two categories.

56:32.130 --> 56:33.570
So approved or declined.

56:40.170 --> 56:42.490
And I'm going to paste the description I prepared.

56:45.370 --> 56:48.730
So in that case you don't need to switch to the expression mode.

56:48.730 --> 56:52.090
Because we don't we are not going to include any.

56:52.450 --> 56:53.970
So any dynamic variables.

56:55.290 --> 56:56.850
I'm going to place it right here.

56:59.090 --> 57:00.490
Just expand it to show you.

57:02.970 --> 57:09.960
So the email has been reviewed and accepted as it is the human explicitly or implicitly expresses approval,

57:09.960 --> 57:12.080
indicating that no changes are needed.

57:13.600 --> 57:16.600
And here we can just do the formatting.

57:16.600 --> 57:20.240
So example phrases include looks good.

57:23.000 --> 57:24.680
Go ahead and send it.

57:28.400 --> 57:29.400
This works for me.

57:30.880 --> 57:31.600
Approved.

57:34.360 --> 57:35.440
No changes needed.

57:35.800 --> 57:38.000
So of course you can add more phrases.

57:43.040 --> 57:47.640
I create and the second case is the client.

57:55.200 --> 57:56.560
I need to provide description.

57:57.560 --> 58:00.360
So describe your category if it's not obvious.

58:01.040 --> 58:02.400
Now let's type it from scratch.

58:02.600 --> 58:03.920
I'm going to expand it.

58:05.560 --> 58:06.880
Okay, so the email.

58:10.080 --> 58:11.480
Has been reviewed.

58:22.160 --> 58:23.080
But the human.

58:27.800 --> 58:30.800
Requests modifications before.

58:33.080 --> 58:33.640
And.

58:38.520 --> 58:40.440
Before it is sent.

58:47.480 --> 58:48.400
Like tweaks.

58:52.200 --> 58:53.040
Removing.

58:56.320 --> 58:57.120
Some parts.

59:01.080 --> 59:01.840
Wording.

59:04.950 --> 59:05.630
Etc..

59:08.470 --> 59:10.470
This could include suggested edits.

59:29.190 --> 59:30.350
On major revisions.

59:38.870 --> 59:40.430
Sample phrases include.

59:50.030 --> 59:52.630
For example, can we tweak this part?

01:00:08.470 --> 01:00:09.590
Please make it shorter.

01:00:31.270 --> 01:00:32.390
I would like to.

01:00:36.990 --> 01:00:37.830
Be rewarded.

01:00:40.110 --> 01:00:40.830
For this.

01:00:49.230 --> 01:00:49.630
Mm.

01:00:52.110 --> 01:00:53.190
Let's revise it.

01:01:05.380 --> 01:01:06.460
Don't mention.

01:01:09.020 --> 01:01:09.580
That.

01:01:10.660 --> 01:01:11.380
And so on.

01:01:14.300 --> 01:01:22.020
Basically what we've done, we provided the clear instruction for the large language model, how to

01:01:22.060 --> 01:01:23.660
classify the feedback.

01:01:28.820 --> 01:01:31.220
So now you should have two branches.

01:01:34.620 --> 01:01:36.540
As you can see approved and declined.

01:01:38.060 --> 01:01:38.420
Yes.

01:01:38.420 --> 01:01:44.980
So this classifier node we wrote the workflow to either send the email or revise it.

01:01:45.540 --> 01:01:50.500
So now we need to connect this node to the LM model.

01:01:51.460 --> 01:01:59.140
So this is essential because without it the text classifier has no AI model to actually process and

01:01:59.140 --> 01:02:01.780
categorize the human feedback into.

01:02:02.060 --> 01:02:03.300
Approved or declined.

01:02:04.860 --> 01:02:08.820
So in that case we are going to use Google Gemini chat model.

01:02:08.940 --> 01:02:13.740
So again I'm going to show you how to set up the connection step by step now.

01:02:15.060 --> 01:02:20.300
But you can always refer to the dedicated tutorial in the how to set up credentials section.

01:02:20.740 --> 01:02:27.180
If any time you need to refresh the credentials or set up the connection for different scenarios.

01:02:28.500 --> 01:02:30.660
So simply click on Add Model button.

01:02:31.820 --> 01:02:33.340
Choose Google Gemini chat model.

01:02:37.940 --> 01:02:40.180
Click on the drop down creating credential.

01:02:41.060 --> 01:02:43.300
And as always you need to provide API key.

01:02:45.820 --> 01:02:51.900
Now before you can generate an API key for Gemini, you will need to have a Google Cloud project.

01:02:52.220 --> 01:02:53.980
Let me show you how to create one.

01:02:54.340 --> 01:03:00.660
First, go to console.cloud.google.com and login with your Google account.

01:03:00.700 --> 01:03:03.860
I will leave all the links in the resources section.

01:03:03.860 --> 01:03:09.660
Once you login in the top left corner, click the project drop down and you will see an option that

01:03:09.660 --> 01:03:10.900
says New Project.

01:03:13.860 --> 01:03:14.900
So click right here.

01:03:18.340 --> 01:03:19.140
Give it a name.

01:03:26.420 --> 01:03:28.260
You can assign an organization.

01:03:29.260 --> 01:03:30.060
Hit create.

01:03:37.660 --> 01:03:38.780
Then select project.

01:03:40.180 --> 01:03:40.540
Alright.

01:03:40.540 --> 01:03:40.980
Great.

01:03:42.780 --> 01:03:45.300
Now here you can see the project number and project ID.

01:03:45.500 --> 01:03:47.860
Now let's generate the API keys for Gemini.

01:03:48.060 --> 01:03:50.420
Now you can go to Google AI studio.

01:03:51.020 --> 01:03:54.570
Again I will provide the link to the web page in the resources section.

01:03:58.170 --> 01:04:00.890
And just login here you can get API key.

01:04:01.490 --> 01:04:02.410
So click on it.

01:04:04.930 --> 01:04:06.890
Click on this button create API key.

01:04:08.450 --> 01:04:11.370
And here you can search your Google Cloud projects.

01:04:13.090 --> 01:04:16.770
As you can see, the project I created just pop up.

01:04:17.410 --> 01:04:18.370
So click on it.

01:04:21.530 --> 01:04:23.610
And create API key in existing project.

01:04:24.010 --> 01:04:24.610
Confirm.

01:04:29.490 --> 01:04:31.250
Now let's copy our API keys.

01:04:33.770 --> 01:04:35.050
Let's go back to anything.

01:04:36.450 --> 01:04:40.410
Now paste the API key here and click save.

01:04:42.050 --> 01:04:42.770
Okay great.

01:04:43.010 --> 01:04:44.410
This successfully created.

01:04:46.090 --> 01:04:48.330
Now we have access to all Google's models.

01:04:53.410 --> 01:04:57.530
There is plenty of models, as you can see, with a flash model.

01:05:03.090 --> 01:05:03.530
All right.

01:05:03.530 --> 01:05:03.970
Awesome.

01:05:06.490 --> 01:05:08.850
So now we have a brain for our text classifier.

01:05:10.290 --> 01:05:11.010
It's safe.

01:05:11.610 --> 01:05:12.370
Perfect.

01:05:12.530 --> 01:05:13.530
We are nearly there.

01:05:13.570 --> 01:05:16.010
So just to let two notes left.

01:05:16.410 --> 01:05:17.210
So bear with me.

01:05:18.450 --> 01:05:23.650
So for emails that need revision, we need, um, another agent.

01:05:23.650 --> 01:05:30.010
So this agent will be specifically designed to take feedback and improve the original image draft.

01:05:31.250 --> 01:05:35.490
So we want to add the revision agent to the declined branch.

01:05:40.210 --> 01:05:41.530
So search for agent.

01:05:47.850 --> 01:05:48.970
The one defined below.

01:05:48.970 --> 01:05:52.960
So use an expression to reference data in previous nodes or enters a text.

01:05:56.200 --> 01:05:57.480
Now let's test the step.

01:06:00.080 --> 01:06:02.080
Okay so the workflow has issues.

01:06:02.080 --> 01:06:04.120
So we have to define prompt.

01:06:04.160 --> 01:06:04.400
Yes.

01:06:04.400 --> 01:06:07.520
So first we need to get some data as an input to this node.

01:06:08.600 --> 01:06:10.120
So let's close it.

01:06:13.880 --> 01:06:17.240
Now let's check if you have some data in a table.

01:06:17.280 --> 01:06:18.000
Trigger node.

01:06:19.000 --> 01:06:19.240
Yeah.

01:06:19.240 --> 01:06:20.040
Let's pin it.

01:06:23.040 --> 01:06:23.800
All right.

01:06:25.800 --> 01:06:27.040
Now let's test the workflow.

01:06:31.400 --> 01:06:31.920
Okay.

01:06:31.960 --> 01:06:34.880
So first let's delete this node.

01:06:38.160 --> 01:06:38.880
All right.

01:06:40.480 --> 01:06:41.680
Let's test again.

01:06:48.960 --> 01:06:52.840
Because we need to get some data into the decline branch.

01:06:54.960 --> 01:06:56.800
So we need to provide the feedback.

01:06:57.920 --> 01:06:59.160
So let's open my Gmail.

01:07:00.880 --> 01:07:04.400
So I'm going to check my Gmail inbox.

01:07:05.520 --> 01:07:06.280
All right.

01:07:07.880 --> 01:07:08.880
Respond.

01:07:11.960 --> 01:07:12.760
Let's say.

01:07:16.680 --> 01:07:21.400
Eight more size submit.

01:07:25.200 --> 01:07:25.760
All right.

01:07:25.760 --> 01:07:26.760
So we have some error.

01:07:27.800 --> 01:07:33.760
Oh yeah I forgot to specify the large language model inside the node.

01:07:34.880 --> 01:07:37.680
So this model is not supported for this um.

01:07:40.080 --> 01:07:41.080
API version.

01:07:42.960 --> 01:07:44.400
So let's change it to.

01:07:48.230 --> 01:07:49.790
Gemini 2.0.

01:07:49.790 --> 01:07:52.150
Flash X Dash.

01:07:52.190 --> 01:07:52.950
Experimental.

01:07:58.750 --> 01:07:59.710
Test workflow again.

01:08:09.070 --> 01:08:13.030
So now our AI agent is preparing the image draft.

01:08:20.470 --> 01:08:21.390
Respond.

01:08:24.670 --> 01:08:25.430
The same feedback.

01:08:25.430 --> 01:08:28.590
I'm going to give it the same feedback, so please make it more concise.

01:08:31.830 --> 01:08:33.590
Nice submit.

01:08:38.430 --> 01:08:38.710
Okay.

01:08:38.750 --> 01:08:40.630
As you can see workflow executed successfully.

01:08:40.990 --> 01:08:45.550
And now we have data the Declined branch.

01:08:47.790 --> 01:08:51.230
So now when we add our revision agents.

01:08:51.230 --> 01:08:52.950
So search for agents.

01:08:56.070 --> 01:08:57.550
We have data in the flow.

01:08:58.550 --> 01:09:04.710
So we can carry on with the configuration to define below prompt.

01:09:05.430 --> 01:09:08.510
So as an input data for our revision agent.

01:09:08.510 --> 01:09:11.910
So let's rename it to revision agent.

01:09:15.710 --> 01:09:20.190
We want to include in the prompt the email the actual email.

01:09:22.030 --> 01:09:27.990
So from the from the email node let's drag and drop email.

01:09:28.910 --> 01:09:31.510
But let's switch to an expression mode.

01:09:40.430 --> 01:09:42.070
And drag and drop actual email.

01:09:43.260 --> 01:09:46.900
We also want to provide the feedback.

01:09:49.540 --> 01:09:50.900
From the get feedback node.

01:09:53.460 --> 01:09:55.380
We want to make it clear for our agent.

01:09:56.700 --> 01:09:57.340
What is the email?

01:09:57.340 --> 01:09:58.300
What is the feedback?

01:10:00.380 --> 01:10:03.540
Is the text right?

01:10:03.580 --> 01:10:04.100
Awesome.

01:10:05.660 --> 01:10:07.780
Now we require a specific output format.

01:10:10.140 --> 01:10:12.020
And we want to add the system message.

01:10:18.660 --> 01:10:20.380
Let's switch to expression mode.

01:10:20.860 --> 01:10:21.820
Expand it.

01:10:22.740 --> 01:10:23.660
Okay great.

01:10:25.300 --> 01:10:29.460
Now let's write a prompt overview.

01:10:33.020 --> 01:10:33.860
And maybe a role.

01:10:35.780 --> 01:10:36.180
Yep.

01:10:38.700 --> 01:10:40.700
You are an Expert.

01:10:43.900 --> 01:10:44.620
Narrator.

01:10:49.500 --> 01:10:50.580
Your job is.

01:10:53.780 --> 01:10:56.780
To tag an incoming email.

01:10:59.820 --> 01:11:00.860
And revise it.

01:11:04.060 --> 01:11:07.020
Based on the feedback to human.

01:11:08.020 --> 01:11:11.940
Based on the feedback the humans submitted.

01:11:23.740 --> 01:11:24.540
The rules.

01:11:27.980 --> 01:11:28.380
Sign.

01:11:28.380 --> 01:11:29.060
Sign off.

01:11:32.620 --> 01:11:33.540
Image as they.

01:11:37.300 --> 01:11:38.380
Identify.

01:11:40.010 --> 01:11:40.370
I.

01:11:42.890 --> 01:11:47.410
Also want to provide the current date and time.

01:11:48.290 --> 01:11:49.370
So here is the.

01:11:51.890 --> 01:11:53.610
Current date.

01:11:55.530 --> 01:11:56.010
Time.

01:11:57.850 --> 01:11:59.170
Double braces.

01:12:01.010 --> 01:12:01.930
Dollar sign.

01:12:03.290 --> 01:12:03.730
Now.

01:12:04.810 --> 01:12:05.410
Perfect.

01:12:08.410 --> 01:12:09.810
And that's it for this note.

01:12:10.570 --> 01:12:12.010
Our revision agent is ready.

01:12:14.770 --> 01:12:17.570
Now, I forgot to rename the first agent.

01:12:19.410 --> 01:12:21.050
Let's call it sales agent.

01:12:26.490 --> 01:12:26.930
All right.

01:12:26.930 --> 01:12:27.410
Awesome.

01:12:33.250 --> 01:12:36.130
Now, we don't need any tools for this for this agent.

01:12:37.050 --> 01:12:46.490
So we don't need to give it access to any tool, but we need to give it a brain to connect the large

01:12:46.490 --> 01:12:47.290
language model.

01:12:48.170 --> 01:12:50.930
So we are going to use the same model.

01:12:53.170 --> 01:12:55.450
To connect it to the anthropic chat model.

01:12:56.810 --> 01:13:05.690
And also we want to use the same output parser the same format like that.

01:13:07.490 --> 01:13:07.890
All right.

01:13:07.930 --> 01:13:08.610
Perfect.

01:13:09.250 --> 01:13:15.770
And now the last final step we want to send the approved email to our lead.

01:13:16.170 --> 01:13:18.930
So let's add the email node to our approved branch.

01:13:20.770 --> 01:13:24.530
So search for Gmail node as an action.

01:13:24.530 --> 01:13:26.170
We want to send a message.

01:13:28.570 --> 01:13:36.400
Make sure you are connected to the Gmail account the resource we have a message operation sent.

01:13:36.560 --> 01:13:39.880
We want to send the email to the customer.

01:13:41.600 --> 01:13:42.000
So.

01:13:45.680 --> 01:13:46.720
From the Airtable.

01:13:51.480 --> 01:13:52.920
Drag and drop email field.

01:13:56.720 --> 01:13:57.320
Perfect.

01:13:58.480 --> 01:14:03.280
As a subject, we need to open the sales agent node.

01:14:06.120 --> 01:14:08.520
And get that.

01:14:10.800 --> 01:14:12.440
Awesome email type.

01:14:12.440 --> 01:14:15.240
We want to switch to text.

01:14:15.960 --> 01:14:17.000
And as a message.

01:14:19.600 --> 01:14:20.880
This is our actual email.

01:14:21.480 --> 01:14:22.640
So from that email.

01:14:24.920 --> 01:14:26.240
Drag and drop this field.

01:14:28.000 --> 01:14:28.720
Perfect.

01:14:29.560 --> 01:14:33.080
And the last step we want to add that option.

01:14:35.800 --> 01:14:38.080
And switch off the attribution.

01:14:41.160 --> 01:14:41.480
All right.

01:14:41.480 --> 01:14:42.120
Perfect.

01:14:43.720 --> 01:14:44.720
I think we've done.

01:14:46.560 --> 01:14:50.880
Let's rename the workflow to human in the loop.

01:14:53.640 --> 01:14:54.440
It's safe.

01:14:55.720 --> 01:14:56.840
Unpin data.

01:15:00.800 --> 01:15:02.680
Make sure your workflow is active.

01:15:06.560 --> 01:15:07.440
Save it again.

01:15:09.320 --> 01:15:16.280
Actually, we need to connect the output from the revision agent node to the set email node.

01:15:16.440 --> 01:15:25.920
So this creates the loop where revisions go back through the set email node and get feedback nodes until

01:15:25.920 --> 01:15:26.520
approved.

01:15:29.440 --> 01:15:30.520
So let's do it like that.

01:15:34.150 --> 01:15:34.750
Perfect.

01:15:34.790 --> 01:15:35.430
It's safe.

01:15:36.790 --> 01:15:42.830
And now the setup is production ready, so you can use it for and tweak for many use cases.

01:15:43.990 --> 01:15:51.150
Now, when our workflow is active, we need a way to capture leads that will trigger our workflow.

01:15:51.510 --> 01:15:54.390
So let's set up an Airtable form.

01:15:55.110 --> 01:15:56.910
So go to Airtable Base.

01:16:01.070 --> 01:16:02.030
Click on forms.

01:16:06.630 --> 01:16:08.110
Then click on Create Form.

01:16:14.230 --> 01:16:16.390
Add a new form table.

01:16:16.390 --> 01:16:17.910
We want to use leads table.

01:16:18.750 --> 01:16:19.550
Give it a name.

01:16:25.710 --> 01:16:26.470
Create form.

01:16:34.670 --> 01:16:36.150
And here click Publish Form.

01:16:36.790 --> 01:16:38.750
So make it live.

01:16:39.270 --> 01:16:41.710
And now you can share the form anywhere.

01:16:42.150 --> 01:16:46.230
You can add the embed code to your landing pages.

01:16:46.550 --> 01:16:49.550
You can share via email social media LinkedIn.

01:16:51.910 --> 01:16:57.550
So once someone submits this form it adds their info to Airtable base.

01:16:59.950 --> 01:17:01.310
So to the list table.

01:17:05.190 --> 01:17:07.750
It triggers your editing workflow automatically.

01:17:08.550 --> 01:17:13.910
And our ice agent crafts the personalized emails using the requirements.

01:17:14.750 --> 01:17:16.710
Also checks the project database.

01:17:21.070 --> 01:17:29.660
So the second table projects to find similar projects to make any more convincing.

01:17:31.980 --> 01:17:34.100
And then you get the draft for approval.

01:17:42.620 --> 01:17:46.620
And when you approve it, you get sent to your prospect.

01:17:48.380 --> 01:17:54.260
Otherwise, it will loop through for a revision until you approve it.

01:17:55.340 --> 01:18:02.700
So now you are capturing leads 24 over seven, with your sales team handling the personalized follow

01:18:02.740 --> 01:18:03.060
up.

01:18:03.260 --> 01:18:06.620
So just share your form link and let your sales teams work.

01:18:06.740 --> 01:18:08.340
Alright, that's it for this tutorial.

01:18:08.420 --> 01:18:09.700
I hope it was helpful.

01:18:10.020 --> 01:18:14.740
This is production ready solution so you can use it for your business or sell it to your clients.

01:18:14.780 --> 01:18:15.860
Congratulations!

01:18:16.340 --> 01:18:23.180
You now have a complete human in the loop AI sales system that's going to transform how you handle leads.

01:18:23.220 --> 01:18:26.020
Thank you for building this with me and see you in the next tutorial.
