Build a Complete AI SaaS with zero code (Lovable + N8N)
Description
Serious about Implementing AI? Shortcut your Path HERE, and connect with +450 entrepreneurs on the same mission: https://www.skool.com/scrapes
This is a comprehensive tutorial on building a complete SaaS business from scratch using a Lovable front end, N8N backend, Supabase Database and Stripe for Payments. During this course we'll cover everything you need to shortcut your journey into building automations with N8N, and the web infrastructure with Loveable!
🛠️ Links (affiliate)
• n8n: https://n8n.partnerlinks.io/scrapesai
📧 Curated roundups of real-world AI implementations 📧
https://scrapes-ai.kit.com/b6b1a73dfd
Want more?
https://www.youtube.com/@simonscrapes?sub_confirmation=1
🚧 Looking for custom built AI agents for your business? 🚧
https://automake.io
💬 Share in the comments what you learnt during the video!
0:00:00 - Build an AI SaaS business
0:02:11 - What you can build
0:05:24 - Mapping out the System
0:08:31 - Pick your Automations
0:11:58 - Lovable - the front-end
0:20:13 - Setting up Backend Security and Database
0:22:45 - Login Flow
0:25:46 - Build the N8N Automations
0:33:05 - Automation 1 - Sales Lead Qualifier
0:48:43 - Automation 1 - Passing in Data
0:52:58 - Automation 2 - Extract from Documents
1:02:18 - User Credit System
1:11:51 - Setting up Payments
1:16:16 - Connect Stripe to our Database
#N8N #Lovable #LovableTutorial
This is a comprehensive tutorial on building a complete SaaS business from scratch using a Lovable front end, N8N backend, Supabase Database and Stripe for Payments. During this course we'll cover everything you need to shortcut your journey into building automations with N8N, and the web infrastructure with Loveable!
🛠️ Links (affiliate)
• n8n: https://n8n.partnerlinks.io/scrapesai
📧 Curated roundups of real-world AI implementations 📧
https://scrapes-ai.kit.com/b6b1a73dfd
Want more?
https://www.youtube.com/@simonscrapes?sub_confirmation=1
🚧 Looking for custom built AI agents for your business? 🚧
https://automake.io
💬 Share in the comments what you learnt during the video!
0:00:00 - Build an AI SaaS business
0:02:11 - What you can build
0:05:24 - Mapping out the System
0:08:31 - Pick your Automations
0:11:58 - Lovable - the front-end
0:20:13 - Setting up Backend Security and Database
0:22:45 - Login Flow
0:25:46 - Build the N8N Automations
0:33:05 - Automation 1 - Sales Lead Qualifier
0:48:43 - Automation 1 - Passing in Data
0:52:58 - Automation 2 - Extract from Documents
1:02:18 - User Credit System
1:11:51 - Setting up Payments
1:16:16 - Connect Stripe to our Database
#N8N #Lovable #LovableTutorial
Summary
Build a Complete AI SaaS with Zero Code Using Lovable and N8N
In this comprehensive tutorial, Simon demonstrates how to build a fully functional AI SaaS marketplace from scratch without any coding experience. The video walks through creating a complete web application that combines a Lovable front-end interface with N8N automation workflows, Supabase database, and Stripe payment processing.
The tutorial begins by showcasing real-world examples of successful AI marketplaces like Agent AI and Relevance AI, demonstrating the potential of what viewers can build. Simon then explains the architecture of the system, breaking down how the front-end website connects with backend automations, database management, and payment processing.
Throughout the video, viewers learn step-by-step how to create two practical AI tools: a sales lead qualifier that analyzes LinkedIn profiles against specific criteria, and a PDF data extraction tool that summarizes document content. These examples demonstrate how to handle different types of data inputs and outputs, including text and file transfers.
Key topics covered include:
- Setting up the front-end interface using Lovable's AI-powered web development
- Building backend automations with N8N to process user requests
- Configuring a Supabase database to store user information and track usage
- Implementing a credit-based system for monetizing AI tools
- Integrating Stripe for subscription payments and one-time purchases
- Creating secure login flows and user authentication
- Developing web hooks to connect different services together
The video provides practical guidance on troubleshooting common issues and offers tips for testing and refining the application. Simon emphasizes that while the resulting product may not be enterprise-grade, it provides a fantastic way to quickly prototype and launch AI-powered services at a fraction of the cost and time required for traditional development.
This tutorial is ideal for entrepreneurs, marketers, and non-technical founders looking to enter the AI SaaS market without hiring expensive development teams. The entire process demonstrates how combining no-code tools can create powerful applications that would traditionally require extensive technical expertise.
Transcript
0:00
today we're going to show you how to
0:01
build a full AI SAS Marketplace from
0:04
scratch with zero coding experience
0:07
we're going to use lovable for the
0:08
front-end website na automations in the
0:11
back and even allow to process payments
0:15
using stripe and Link all of the data
0:17
together so it works as a full
0:19
functioning SAS using superbase in the
0:21
database if you're someone like me with
0:24
pretty much zero coding experience then
0:26
this must sound really exciting how many
0:29
times have you had an idea for something
0:32
but you gave up on it simply due to a
0:35
lack of technical skills no idea where
0:37
to start or not enough money to hire
0:40
developers but what I'm about to share
0:42
with you in this video might change all
0:45
of that for you and by the end of this
0:48
you'll be able to turn your idea into a
0:50
full AI SAS that you can monetize and
0:54
sell to others and by the end of it you
0:56
might just have built a fully working
0:58
MVP version
1:00
of your business idea 20 times faster
1:03
than you could before at a very low cost
1:06
we'll show you some examples of what
1:08
people are already building using this
1:10
exact technology and how they're
1:12
monetizing it to thousands of users
1:15
we'll give a simple overview of how the
1:17
whole thing works interacts with each
1:19
other and each tool and we'll give a
1:22
step-by-step guide on how you can turn
1:24
your ideas into a full app that you can
1:27
monetize so we're talking payment
1:30
data website backend the whole lot
1:33
you'll be able to build by the end of
1:35
this but a quick disclaimer as you guys
1:38
know I try my best to give you all the
1:40
information that you need to know
1:42
without the hype just practical
1:44
Solutions so would you be able to build
1:47
a million dollar SAS using this probably
1:49
not but that's why I recommend watching
1:51
this video Until the End so you can see
1:54
what is possible and what's not possible
1:57
and exactly how to capitalize on this
1:59
opportunity
2:00
especially if you're like me and you
2:03
don't have an insane stack of technical
2:05
skills so let's jump straight in with
2:07
some examples of what you could build by
2:10
the end of this so we've got agent AI
2:13
first it calls itself a professional
2:15
Network for AI agents but it's a a web
2:18
app where users can add their own AI
2:21
agents you click into them so for
2:23
example this company research agent and
2:25
you can pay to use that AI agent so on
2:29
the back end that would just be an N
2:31
automation for example and on the front
2:33
end the user is able to click through
2:36
and put in some inputs and receive an
2:38
output from our agent there this website
2:41
alone supposedly has above 500,000 users
2:45
and you can see this agent alone has
2:47
above 25,000 tasks completed for that
2:50
specifically we've then got websites
2:53
like relevance AI which is a very
2:56
similar concept it build teams of AI
2:58
agents that deliver human quality work
3:01
so if we go to the agents here we've got
3:03
all sorts of different agents for
3:05
example CRM enrichment where if you sign
3:09
up you can effectively input a prompt
3:11
input some inputs link it to your data
3:14
and run that exactly in the same way
3:17
we've then got more specific
3:19
marketplaces that are suited towards for
3:22
example voice agents so we've got retail
3:24
ai.com supercharge your call operations
3:27
with voice AI so again it's a simp SAR
3:30
product where they've got various
3:32
specific voice agents that you can use
3:35
like receptionists appointment Setters
3:37
lead qualification that's all on the
3:39
front end and on the back end they're
3:40
just running an automation that takes
3:42
our inputs and gives back to the front
3:45
end our outputs we're going to build
3:47
something exactly like this with two
3:49
clear examples so that you can go away
3:52
and build an AI SAS Marketplace for
3:55
yourself or for other businesses so
3:58
let's look at how we're going to
4:00
implement that and this is all with zero
4:03
coding so we'll run through step by step
4:06
exactly what we need to do but first
4:08
let's look at how the web apps going to
4:10
interact with the different components
4:12
and what those components are so we've
4:14
got a front end here so the front end is
4:17
just what the website looks like and the
4:19
user sees on the front end so if we go
4:22
back to agent AI as an example this is
4:24
the frontend website for agent Ai and
4:28
every time we go into a specific agent
4:31
we've got another page in this URL
4:34
that's part of our front end so we're
4:36
going to build out our front end with
4:38
lovable and lovable is your superhuman
4:42
full stack engineer so let's have a look
4:44
at lovable. deev and it's all about
4:46
creating an app from an idea in as
4:49
little time as possible with zero code
4:52
so lovable we can prompt like we do with
4:54
an llm or chat gbt to create a full
4:58
stack web app for us where we can
5:01
connect to all of our Integrations in
5:03
the back end and we can start for free
5:06
with lore and then when we hit the
5:08
capacity limits we can upgrade to $20 a
5:11
month so for replacing a four stack
5:14
development team $20 a month $50 a month
5:17
is very very cheap and it performs very
5:20
well as you'll see so we're going to
5:22
have lovable on the front end and every
5:25
page we click through on our website is
5:27
going to be built by lovable but it's
5:29
also going to set up those Integrations
5:31
with what we need on our back end to
5:33
actually make this happen so we've got
5:36
the front end in lovable now let's look
5:38
at the back end so Three core features
5:41
will make up our back end and this will
5:43
depend on what you want to build for a
5:47
full AI SAS Marketplace we're going to
5:49
need three things we're going to need
5:52
the AI automations running in the back
5:54
end and for this we're going to use n8n
5:57
we're going to need a database
6:00
that stores all of our user dataa so
6:02
that users can log in and we can track
6:05
their usage of the different tools and
6:07
therefore charge them for it and make
6:10
sure they're not exceeding their limits
6:12
or or credits and finally we're going to
6:15
need some way for them to pay so we're
6:17
going to integrate stripe with that and
6:19
all of those are going to interact
6:21
together so when a user clicks a button
6:24
on the front end to log in it's going to
6:27
either force them to register through a
6:29
sign sign up route which will put their
6:32
name and their details in our database
6:34
in super base or if they're already
6:37
logged in and they're taking an action
6:38
with a specific automation then we want
6:41
the database to update as the action
6:44
happens and similarly when they first
6:46
sign up for the first time they're going
6:48
to need to pay and that's going to be
6:50
through a stripe link but it's also
6:52
going to be registered in our database
6:53
which is the middle linking to
6:55
everything and then finally we need the
6:57
automations to actually run so we're
6:59
going to use na for that so let's have a
7:01
quick look at each of these now before
7:03
we delve into the specific automations
7:06
so we've got na. here which is an AI
7:10
workflow automation software for
7:12
technical teams it effectively allows us
7:15
to Plug and Play drag and drop and
7:18
connect to all of these different
7:20
softwares that we use like slack Google
7:23
Mail our database thousands of different
7:26
software but also connect to AI agents
7:29
as well if you're not familiar with n
7:32
then I'll link to my full 4-Hour course
7:35
which covers everything you need to
7:37
start building in n and everything I
7:40
learned over eight months of building
7:42
over a 100 automations in N so that's
7:44
where we're going to have our
7:45
automations now superbase is effectively
7:49
a database so when you're using
7:51
something like air table that's also
7:53
considered a back-end database but
7:55
superbase is much more scalable for web
7:58
apps so you can see here building a
8:00
weekend scale to Millions this is where
8:03
we'll store all of our user data
8:06
including which users we've got signed
8:09
up but also their usage on different
8:11
tools and you can see as well here super
8:13
base is fantastic because you can get
8:15
started for free and then finally let's
8:18
have a quick look at stripe stripe
8:20
allows us to create quick easy payment
8:22
links and Connect into different
8:24
softwares so stripe is really good for
8:26
things like International payments so
8:28
we'll use stripe
8:29
for everything payments related let's
8:32
take a quick look at the automations and
8:34
I just wanted to Quick touch on how
8:37
these are going to work and the
8:39
technical infrastructure behind that but
8:41
it's actually really very simple when
8:42
you understand the concepts so they're
8:44
all going to run by web hooks that are
8:46
activated from our front end so when we
8:49
click a button it's going to send the
8:50
data to n and Na's going to receive that
8:55
that is effectively what the web Hook is
8:56
doing it's receiving the data from the
8:59
user clicking a button on our website
9:01
we're going to process the automations
9:03
and then we're going to send data back
9:04
to display to the user also using a
9:08
return web hook there so that our front
9:10
end can receive all of the information
9:13
pushed back by n So today we're going to
9:16
look at two specific examples that we
9:18
can emulate from
9:20
agent. and
9:22
relevance. actual examples so first
9:25
we've got a sales lead qualifier which
9:28
if we open it up directly on agent. a it
9:31
scores and qualifies leads based on
9:33
scoring criteria so a fairly generic
9:36
overview there but it costs one credit
9:37
per execution and 4,000 people have
9:40
completed tasks here if we go through
9:42
the process it effectively asks us for
9:45
an email our criteria and then returns
9:49
this scoring criteria we're going to
9:51
replicate this on our own and what we're
9:54
going to input are a LinkedIn URL
9:57
criteria to score against and it's going
9:59
to Output the same score against
10:01
criterias with details the second one
10:04
which is arguably a little bit more
10:06
complex because we have to send a file
10:09
which is why I chose this as the second
10:11
example is extracting data from a PDF
10:14
and summarizing so if we go into
10:16
relevance ai. here we've got a PDF
10:19
Studio where we can effectively upload a
10:22
PDF file in the interface it's going to
10:25
send it to our back end in N we're going
10:28
to receive that file
10:30
extract information summarize that
10:32
information with an AI agent or llm
10:36
chain and then return that information
10:38
back to the user again so we'll be
10:40
dealing with more complex uploads there
10:43
and we might need some more complex
10:45
tools in the back end like like an OCR
10:48
tool to help read images off the PDF for
10:51
example But ultimately we're going to
10:53
build out those two use cases today step
10:55
by step so you can see how to do it but
10:57
this tutorial will give you the
11:00
capability to build out any other AI or
11:03
non- aai tools for yourself by showing
11:06
you two clear different examples of how
11:10
we can use this and how we can set this
11:12
up relatively quickly and maintain and
11:16
edit it super easily so now that we
11:18
understand our infrastructure there
11:20
let's go down to the pathway that we're
11:22
going to take to get there so that you
11:24
can see what's coming up first we're
11:26
going to figure out how to prompt
11:28
lovable to build the app that we want
11:31
we're then going to build out the
11:32
automations in N we're going to set up
11:35
our superbase database for login and for
11:38
payments and prompts lovable again to
11:41
change a few things there to make sure
11:43
that works we're going to have to set up
11:45
the infrastructure on stripe directly
11:47
for our payments and then we're going to
11:50
iterate and test with one of those
11:52
automations and then we'll move on to
11:54
the second automation following exactly
11:56
the same Pro so the bulk of the work at
11:57
the start is going to be done in lovable
12:00
and I want to create a prompt that can
12:03
help us create the full AI SAS
12:07
Marketplace that's really clear so I
12:10
looked up a few tips on prompting for
12:12
lovable to improve the way in which I
12:15
prompt and I found this uh lovable
12:18
prompting Bible which you can search for
12:20
as well and all I've done is gone to my
12:23
favorite AI tool perplexity which is a
12:26
web search engine powered by AI models
12:29
in the back end so powered by llm and
12:33
I've written out this prompt to give us
12:35
a starting point of the prompts we're
12:38
going to enter into lovable so it's just
12:40
a starting point it's not going to be
12:41
perfect we're going to need to refine it
12:44
but I definitely recommend doing this as
12:45
well so we've got I want a prompt
12:48
optimize for lovable use the lovable
12:50
prompting Bible it needs to be about
12:52
developing a web app with a technical
12:55
Focus clean homepage so that I can have
12:58
a similar look and feel
12:59
it needs to have a superbase connection
13:02
once users are logged in they can see a
13:04
page of the different automations that
13:07
will be searchable so similar to what we
13:09
saw on our agent. a page you'd have
13:13
various automations but also a homepage
13:15
as well to get them to sign up and once
13:17
they're logged in you see those
13:18
different automations I've then talked a
13:21
little bit about the functionality you
13:23
really need to be specific with the
13:25
prompt here and what functionality you
13:27
want from it so a few things that came
13:30
to my head we need a place to log in
13:32
which is stored in superbase so we're
13:34
just giving it a heads up that we're
13:35
going to need to connect superbase you
13:37
need as a user to use credits to use an
13:40
AI tool the third one is each AI tool
13:44
has some sort of input Fields so we'll
13:46
Define those later but now let's just
13:48
say they have input Fields And once the
13:51
tool is used first thing is credit
13:53
should be deducted so it needs to
13:55
interact with our back end here to sign
13:58
up there'll to pay $20 a month which
14:01
will be connected through stripe so
14:03
again laying the foundations that we're
14:05
going to have an integration through
14:06
stripe and once the tool is used it
14:09
should send the input data to the web
14:11
hook address and receive back the output
14:13
so we're telling it it's going to send
14:15
some data on the click of a button and
14:17
also receive back data from a web hook
14:20
at the end of it so it's a very short
14:23
concise prompt but I've laid out clearly
14:25
the functionality and the Integrations
14:28
between the different Services there so
14:30
that lovable can go and set up a really
14:33
solid starting point for us to go in
14:36
test modify Etc and it's come out with
14:40
this really clear guidelines so it's a
14:43
full prompt optimize for lovable and by
14:45
the way if you want access to these
14:47
prompts rather than creating them
14:48
yourselves head to
14:51
school.com scrapes come into the
14:54
classroom go to the plug andplay
14:56
templates for your business and you're
14:58
going to go go to publish recently which
15:00
is all of the templates published in the
15:03
last week and we're going to go to AIS
15:05
SAS Marketplace and you've got all of
15:08
the prompts down here and then all of
15:10
the N files to work with as well to make
15:13
it super quick and easy so let's head
15:15
back to the prompt in perplexity we're
15:17
going to copy that and we'll just stick
15:19
with this first prompt first we're going
15:21
to take that to lovable we're going to
15:23
make sure that we uh sign up I'm sure if
15:26
we click enter here it's going to tell
15:28
us to sign up in or sign up so sign up
15:30
for free sign into your account and then
15:33
once you're signed into your free
15:34
account you're just going to copy paste
15:36
that into the the chat box there hit
15:39
enter and it's going to start building
15:41
out our app so the thing that lovable is
15:44
going to do for us is start building out
15:48
the framework in code without us
15:50
touching any code the framework for a
15:53
full web app so normally if you were to
15:57
build this you'd need
15:59
a full stack engineer or you need to be
16:01
a full stack engineer yourself to be
16:03
able to write out all this code but
16:04
lovable starts by just understanding
16:08
your core requirements and turning that
16:10
as you can see into code so it will
16:12
start writing all the code blocks and
16:14
you don't need to worry about all of
16:15
this this is just telling you that it's
16:18
starting to work on your idea it's
16:20
probably going to take five or so
16:22
minutes to fully write out the code but
16:24
it's effectively powered by an llm in
16:27
the background that specifically
16:29
tailored to creating website designs but
16:33
not only the front end of a website
16:35
which are quite easy to already make
16:37
using something like webflow or framer
16:39
but it will start to integrate the
16:41
backend functionality for us and you can
16:43
see for example it's starting to create
16:45
the superbase connection here so we'll
16:48
let that all load up and whilst that is
16:50
loading up let's go to superbase and
16:52
start setting up a project there so
16:54
you're going to sign up to superbase and
16:57
then you're going to start your project
16:59
if you've got no projects already you're
17:00
going to be in this dashboard page once
17:03
You' signed up for a free account and
17:05
you're going to click new project choose
17:07
the organization that it should sit in
17:09
and we're going to call it something
17:11
like lovable demo you're going to then
17:14
save a database password and choose a
17:17
region but just leave it as the default
17:19
I would and that will start creating a
17:21
new project in superbase we're going to
17:24
later need to take the secret keys from
17:27
our project in superbase and give that
17:29
to lovable so that it understands what
17:32
database to connect with and whilst
17:34
that's still setting up we can go up in
17:36
lovable dodev to the superbase
17:39
connection here we're going to click
17:41
connect to superbase and what that's
17:43
going to do if you signed up for
17:45
superbase and you're logged into your
17:47
account is allow you to authorize API
17:50
access for lovable so we're going to
17:52
give it access to the correct
17:54
organization and we're going to
17:55
authorize that and at this point you're
17:57
not going to be able to connect to any
17:59
of the tables because actually if we go
18:01
into view tables we've not set up any of
18:04
our database tables yet it's just an
18:07
completely empty database in superbase
18:10
so we're going to cancel that come back
18:12
let's see how our project's getting on
18:15
we've had our first error so lovable is
18:19
really good in some aspects and then can
18:22
error out quite often so all we're going
18:25
to do is just try to fix and it's then
18:28
going to push the the error back to lore
18:31
in order for them to start fixing the
18:33
error and if this doesn't work we're
18:35
just going to simplify our prompt and
18:36
work at it a little bit at a time give
18:39
it a simpler prompt to start with and
18:41
then add functionality as we go through
18:43
so let's go back to lovable now and it's
18:45
actually identified the error for us and
18:48
uh started a fix on that and actually
18:50
now output our first view on what our
18:53
Marketplace s would look like and it's
18:55
not bad for a first go we'd obviously
18:57
prompt this to improve the UI change the
19:00
marketing copy Etc but we've got unlock
19:02
the power of AI with a simple credit
19:05
system so not really selling the value
19:07
there but the description underneath is
19:09
not bad access a Marketplace of Premium
19:11
AI tools with a flexible pay as you go
19:14
credit system no commitments just a
19:16
powerful AI at your fingertips so it's
19:18
really understood the brief and created
19:21
this nice header on the homepage it's
19:23
then got a link to view all the tools
19:26
with a little uh how it works so
19:28
purchase credit select a tool get
19:30
results which is exactly as we described
19:32
it's got a foot down here again the
19:34
color scheme needs a bit of work but
19:37
it's done a really good job we've not
19:38
had to build anything or build out any
19:40
code we've just clicked fix a few times
19:43
and it's come here so let's first click
19:45
get started and you can see that
19:47
automatically it's thrown us to a new
19:49
page which has the endpoint register and
19:53
we would register our account here and
19:54
it's also potentially set up our Google
19:58
so up here we can click to go back into
19:59
the various different pages let's go
20:02
back to register and it's also set up
20:04
these other pages so dashboard tools
20:06
pricing billing let's see if we can
20:09
access any others right now okay this is
20:11
a really good example of where it's
20:13
implemented some security measures here
20:15
so we've tried to access the tools or
20:17
the dashboard and it's thrown us back to
20:20
the login page which is exactly what we
20:22
want if we've got a paid service we want
20:24
to be logged in or we want our users to
20:27
be logged in before they can access any
20:28
private Pages it's then given us uh
20:31
individual tools pages so this tells me
20:34
that in the back end we're going to have
20:36
multiple tools each with a unique page
20:39
but following the same structure we've
20:41
then got a pricing page let's have a
20:42
look at that okay and it's followed what
20:45
we said but it's actually given us a few
20:47
different options here let's see if the
20:49
sign up free button works and instead of
20:52
using the Google oo here let's see if we
20:54
can sign up using an email Okay so we've
20:57
hit an error here error signing up up
20:58
failed to fetch what we will do is let's
21:01
just come down here and I have a
21:04
suspicion that this is because we
21:06
haven't connected to our super base yet
21:08
so now the website is loaded let's go up
21:10
to the superbase connection in the top
21:12
right corner we found the lovable demo
21:14
project and all we're going to do is
21:16
connect to that project great so it's
21:19
connected follow the instructions in the
21:21
chat to complete the integration so
21:23
let's go back to the project and it's
21:25
given us some additional instructions to
21:27
follow to connect to super base so it's
21:30
encouraged us to just keep building and
21:32
giving us a few bits of information
21:33
around user accounts login Etc but the
21:37
one thing we're missing is we still have
21:39
no tables inside
21:42
our super based database so let's ask it
21:45
to do a couple of things let's ask it to
21:47
fix the login page and that's still not
21:51
working so it wasn't a super base issue
21:54
or it potentially was because there's no
21:56
tables there so let's tell it the errors
21:58
that we're faing and it will go into the
21:59
code and fix that for us so let's go
22:01
back to our school page where we have
22:03
the implementation plan in here and it
22:06
already set out a plan for what the
22:08
different tables should look like in
22:09
super base so if I copy and paste that
22:11
we'll go back to lovable the first one
22:14
we've already put in so login sign up is
22:16
not working either through Google oo or
22:18
normal signup and then I've put the name
22:20
of the error in and then I'll put we
22:23
have no tables in our superbase database
22:26
here's an example of what they could
22:29
look like add any other necessary
22:33
tables and we'll just paste in that
22:35
super base example set up there and
22:38
we're just going to let lovable run
22:39
through that and see if we come back
22:42
whether the login and sign up errors are
22:45
now fixed so this is where lovable gets
22:47
really powerful because they have the
22:48
inbuilt integration with superbase we
22:51
don't even need to go to superbase to
22:53
set up our tables if we were setting up
22:55
a project through superbase we'd have to
22:58
go to the SQL editor and this is an
23:00
alternative way to do it we'd copy and
23:02
paste in these table schemas which is
23:04
basically the different tables and how
23:07
they link to each other and the data
23:08
types and we'd have to paste those into
23:11
here we'd have to run the command but
23:13
because they've got this inbuilt
23:14
integration it gives us the different
23:16
tables that we suggested along with
23:19
access policies and you'll need to go
23:21
through these because they won't be
23:22
perfect and make sure that these access
23:25
policies are secure before you publish
23:27
don't treat this like a production ready
23:29
app you still need to make sure that
23:31
it's got the security policies test out
23:33
the website test out all the different
23:35
edge cases see if you can break into
23:38
your own website because there may be a
23:41
policy missing that means other people
23:43
can access certain pages they can't or
23:46
people can access uh information from
23:48
the database so you need to go through
23:49
and check that as well or use an AI tool
23:52
to help you check those policies and
23:55
understand what they mean but we've got
23:57
a few policies in here like users can
23:59
view their own transactions user can
24:01
insert their own transactions so all it
24:03
asks us to do is to apply changes so
24:06
that's going to create those tables in
24:09
super base for us so again we don't have
24:10
to touch a thing and soon we'll be able
24:13
to start building out the backend
24:14
automations that can link to this so
24:17
first let's just see if the generic sign
24:20
up is working before we do anything
24:23
around Google so let's go to create
24:26
account here and it's come up with a
24:29
cool little popup here account created
24:31
check your email to confirm your account
24:33
and if we go back to our super base
24:37
tables so we can go to our database on
24:39
the left hand side here you have a
24:41
visual view it's set up three tables for
24:44
us one is tools one is profiles so that
24:48
would be our users and another is
24:49
transactions so you can see that it's
24:51
understood and started building out what
24:54
our tables should look like and the
24:55
links between those tables and and if in
24:58
fact we go instead to table editor we
25:02
click into profiles you can see that
25:04
it's created a new user under my email
25:08
and it's given me 50 credits because it
25:10
said on the free plan you get 50 credits
25:12
so it's got all the information we need
25:14
to start connecting us up there it's
25:16
missing a stripe customer ID because it
25:18
hasn't forced us to go through a a pay
25:20
wall which we'll cover but you can see
25:22
that it is now working the front end
25:24
with the back end which is really
25:26
awesome and taking no time at all so
25:28
let's go back to lovable here and let's
25:32
sign in so signed up as well with a
25:35
different email address here whil the
25:37
camera was off and we're just going to
25:39
log in there and that will hopefully
25:42
take us through to a dashboard great so
25:44
what we've got here is a dashboard it's
25:47
come up with error fail to load tools
25:49
because we've not actually uh created
25:51
any tools here but it's actually
25:53
predetermined that we've got a search
25:55
bar here to search the different tools
25:57
it's from our initial requirements that
25:59
this is like a tools Marketplace we'll
26:01
be able to pick some tools spend some
26:04
credits on those tools so it's given us
26:06
50 credits for the free trial and we've
26:09
got different categories that it's
26:10
assigned here so two things we're going
26:12
to need to do here we are going to need
26:16
to one create some tools on the front
26:18
end but two be able to connect those
26:21
tools to our back end which we said
26:23
we're going to build in n and enable the
26:27
connection between the front end and
26:28
back end so let's start doing that now
26:30
so we're going to go into our workflows
26:33
in n8n and once we're inside n we're
26:36
just going to go to create workflow and
26:39
just to remind you the automations that
26:41
we're going to build here we're first
26:42
going to build a sales lead qualifier
26:45
where the inputs are a LinkedIn URL and
26:48
criteria that we're going to score
26:50
against and it's going to output for us
26:52
a score against certain categories that
26:55
we give it using Ai and the second one
26:58
is uploading a file extracting data from
27:01
that PDF and summarizing it using Ai and
27:05
sending that back to the front end so
27:07
within our workflow we'll just call
27:10
this lovable D sales lead qualifier and
27:15
all we're going to do is open up the tab
27:19
here of tools and we are going to click
27:21
on the web hook so we're going to
27:23
receive a web Hook from loable to this
27:27
address and let's first just test that
27:29
that actually can be set up for us so
27:33
let's take the production URL from here
27:36
and we're just going to make sure that
27:37
workflow is saved and we're going to ask
27:40
in lovable to create two tools and we're
27:43
just going to say create one tool a
27:45
sales lead qualifier with an input field
27:47
of LinkedIn URL and a second input field
27:50
is a description of qualification
27:53
criteria these values should be sent to
27:55
the following web hook address and what
27:57
I've done is taken the address from our
27:59
production URL copy paste this get
28:02
address but let's actually just change
28:04
it to a post address because we're
28:07
sending data let's leave all of this as
28:10
is but actually we can change this path
28:13
here to sales lead qualifier just to
28:17
make it a bit more clean let's take that
28:20
back to our lovable environment and
28:23
replace that web hook address and then
28:25
we've told it it should display a
28:27
descrip text box with the web hook
28:29
response when it returns so what we're
28:33
going to have here is the web hook
28:35
that's receiving the data from lovable
28:37
when I user inputs and clicks next we're
28:40
then going to take some action so for
28:42
now we're going to use the do nothing
28:45
operation just to test it works and we
28:48
will have a web hook respond to web hook
28:52
node which will send the data back to
28:56
our lovable site and what we're going to
28:59
do is say respond with all incoming
29:02
items back to The Lovable site and in
29:05
here we're going to create a node or a
29:09
set of nodes in N to qualify those sales
29:13
leads but right now we're just testing
29:15
that the connection works so let's ask
29:17
lovable to create that and it has the
29:20
web hook address in here so it's going
29:22
to go ahead and start making that and
29:25
then whilst it's doing that let's
29:27
duplicate at this flow and just to
29:31
remind you we were extracting data from
29:33
a PDF and summarizing it so let's just
29:36
call it extract from PDF let's duplicate
29:39
that flow and again we have the web hook
29:42
do nothing respond to web hook and we're
29:45
just going to change the path here to
29:48
extract from PDF we're going to copy the
29:52
production URL and we're going to just
29:55
have to make sure that if we're using
29:57
the production URL and not the test URL
29:59
that we've activated the workflow so
30:01
that they can actually receive the web
30:04
hook trigger here so again at this point
30:06
we're just testing we're not trying to
30:08
achieve anything in particular apart
30:10
from sending the data from the front end
30:13
received do nothing with it respond with
30:16
everything that it's received back just
30:18
to check it displays on the back end as
30:21
well so I've come back here and it's
30:22
told me that the build was unsuccessful
30:25
if you click into this it tells you what
30:27
was unsuccessful cannot find name
30:30
skeleton did you mean selection so there
30:32
was just some build error but what we
30:34
can do whenever we get build er error is
30:36
go up here on try to fix it it's also
30:39
giv us a warning that a file here is
30:42
getting too
30:44
lengthy but let's not worry about that
30:46
let's just ask it to rebuild and see if
30:48
it can get it done so I logged back in
30:50
and I noticed there were no tools
30:52
showing and it it's had the error failed
30:54
to load no tools again so I've told it
30:57
that and it said okay the issue existed
31:00
because in our database there was no
31:03
tools is featured column and it was
31:06
relying on that to exist to show the
31:09
different tools so it's given us the SQL
31:14
code to add some columns to the tools
31:17
table so that it can then apply those
31:19
changes so let's apply those changes and
31:22
we'll run it and we'll see what it comes
31:24
back okay so after a few iterations of
31:26
just saying the tool isn't showing at
31:28
all it's added some sample tools to our
31:32
tool table that are now showing in our
31:36
that we just accepted and told it to run
31:39
it and they are now showing in our
31:42
dashboard so we've got featured tool
31:44
section and an all tools section and you
31:47
can see it's added four tools but not
31:50
the tools that we asked it to add so
31:51
let's go back up and just reiterate this
31:55
prompt that we'd like it to create this
31:57
tool
31:58
and then hopefully we can move forward
32:00
with this tool and start testing it out
32:03
you can see that it's also assigned
32:04
different credit amounts to these
32:06
different tools and it's done all of the
32:09
user interface for us so we don't have
32:10
to worry about that and it's even
32:12
created descriptions put it in different
32:14
categories so this is really cool and
32:16
really quick this would take you a long
32:18
time to mock up by yourself and then
32:22
create the database in the back end and
32:24
all the data and the fake data whereas
32:26
this has done it super quickly for us
32:29
even though it's a bit back and forth
32:31
it's going to save you a lot of time if
32:32
you want to create a front-end website
32:34
that interacts with the back end so
32:37
let's create this tool and then start
32:39
testing if it interacts with our web hug
32:42
and one thing I will mention here is
32:44
whilst we were going through that
32:45
process it asked me to upgrade and said
32:47
I was nearing my daily limit so if
32:50
you're going back and forth trying to
32:51
create something complex like this you
32:53
might have to upgrade to the $20 per
32:56
month once but arguably that's well
32:59
worth it for the functionality you get
33:01
and the time you're saving we've now got
33:03
the tool appearing in the all tools and
33:07
it's given us a little description here
33:09
so let's click through and what we can
33:11
see here is we have a description
33:14
qualify sales leads based on LinkedIn
33:16
profile and custom criteria so very
33:18
appropriate it's got an about section
33:21
and we can see there's a few options
33:23
here it's a sales tool we can go back to
33:25
the dashboard tells us about the credits
33:28
per use uh gives us another description
33:31
and then it has a run tool makes it very
33:34
clear that we're going to use eight
33:35
credits to do so but obviously we
33:37
haven't set up the functionality to take
33:38
away the credit so I'll be interested to
33:40
see if it does that correctly it's got
33:43
the LinkedIn profile URL with an example
33:46
in here that we could insert and then
33:48
it's got the qualification criteria
33:51
which we enter a specific criteria to
33:54
qualify this lead so actually it's done
33:55
a really good job of setting up this
33:59
interface so that we can pass inputs in
34:01
let's actually try and put some inputs
34:03
in here let's add my LinkedIn profile
34:06
just as an example and see if our web
34:10
hook actually receives it and we'll see
34:12
this in the executions inside n so I've
34:15
added in my LinkedIn URL and just added
34:18
test qualification criteria let's click
34:21
analyze lead it said it's processing and
34:24
it said there is a problem problem
34:26
processing your request please try again
34:28
later let's go to n and it seems like
34:32
something has run so let me come back
34:35
inside here inside our executions we'll
34:38
be able to see if the data was received
34:40
and the issue was not that the data
34:42
wasn't received actually seems to have
34:44
received the data it's just that we had
34:46
respond immediately rather than use the
34:49
respon to web hook node so let me just
34:52
come in and change that to respond to
34:54
web hook node and we'll do the same on
34:57
the other tool as well whilst we're here
35:00
let's save that let's go back let's give
35:03
it a go again analyze lead and it's
35:06
processing and it's actually come back
35:08
with an output straight away so it's
35:10
actually received a web hook response so
35:13
let's go into the executions let's see
35:16
what's happened here and check that
35:18
we're actually receiving the data
35:20
correctly and that it's sending back
35:22
correctly so we've received the body
35:25
which contains the LinkedIn URL and
35:27
criteria so that's amazing it's got all
35:29
of these headers which we're not really
35:30
concerned about says that it's coming
35:32
from The Lovable project but effectively
35:35
we are sending and receiving the data
35:38
and also we have sent back the LinkedIn
35:42
URL and criteria so we've sent
35:44
everything back and you can see that
35:47
we've received the body back of the
35:49
LinkedIn URL and criteria so that's
35:51
awesome the web Hook is actually working
35:54
so now what we need to do is build out
35:56
the workflow to actually do something
35:58
for us like sales lead qualification so
36:00
whenever we want to use an app that we
36:02
know isn't inbuilt into n for example
36:06
here we are trying to scrape LinkedIn
36:08
profiles we're going to come to
36:09
something like appify that has a whole
36:12
list of user built nodes that we can
36:15
connect into or apis that we can connect
36:18
into an alternative to that is finding a
36:21
solution that's another external API
36:24
that scrapes LinkedIn profiles or does
36:26
the exact thing you need here if we just
36:28
got a list of lots of different options
36:31
that we can connect to with one simple
36:34
API call so we're just going to type in
36:36
LinkedIn profil that's what we're
36:37
looking for here and we're going to find
36:39
a LinkedIn profile scraper like this one
36:43
uh 2.7k users 4.8 out of five that seems
36:47
like a good bet you'll be able to try
36:51
this for free and with every plan on
36:53
appify you get a free plan up to $5
36:56
usage for free and you can see this one
36:58
charges $10 per thousand results so you
37:01
could get 500 results on your account
37:03
for free here but when you're creating a
37:06
paid SAS anyway you're going to have
37:08
paying customers so this might be easier
37:11
than going out and building your own
37:13
LinkedIn profile scraper so it's hit try
37:15
for free on this one and I'll show you
37:18
now how to set that up in na so I've
37:21
previously looked here and we've added
37:23
some profiles so we've got Bill Gates
37:25
here and my profile here and all we're
37:27
going to do is we're going to go back to
37:30
the lovable na backend sales lead
37:33
qualifier flow going to open up a HTTP
37:36
request which allows us to connect to
37:38
any API and we're just going to make
37:41
this a post request because we're going
37:42
to be sending data we're going to find
37:44
the url for this case we don't actually
37:47
need the authentication because I'll
37:48
show you you pass it in the URL we pass
37:51
our API key and then we're going to send
37:53
a body which are going to be the
37:56
profiles that we want to scrape for that
37:59
we're going to make sure that's Json and
38:01
we're going to go and get that from
38:02
appify now so inside the appify scraper
38:06
we go to Json here in the inputs and you
38:08
can see that it gives us the Json that
38:10
we need to pass back in our actor so
38:14
we're going to turn this into an
38:15
expression because we want to change it
38:17
to Dynamic inputs in a moment but we'll
38:19
test it on these two profiles first and
38:22
then we're going to go back and we're
38:24
going to hit Integrations use API endp
38:27
point
38:28
and what this is going to do is give us
38:30
a few different options to run this
38:32
endpoint but it's also going to append
38:34
our API token to the end if you haven't
38:37
set up an API token before go into
38:40
settings in API and Integrations create
38:43
a new token and that will be the token
38:45
that's created you probably have one
38:47
already in your profile so let's go back
38:50
to the actor use API endpoints and we
38:54
are going to want to run the actra
38:56
synchronously and get data set items so
38:58
basically we want it to return the data
39:01
and don't uh so we don't have to keep
39:03
asking if the data is ready we want it
39:05
just run and return that data so we've
39:08
copied that here we're going to paste it
39:11
into our actor here inside the URL and I
39:15
will delete this token afterwards
39:17
because you can see it just appeared in
39:19
here as well and that means we don't
39:21
need authentication because it's already
39:23
built into the request so let's just
39:26
test that and see if it Returns the
39:28
information from these two profiles
39:30
successfully and because we're doing two
39:32
profiles and it was $10 per th000 this
39:35
is going to cost 2 cents and at this
39:38
point we're just testing if it works and
39:40
you can see it's returned all of this
39:42
different M information if we go to the
39:44
schema you can see we've got the
39:46
connections the number of followers job
39:48
titles job descriptions so a lot that we
39:51
could use to qualify this person if it
39:55
was a sales lead qualifier tool so we've
39:58
set that up in our appify actor so what
40:00
we need to do now is say okay from the
40:03
data we received from the web hook scan
40:06
that information and do something with
40:07
it so let's just start adding some notes
40:11
and if you followed my videos before I
40:13
always add notes so that when I reflect
40:15
back on workflows I understand exactly
40:17
what's happening so we're going to have
40:18
scrape LinkedIn profiles in here and
40:21
then we're probably going to have
40:22
another step where we qualify that lead
40:26
against the criteria that's input so for
40:29
that we're going to need an llm node
40:32
which is effectively being able to chat
40:35
directly with n sorry with AI and we're
40:39
going to need to give it a model so
40:41
we'll give it open AI chat model and
40:44
we'll connect to open router so we can
40:47
access multiple different models through
40:49
there if you've not set this up before
40:52
check out the full course where we run
40:54
through all of this including what is an
40:56
AI agent how to use different llm
40:59
workflows and everything like that but
41:02
if you're familiar this should be fairly
41:04
straightforward so we're going to
41:05
receive the data we're going to scrape
41:07
the LinkedIn profiles and we're going to
41:09
qualify the leads just going to rename
41:11
this and again I like to name all of my
41:15
nodes so that they're really clear so
41:17
this is going to be qualify leads and
41:20
we're going to Define below the prompt
41:23
in which we ask it to qualify those
41:26
leads and tell it what it needs to
41:28
return in response so inside the qualify
41:31
leads I'm just going to write a or I've
41:33
just written a basic prompt you're a
41:36
sales lead qualif specializing in
41:38
LinkedIn base lead evaluation your task
41:41
is to assess each lead based on their
41:43
LinkedIn profile which is the input and
41:46
rank them against the following criteria
41:48
job title and role industry and Company
41:50
fit professional experience and skills
41:53
for each Criterion provide a score one
41:56
to five along with a brief justification
41:57
based on the provided on the available
42:00
information and then we will just give
42:02
it the inputs dynamically profile info
42:05
and we'll pass that in in a second and
42:08
then criteria to assess against and what
42:12
we need to do for that is pass those in
42:14
dynamically so we can just go to a
42:16
previous execution of this a successful
42:20
execution copy to editor and we'll be
42:23
able to see the content that we passed
42:25
in the LinkedIn URL and criteria so
42:30
inside here we are going to have the
42:32
criteria from our initial web hook let's
42:36
put that in here and that's the criteria
42:38
it's going to assess against and then
42:40
for profile info we've got a couple of
42:42
options here because we're going to
42:44
receive potentially multiple profiles in
42:47
a list so what we want to do first is
42:51
let's just test a single profile so
42:54
let's pass in the LinkedIn UR here
42:57
inside the body and you can see that
43:00
that's populated dynamically we just
43:02
drag and drop that
43:03
over and then if we just have one it's
43:06
going to be relatively easy because
43:08
we're passing through one here one here
43:10
one output here so let's test it with
43:12
one first and then we'll show you what
43:13
to do if you want to qualify multiple
43:16
leads at once so we need to make sure
43:19
that we're pulling in the profile info
43:21
here as well so let's say from the web
43:24
hook do item Dot
43:27
Json and this if you haven't done the
43:29
full course is just reaching into the
43:32
previous
43:34
inputs
43:35
body. LinkedIn URL and you can see now
43:38
if we open this up down here that it's
43:40
passing in the profile info that's
43:44
that's actually incorrect I need to pass
43:47
in the response of the appify actor so
43:51
let's just deactivate these and what we
43:53
can do is just run this so that it P
43:57
calls the data from the applify actor
44:00
and we've got an error here Json needs
44:01
to be a valid Json so let's remove the
44:04
speech marks from there and there's
44:07
still an error here so let's dig into
44:09
this ah it will be the comma here so
44:12
let's put the speech marks back you
44:15
should have a comma between the items
44:18
but never at the end of an item that is
44:23
never on the last item so now you can
44:25
see it's a valid J object that's going
44:28
to run and return the data hopefully
44:30
there we go we've returned the data and
44:33
now what we're passing into the qualify
44:35
leads will be any data we deem suitable
44:40
so ideally what we want to do is
44:41
aggregate all of this information and
44:43
pass it in as a single item so what we
44:46
can do is just go back into our prompt
44:49
and instead of doing this what we're
44:51
going to do is dollar Json to Json
44:55
string and that's just going to convert
44:57
everything we've received into one
45:00
parameter there are other ways you can
45:01
do this like the aggregate node or just
45:04
pull the information you need like the
45:06
set node but let's just run this on a
45:09
test locally before we interact with
45:12
lovable and you'll want to just pin the
45:15
data once it's run so that you can pin
45:17
it whilst you test so you're not being
45:19
charged every single time and that will
45:21
just run the same information and it's
45:23
returned uh multiple items here Simon is
45:27
the founder of automake as a Founder is
45:29
likely the key decision maker so it's
45:31
assessing against criteria but obviously
45:33
our criteria that we put in was terrible
45:35
it was just test criteria but it should
45:38
only be returning one item in the output
45:41
here so let's make that clear in the
45:44
output format and in fact what we're
45:47
going to do is a method where we can
45:50
just return without a specific output
45:52
format so let's delete these and let's
45:55
see this time it will return one output
45:58
format but for multiple leads we're
46:00
going to make a few amendments in a
46:02
moment okay so it's returned one output
46:05
format and let's actually test this with
46:08
a profile URL using the web hook and
46:12
that will actually respond to the web
46:13
hook then let's add multiple so let's go
46:16
back to lovable we will go into our tool
46:20
and we're in the dashboard and we'll go
46:22
back to the sales lead qualifier and if
46:23
we go to run tool we know that we can
46:25
put in our LinkedIn URL and our
46:27
qualification criteria and let's unpin
46:30
the data here unpin it in this test save
46:33
the workflow and all we're going to do
46:36
is put in the LinkedIn URL that we want
46:38
to scrape so we've put s uh looking for
46:42
co-founders who have marketing
46:43
experience to advertise our marketing
46:45
tool to so this is qualifying my profile
46:50
against that so what we're going to do
46:52
is analyze that and it's going to run
46:54
through and we'll see this in the
46:57
executions of the tool it will run
46:59
through here so it's going to scrape the
47:02
profile it's going to qualify my profile
47:04
based on the information it receives
47:06
against that lead and then it's going to
47:09
return that hopefully to lovable so
47:12
we'll go back to lovable yes it doesn't
47:14
look brilliant but we can format that
47:16
output but it's got all the content so
47:19
the output is displaying so it's
47:21
returning all the data as we saw before
47:23
and it's given different scores so
47:25
actually okay
47:27
professional experience and skills score
47:29
three Simon has a solid technical
47:31
background with significant experience
47:32
in operations and automation true but
47:35
his marketing experience is not
47:36
explicitly outlined in the skills or
47:38
endorsement on his profiles his past
47:41
roles have involved scaling delivery
47:42
operations and automating processes
47:44
which can translate to insights into
47:46
marketing and user engagement however
47:48
specific marketing skills appear to be
47:51
lacking making this aspect of his
47:53
profile somewhat less compelling for
47:55
advertising your marketing tool so
47:57
actually it's done a really good job of
47:59
kind of reading the profile analyzing it
48:02
and returning that data so you can see
48:04
that you could offer a tool like this to
48:06
a user but one thing you've probably
48:08
noticed is that the credits have not
48:11
gone down so something is not working in
48:14
terms of when a tool is used updating
48:17
that in the database which is really
48:19
important when you're trying to charge
48:22
users for a tool that's based on credits
48:25
or number of uses one quick thing we're
48:29
going to do is just make this a bit more
48:30
useful able to scrape multiple profiles
48:33
at once and return information based on
48:36
that and then we will deal with the
48:38
credits not updating and move on to our
48:42
second automation before we finally set
48:44
up the payment what other tools you
48:47
could sell with this kind of s so let's
48:49
say we have a comma separated list as
48:51
the input what we're going to do is use
48:53
the edit fields or set node and we can
48:57
just say Okay based on the input we're
49:01
going to need to grab the LinkedIn URLs
49:04
but perform manipulation on them so
49:07
let's call this URLs not URL and we're
49:10
going to say okay turn this into an
49:13
expression so it's going to be a
49:14
JavaScript expression and what we are
49:17
effectively saying here is if you have
49:19
multiple inputs under LinkedIn URL which
49:23
would come through our field then we're
49:26
going to separate by the commas and then
49:28
each URL so each item in that by comma
49:33
we are going to remove any white space
49:36
and then we're going to join it by these
49:39
quotation marks but also a new line
49:41
between it so it looks complex but
49:44
actually I've just used perplexity to
49:46
talk through the formatting that's in
49:48
the input and the formatting that is the
49:51
output and it's helped me come up with
49:53
this n expression that's going to work
49:56
the job for us so let's go with an
49:59
example of multiple and check that just
50:02
up until this point it's working
50:04
correctly so if we go back here and
50:07
let's put in a comma and let's put in a
50:10
second LinkedIn URL and let's just use
50:13
build Gates Again so we've got two URLs
50:16
here let's send that to be analyzed and
50:19
for some reason it's there was a problem
50:23
proing the request so let's go check if
50:25
the problem was in inside our workflow I
50:29
see so because we've disconnected this
50:31
respon web hook flow it's not worked
50:34
correctly so let's just connect this
50:35
back up and try it again and it should
50:39
now start processing that if we come
50:40
back to n we'll see in the execution
50:43
history what's happened here so you can
50:46
see that it's received multiple items
50:51
and it's actually split them exactly how
50:53
we need for our appify input so so
50:56
appify has then uh got the incorrect
50:59
input but if we just drag LinkedIn URLs
51:02
across here that should work correctly
51:04
so in appify actor let's go back to
51:07
executions and this is a great way to
51:09
test things by the way you can copy this
51:11
to editor and now we can see okay
51:14
instead of putting this in here let's
51:16
just dynamically pass in the LinkedIn
51:18
URLs and we can see that would populate
51:21
exactly like we need in our appify actor
51:24
now to process multiple of these so this
51:28
is going to pass multiple items to our
51:30
qualify lead which is then going to pass
51:33
multiple responses back to the web hook
51:36
so to pass it as one single response so
51:39
that we give a response based on all of
51:42
our inputs in fact let's go back and
51:45
test it and I'll show you exactly what
51:46
it does if we put input multiple let's
51:49
analyze lead which is running the tool
51:51
again and that's processing and you can
51:54
see in the executions that it is running
51:58
and actually that's worked better than I
52:00
thought it would I thought we would need
52:01
some additional method here to get the
52:04
response in here but it's actually given
52:06
us the response for both of those so
52:10
we've got that back in here now
52:11
obviously the format that it's returning
52:14
in is not ideal and we could do some
52:17
extra formatting steps but for this
52:19
demonstration it's about actually
52:21
passing that data back we could do some
52:23
extra formatting steps we've got plenty
52:26
of Community Resources about
52:28
reformatting data so we won't touch on
52:30
it here but basically we've got our
52:32
first SAS tool that you could sell to
52:35
other people which is our sales lead
52:37
qualifier and it didn't take any time at
52:39
all most of the time is in the setup and
52:42
waiting for lovable to run and then
52:45
iterating back and forth with that so
52:47
that's really cool let's go to our
52:50
second one here which is extracting data
52:53
from a PDF what we're going to do is set
52:55
up this one
52:56
exactly in the same way but touch on a
52:59
few things about file transfers and then
53:02
we will look into the credit system and
53:04
how to make sure that that updates so
53:06
that your users aren't abusing their API
53:09
keys or so that you can charge credits
53:12
for using certain tools and then let's
53:14
also look at applying a pricing gate so
53:17
that users have to pay to sign up and it
53:20
will confirm in the back end that
53:24
they're signed up and paying before it
53:26
them to use the tool so the key things
53:28
you need to make it into a proper SAS so
53:32
again let's go back to lovable and let's
53:34
just test if we receive the binary data
53:36
inside the web hook and also can send a
53:39
file back because we're going to need
53:40
both of those functionalities
53:42
potentially in the future so we'll go
53:44
back to the lovable prompting and
53:46
similar to when we told it exactly what
53:48
we needed for the first tool let's do
53:50
exactly the same for the second tool so
53:52
I've started prompting it here and I've
53:54
just decided to be fairly generic at
53:56
this point and not give it much
53:58
instructions so just a PDF extraction
54:00
tool and it's identified in lovable that
54:03
we want to create a PDF extraction tool
54:05
that can pull content from PDF files and
54:08
it said okay to do that let's add
54:10
certain things to the database so let's
54:13
approve those changes the one thing
54:15
we'll also need to do is enable a user
54:18
to upload a file so we might have to
54:20
prompt it that as well so let's see what
54:22
this does for us so it's already said
54:24
now that we've successfully added the
54:26
PDF extraction tool to the database I'll
54:28
create the PDF extraction tool
54:30
functionality so that's not what we want
54:32
to do here um but it we do need to allow
54:36
the upload of PDF files so let's see
54:38
what it makes and then uh modify it from
54:41
there and as you can probably already
54:42
tell I'm regretting being so vague in my
54:45
inputs so I should have been more
54:46
specific I need the user to be able to
54:49
upload the file in inputs not do the
54:51
extraction itself the file should be
54:53
sent as data to the following web hub
54:56
and I've given it the web Hook from our
54:59
test or sorry production URL and we will
55:04
update that there so that it can
55:06
actually send the binary data file or
55:09
the PDF to that web hook let's Let It
55:13
edit come back and test the tool out
55:16
whilst we're doing that we will add the
55:19
ability to download the file so we've
55:22
got the extract from file here and if
55:25
we're just doing basic
55:27
extraction we can actually just connect
55:29
up this to the web hook extract from PDF
55:32
the input would be called data and again
55:35
we're just going to add an llm chain
55:37
because all we're going to do is ask it
55:38
based on the inputs summarize the
55:41
content in the PDF so we'll put notes on
55:44
our workflow in a moment but for now
55:47
let's just connect the same as we did
55:49
before to open rout or open AI whatever
55:52
your preference is through there and in
55:55
the prompts let's
55:57
say to summarize the incoming PDF data
56:01
and obviously if you were building out
56:03
these tools you want to add in your own
56:05
prompts this is just a demonstration of
56:06
the capabilities of sending files to and
56:09
from our web page that we've built with
56:12
lovable and we'll reference the correct
56:15
data point in a moment once we
56:17
understand the data is being sent
56:19
through so we know this is going to fail
56:21
at first it says the PDF extraction tool
56:23
now uploads files directly to your
56:25
specified webhook H when a user selects
56:27
a PDF file and clicks the upload PDF
56:30
button it's sent to our web Hook and the
56:33
response from the web Hook is displayed
56:35
in the text area below great so let's go
56:37
into our tools in the dashboard and
56:40
we've got PDF extraction cost five
56:43
credits again given all the details here
56:46
let's go to run tool and it's given us
56:48
an upload PDF file option which is
56:52
awesome when we click it it opens our
56:54
most recent files and let's go to this
56:57
file in my documents AI Explorer road
56:59
map which is one of the files you get
57:02
when you join the school Community it's
57:04
like an onboarding guide so let's see if
57:06
it understands that file let's click
57:10
upload PDF and we know already it's
57:12
going to fail in N so we just want to
57:14
see what the error is there and also
57:17
what data is being passed through so a
57:19
lot of this is going back and forth just
57:21
testing there we go the errors come up
57:24
and great it's actually sent the PDF
57:26
file but it's called it file not data so
57:29
all we need to do is either tell it in
57:31
lovable to change it to data when it
57:33
sends or just call this file and that's
57:35
absolutely fine we'll extract from the
57:38
file now we will be able to tell if we
57:41
run it quickly again and it's often
57:43
better to just open this into a new tab
57:47
because this keeps refreshing in this
57:48
window so you can open it in a new tab
57:50
and refresh instead it's probably going
57:52
to save you a bit of time if we refresh
57:56
here we can see it's the correct tool so
57:59
there was an error there which is
58:01
probably coming from our n environment
58:03
again yes it was and that's because we
58:05
don't know what data is being passed
58:06
through yet so we can see that it's
58:09
passing through this text field so again
58:12
let's debug in editor which allows us to
58:14
see the previous executions get rid of
58:17
this and let's just pull through the
58:19
text all we want is the text and let's
58:22
take this to the top summarize the
58:24
incoming PDF data and we'll call this
58:27
summarize PDF as we always want to label
58:29
this up we'll add a few workflow notes
58:33
and again refer to the longer 4our
58:37
tutorial on N best practice for the
58:39
reasons in why I do this but when you
58:42
revisit workflows or create lots of
58:44
tools this is going to be super helpful
58:47
for you to reference what's actually
58:49
happening so we have summarized PDF
58:51
we'll have extract from file and it
58:53
should just upload text in response
58:56
so let's try it again upload the PDF
58:59
that's going to process let's see if it
59:01
comes back with a summarized response
59:04
and again the formatting won't be
59:05
perfect because it'll be the out direct
59:07
output of our llm node but here we go
59:11
we've got a uh a file that says
59:14
extracted content but it's also put it
59:16
in an output the AI Explorer road map is
59:19
a guide designed to help businesses
59:20
leverage Ai and automation effectively
59:24
it talks through all of the different
59:26
steps that are part of the guide so
59:28
we've now successfully passed the file
59:31
from a front end to the back end
59:34
summarized it using Ai and pass the
59:36
response back the final thing I just
59:38
want to touch on here is like what
59:39
happens if you want to pass the file
59:41
back so I'm going to put this should
59:43
also be able to receive an output file
59:46
back if one is passed and to remove the
59:49
extracted content section CU it already
59:50
had an output we're going to run that
59:53
that's going to update that for us so
59:55
now we've got two working completely
59:57
different AI SAS Tools in a very short
60:00
space of time you can see how quickly
60:02
you can mock this up if you come into
60:06
the school you can go into the classroom
60:08
and the plug andplay templates and what
60:11
you could do is use absolutely any of
60:13
these to create SAS tools for yourself
60:16
so we've got things like a meeting
60:18
summarizer so people could upload their
60:20
meeting notes you've got an email inbox
60:22
agent you've got scraping any website
60:25
data you've got the thousands of tools
60:27
on appify you've got a voice planning
60:30
agent so somebody could so somebody
60:32
could upload their voice and it could
60:34
plan something out for them you've got
60:36
competitor research so you could input
60:38
links you can see the opportunities with
60:40
all of these templates are endless when
60:43
you combine it with the fact that you
60:44
could then sell this as a product with
60:48
Dynamic inputs that would push outputs
60:50
to to your users so it's really an
60:53
amazing tool or an amazing tool set to
60:56
use together and I've created this with
60:59
no experience in very little time so
61:02
we've come back now to lovable and it's
61:04
saying the PDF extraction component now
61:06
uploads PDFs to the web hook and can
61:10
also receive them back so let's refresh
61:12
our page here and let's just go into our
61:17
workflow here and test that theory so
61:20
let's connect it directly to our respond
61:23
to web hook node let's just deactivate
61:26
those so the file should now be received
61:28
and sent back so let's see if that
61:30
actually is true so a lot of this is
61:33
like back and forth testing to check
61:34
things work but you can see we've built
61:36
a lot of different functionality not
61:37
just text back and forth but also any
61:40
files you wanted to upload really simple
61:43
to to do so let's do exactly the same
61:45
again let's upload the PDF see what the
61:47
response is interesting so it's now come
61:50
back and immediately it's downloaded the
61:53
process document so we have confirmed if
61:56
we look at the execution that actually
61:59
it did succeed and what it's done is
62:02
receed the file and send that file back
62:04
so we can send files back and forth as
62:06
well so let's just connect this all back
62:09
up and that is to working SAS tools with
62:14
very little time this whole time we've
62:17
been running on 50 credits which is a
62:19
big issue because if you're selling this
62:21
to others you want them to use their
62:23
credits up as they're doing this so we
62:25
need to to tell it so we need to tell
62:27
lovable to take credits away when
62:30
somebody's using it and then also we
62:32
need to implement a pay wall with
62:34
stripes so we're going to cover both of
62:35
those now so let's now talk about
62:37
setting up a credit system that works
62:40
and if I just remind you of our diagram
62:43
here we effectively have the front end
62:47
built so lovero is integrating with our
62:50
backend we've got two automations set up
62:53
and you can set up any automation like
62:56
this impr prompt lovable set up the N
62:59
Automation in the background and we've
63:01
got two automations already set up
63:03
inside n and like I mentioned at the
63:06
start you can Implement absolutely any
63:08
automations and have this as a tool on
63:12
your Marketplace or as a SAS separately
63:16
those are running now correctly we now
63:19
need to tackle these backend steps which
63:22
is making sure that when a tool is used
63:24
we log the usage for that user in
63:27
particular but also on a tool level and
63:30
then stripe we need to connect our
63:33
account so that we ensure that users
63:37
have paid to sign up to our service as
63:39
well so let's start with the database
63:41
and ensuring that when we're using
63:43
credits which are just arbitrarily
63:45
assigned at the moment but we could go
63:46
back in and change that they're actually
63:49
counting on the DAT on the database and
63:52
then once we've used a certain amount it
63:53
should then tell us that we need to up
63:55
upgrade to a paid plan so we're first
63:58
going to go back into the database
64:00
project we'll go to table editor and
64:03
we'll just have a quick look through the
64:04
tables here so we've got two different
64:06
profiles that have signed up so those
64:08
were the two IDs I signed up with we've
64:11
then got the tools so any tools that we
64:14
don't want to appear on our SAS we can
64:17
remove here because actually we've not
64:19
generated any of these tools and these
64:22
are just ideas it's put in for us but we
64:24
have made the sales lead qualifier in
64:25
the PDF extraction so let's delete those
64:28
four rows from the back end we'll
64:30
refresh here which is connected to our
64:32
database we'll go back to tools and
64:35
you'll see now that only two have
64:37
appeared here we might not want this
64:39
featured tools section but it's not a
64:41
problem for now and again we could
64:43
change the categories but we're not
64:45
worried about that for now so
64:46
transactions in here we have an empty
64:49
database so you can see that none of the
64:52
users have been added here so whenever a
64:55
button is clicked in our app like say we
64:57
use the sales lead qualifier it should
65:00
actually deduct those credits if it's
65:02
successful from our account so once we
65:05
receive a response or once we click the
65:07
button we should make sure that it's
65:09
deducting that from our account so we're
65:12
going to go back to lovable and just
65:14
tell it that that's not happening so I
65:16
said each time a tool is run it's not
65:18
deducting credits from the users's
65:19
account also the user that's registered
65:22
doesn't seem to have a transaction
65:23
registered in the table so I know this
65:26
from our transactions table we've got
65:28
all the data in here but actually none
65:30
of it is being registered so let's go
65:33
back and let's process that with lovable
65:37
and that's going to make updates to that
65:39
in the meantime let's head to stripe
65:42
where we're going to set up payments so
65:44
you're going to need to set up an
65:45
account in stripe and once you set up a
65:47
stripe account it will give you some
65:50
instructions on whether you want to
65:52
start looking at one-off payments or
65:53
recurring payments so here we're looking
65:55
at recurring payments so say pay $20 a
65:58
month get 100 credits Etc and whilst
66:02
we've been away it's fix the issues of
66:06
credit deduction and transaction
66:08
recording When tools are run so before
66:11
we set up the payments let's just test
66:13
the credits here so we've got 50 credits
66:16
here and if we go to the profiles we can
66:20
see that we've still got 50 credits on
66:23
our profile in the database so there's
66:26
two things that need to happen it needs
66:27
to update in the database but it also
66:29
needs to update on our front end to show
66:32
the user that they've used some credits
66:34
so we're going to refresh this here and
66:37
this says that it's going to use eight
66:38
credits per use and in our backend datab
66:41
base we can see inside the tools that
66:44
it's got a credit cost of eight in there
66:47
so that's great so we're going to run
66:49
the tool we're going to pass in the URL
66:51
we're just going to put some random
66:53
criteria here but because all we're
66:56
looking out for is that it's updating
66:57
our credits both in the database and on
66:59
the front end we will have to add logic
67:02
to this that says if the user has zero
67:05
credits they or not enough credits to
67:07
perform the action then they can't take
67:09
the action so we can see that this is
67:12
not updated up here let's go to the
67:15
database and refresh and again it's not
67:18
updated here has it recorded a
67:20
transaction yes it has so it's saying we
67:22
used eight credits and it gives us the
67:25
in and the output but actually our
67:27
profile S suggest that we've got 50
67:30
credits so the profiles has not been
67:32
updated and nor has the front end so
67:34
let's go back to lovable so you can see
67:36
how you pick apart these different
67:38
problems and solve them one by one with
67:40
lovable help so I said the profiles
67:41
table was not updated with the credit
67:44
usage and nor was the display of credits
67:46
on the front end I.E this part and I've
67:49
added here make sure a user cannot use
67:51
the tool I make them buy more credits or
67:54
put them through through the process to
67:56
buy more credits if they don't have
67:57
enough to perform an action that's a
68:00
critical step in our process because we
68:02
want customers to be able to perform
68:04
actions or guide them through the
68:07
process to buy more credits to do
68:08
actions so let's send that let's see
68:12
what lovable comes back with and test
68:14
that out again okay so coming back here
68:17
with a bit of persistence it's now seems
68:20
to be working you can see it's updating
68:21
my credits here I just contined to say
68:24
similar things
68:26
about the database tables not updating
68:28
eventually it got there let me show you
68:31
exactly what it looks like it's
68:32
currently got a different issue but
68:34
you'll see these credits up update it
68:37
will run it will deduct the credits
68:39
correct amount of credits the database
68:42
tables will update let's see that update
68:45
there you'll see in the transactions
68:47
it's added a new
68:49
transaction however it's not returned
68:53
our it's like refreshed the page too
68:55
quickly and not return the output so
68:56
we're going to need to fix that so we'll
68:59
just say it updated the credits
69:01
everything's working but I was awaiting
69:03
the output which never arrived basically
69:06
so we're stepping in the right direction
69:09
the other thing I want to mention here
69:10
is we have functionality now to deduct
69:13
credits but when you're building out a
69:16
credit based system or any sort of
69:18
recurring Revenue base system the
69:21
database tables need to have a fair bit
69:23
of functionality
69:25
if you come into the school I've
69:27
included a section on setting up an
69:31
effective credit management system
69:33
including the backend prompt here the
69:35
frontend implementation and edge cases
69:38
so you can come in here and grab those
69:40
prompts and that will help you speed up
69:42
the process and remove some of those
69:44
errors when we're going through and
69:47
trying to add this to the UI because it
69:49
will give more specific information to
69:52
lovable about certain edge cases and not
69:55
just deducting credits but thinking
69:58
holistically about how the credit
69:59
management system works okay it's
70:02
updated the states here so let's try and
70:05
run this again and let's analyze lead
70:08
again we're getting a similar problem so
70:10
it's not giving us our output H okay it
70:14
is giving us the output but it's
70:16
throwing us back to the about page so so
70:20
I'll just tell it to keep us on the Run
70:21
tool Tab and then it's going to make
70:23
those edits and then we're approaching
70:25
our zero on here so we can test that as
70:28
well and at that point we want to
70:30
implement our
70:32
stripe payment link which we spoke about
70:35
previously before we'll go and grab that
70:37
stripe payment link and integrate that
70:39
as well it should have updated that now
70:42
so let's go back to tools try the sales
70:44
lead qualifier run tool put in some
70:47
criteria analyze the lead and it keeps
70:50
us on the Run tool it's deducted our
70:52
credits and it's going to give us the
70:53
output so it's now performing exactly as
70:56
we expected let's start integrating our
70:59
payment links here so we're going to go
71:02
back to stripe we're going to grab the
71:05
link from our payment link section and
71:09
we're going to get lovable to set up the
71:11
payment
71:16
links so've added so I've added this
71:20
here so when a user signs up to a plan
71:22
or gets to zero credits gets to
71:25
insufficient credits get them to
71:27
purchase through this payment link and
71:28
I've linked the stripe link it's the $20
71:31
a month plan and should give them 100
71:33
credits in the database the back end
71:35
should all be linked up so we know which
71:38
user is paying and when it's paid so
71:41
let's see what it comes back with here
71:43
it might ask us to set up something on
71:45
the stripe side as I believe we have to
71:48
connect our stripe account to The
71:51
Lovable app here that there's a link
71:53
missing we need to a user to to pay but
71:56
then in our database we need to link
71:58
that user base back from stripe based on
72:01
their transaction to the user in our
72:04
database so I followed up with how does
72:06
this connect to my stripe account and
72:09
know which customers created a
72:12
purchase and it's given me a few extra
72:14
steps to consider we need to have a web
72:19
hook Handler to process stripe events so
72:21
when stripe sends the data that suggests
72:24
a purchase has been made on a certain
72:26
product it should be received back by
72:29
our SAS so that it knows to update the
72:32
database and it knows which user is
72:34
associated with that transaction and
72:37
then along with that is the customer
72:39
linking that I just mentioned so to
72:42
implement this properly we would need
72:43
your stripe secret key do not share your
72:45
stripe secret key with anyone and a
72:47
stripe web hook endpoint set up and then
72:51
Edge functions to handle the web Hooks
72:53
and update your database would you like
72:55
me to implement these stripe integration
72:57
components all we need to do is say yes
72:59
so it understands the steps we need to
73:01
take and we can just ask it to take
73:03
those steps for us and we're going to go
73:05
and grab the stripe secret key here and
73:10
alterate way it may ask you to do things
73:13
is to use the product ID which if you
73:15
click into the product you can just grab
73:18
from these areas and say okay this is
73:20
associated with the AI SAS 100 credits
73:23
product as well instead of of using a
73:25
payment link and it might ask us to do
73:27
that so we've come back here and it says
73:30
we need to create all of this stuff for
73:32
you first I'll need your stripe secret
73:35
key again I reiterate do not share this
73:37
with anybody but it links to the stripe
73:40
API key page here so once we've done
73:42
that it's told us to add the API key so
73:44
I've take gone to that page got my
73:46
secret key come back and just pasted it
73:50
in here we can submit that and now it's
73:51
going to save it in the back end
73:53
securely for us let's move on to the
73:55
next step it asks us to do so while that
73:58
processes just to be clear this is the
74:00
stage that we're at now so we've built a
74:03
front end and we've got the automations
74:05
working on the back end it's now
74:07
deducting Credits based on our usage
74:11
however when we run out of credits it's
74:13
going to force us to sign up and pay and
74:15
right now we are connecting stripe so
74:18
that stripe can interact with our
74:20
database which can interact with our
74:22
front end and everything is synced up so
74:24
that our customers are getting a good
74:26
experience and that also you can sell
74:29
these SAS automations or the process of
74:31
running them in the back end to other
74:33
people great so it's taken our stripe
74:36
secret key and it said it's created a
74:39
complete stripe integration with the
74:41
following features it creates stripe
74:43
checkout sessions for subscriptions and
74:46
onetime payments it handles stripe
74:48
events so whenever stripe receives an
74:51
event like a customer's paid it will
74:53
effectively handle that by receiving
74:55
them back it verifies a user
74:57
subscription status with stripe so
75:00
everything we need it to do with stripe
75:03
it's going to do for us and it also is
75:06
integrated with our existing stripe
75:08
customer ID field in our profiles table
75:12
if you remember in the super base table
75:14
and adds credits to user users accounts
75:17
when they make payments the UI updates
75:19
it's connected the pricing page to the
75:22
checkout flow and updated a billing p
75:25
page to use real product IDs so they
75:28
need a couple of things they need us to
75:29
set up a stripe web hook in the stripe
75:32
dashboard to point to our superas web
75:35
hook endpoint so basically we need to
75:38
connect our database so it updates with
75:41
stripe where we detect that a user has
75:45
made a payment and we need to get the
75:47
web hook signing secret from stripe and
75:50
add it in as a secret in the super base
75:52
with the name stripe web hook secret we
75:55
go through all of this and replace the
75:57
placeholder stripe IDs with your actual
75:59
product price IDs from your stripe
76:02
dashboard and it's actually linked us to
76:04
all of the relevant resources let's
76:07
let's first set up a stripe web hook in
76:09
our stripe dashboard that points to our
76:13
superbase web hook endpoint so we'll
76:16
click on the stripe web hook setup here
76:18
we're going to create an event
76:20
destination and then we need to find the
76:22
endpoint URL and then endpoint
76:25
is effectively a URL that this is going
76:28
to connect to and it's going to hear our
76:31
stripe events so every time customer
76:33
pays superbase is going to hear and
76:37
receive data from stripe and that will
76:40
update the database directly so we'll
76:42
open the edge functions on superbase and
76:46
it gives us these different web hook
76:49
endpoints so we're going to connect it
76:52
to this URL or this end point and I just
76:56
go back there and there's a little copy
76:59
tab there so I'm going to copy that I'm
77:01
going to take it back here and we're
77:03
going to connect it to here and we'll
77:05
just give it a description here of
77:08
superbase stripe we also need to select
77:11
which events it's going to listen to so
77:14
stripe has a load of different events
77:17
for different things that we could take
77:19
actions upon but we're actually just
77:21
looking for checkout session completed
77:25
so when a checkout session is completed
77:27
it has loads of sub events that we'd be
77:29
monitoring and actually just detecting
77:32
so whenever a checkout session is
77:33
completed it's going to send that event
77:36
and we'll just go down there to add
77:38
events add endpoint and that should now
77:41
be set up we'll go back to lovable and
77:44
we need to get the web hook signing
77:45
secret from stripe and add it in as a
77:48
secret in the super base with the name
77:50
stripe web hook secret so we're going to
77:53
go down here to Edge function
77:55
secrets and it's going to pop up with a
77:57
page with all of our secrets here and
78:01
they're redacted at the end here so
78:04
we're going to need to put in like it
78:05
said stripe web hook secrets and then we
78:10
need to get the signing secret from
78:12
stripe and add it in to that value so
78:16
you're going to come back into your
78:18
stripe web hook page where you've
78:20
created that here and you're going to
78:22
click reveal you're going to take that
78:24
back and copy that in in just a sec so
78:26
back in super base you're going to put
78:28
the stripe web hook secret and you've
78:29
copied there that is effectively
78:32
connecting super base to Stripes so we
78:34
hear those event and the secret is used
78:37
to validate that it is receiving them in
78:40
the correct places and somebody's not
78:42
intercepting those events and then
78:44
finally we need to replace the
78:45
placeholder stripe price IDs with the
78:47
actual product price IDs from your
78:50
stripe dashboard so let's go to our
78:52
stripe dashboard let's go to payment
78:55
links let's open this link here and
78:58
within the products we will have an
79:00
individual product ID and I'm just going
79:03
to copy that there and I believe the
79:06
price ID is the product ID here and then
79:08
it's saying once set up users can
79:10
subscribe or purchase credits and your
79:12
system will automatically track these
79:14
transactions and add credits to their
79:16
accounts so this should be all set up in
79:19
a second and we'll be able to go in and
79:21
test that okay so the product idea is
79:24
not not not the same as the price ID so
79:26
we'll go back into stripe go to products
79:29
go to the pricing section and it should
79:30
start with price and actually if we're
79:33
in the product here in the price you can
79:35
click on here and copy the price ID so
79:39
we'll copy that back into lovable and
79:42
everything should be set up ready to
79:43
test so what we're going to do is go in
79:46
and use our sales lead qualifier twice
79:49
and hopefully that starts to push us
79:50
towards the checkout flow once we run
79:53
out of credits and just to reiterate
79:55
this is all on a test data account so
79:58
it's going to let us purchase without
80:00
putting any funds forward when we switch
80:03
this to a production environment you
80:05
need to set this up again with those
80:07
different credentials or just update
80:08
them in the relevant places we have here
80:11
okay great it seems like it's ready to
80:13
test so let's start testing again let's
80:16
insert the LinkedIn URL here and we'll
80:19
run it twice to effectively run out of
80:22
credits oh we run it once Okay so great
80:25
so it's shown us this insufficient
80:26
credits you need eight credits to use
80:28
this tool but you only have two credits
80:30
that's really nice that it's um set all
80:32
of this up and also linked us to the
80:35
purchase credit so let's try and go
80:36
through this purchase credit route and
80:38
it's sending us to the payment link page
80:41
let's see if it works so we'll say it's
80:43
getting stuck on the payment link page
80:45
from the purchase credits warning button
80:48
it's probably not linked it to the
80:49
correct payment page so let's just get
80:52
that fixed great so it says it's updated
80:54
the purchase credits button let's give
80:56
it another go redirecting to payment
81:00
error creating checkout session you have
81:03
to be very patient with a tool like
81:05
lovable but don't forget that what
81:07
you're doing is stuff that would take
81:10
you if you were a software developer and
81:13
considerably longer amount of time to
81:15
actually do this but each time you run
81:17
one of these changes it's going to take
81:18
about one two minutes uh to update you
81:21
test again Etc but what you're replacing
81:24
here
81:25
is a very high development cost and you
81:28
can get a SAS prototype up and running
81:31
for very cheap so it's definitely worth
81:34
the time investment and it's really cool
81:36
and I'm very impressed with the outputs
81:39
here there were always tools like
81:42
webflow WordPress Wix Etc that could
81:45
create good front ends but tools that
81:47
integrate that front end with the back
81:49
end were very few and far between and
81:52
often had a big technical barrier but
81:54
using something like lovable completely
81:57
takes away that technical barrier you
81:58
need a little bit of understanding of
82:00
architecture but other than that you can
82:02
do it just by prompting like you would
82:04
with chat GPT so very impressed with it
82:07
so lesson learned here that the issue
82:10
actually was that the embedded window
82:13
here inside lovable was not showing the
82:17
stripe page but when we opened up the
82:20
page here we go to tools we try the same
82:23
process we purchase credits it actually
82:27
takes us straight to the stripe page so
82:30
just a little bit of a learning there
82:33
and what we'll do is we will just enter
82:35
some test details and we will hit pay
82:38
there and you can see that this is in
82:40
test mode anyway and that's going to
82:42
process and hopefully that will update
82:44
in all areas it will update our database
82:47
which will receive a notification that a
82:49
purchase been made so it's thrown us
82:52
back to the login page here which is not
82:54
deal but let's go to the database and
82:57
have a look to see if anything is
82:59
updated so we can see that the database
83:01
is not updated it's also thrown us back
83:04
to the login page and we've got two
83:07
credits still up here so let's go to our
83:10
stripe developer portal and inside the
83:13
logs we can see everything that's
83:16
happened so I can see that the checkout
83:19
session loaded correctly and then the
83:22
payment methods end point was contacted
83:25
suggesting that the payment had gone
83:27
through if we go to customers we can see
83:30
that there is a customer in here with my
83:32
name and it's saying that the payment
83:34
had succeeded and it gives us details
83:37
around that if we go back to our data
83:40
base we should have a striped customer
83:43
ID in here and it's still showing as
83:45
null so what we should do is check in
83:47
our Edge functions in super base and if
83:51
we click into the stripe web hook we
83:53
should be able to to see that something
83:56
has happened here and it has shown that
83:58
something has been received so there is
84:00
a connection there let's go to the logs
84:03
and it's showing that there were a few
84:05
errors so great so it has actually
84:07
received the information and what I'm
84:09
going to do is just copy that we're
84:13
going to go back to lovable and we're
84:15
going to attach the image of the error
84:19
so I'm going to say went through on the
84:21
stripe side super base seems to have
84:23
received it like we saw but then shows
84:25
this error let's see if it can help us
84:28
resolve this and it seems to think it's
84:29
fixed the issue now so let's go and try
84:34
again in the tools run the tool purchase
84:37
the credits enter the test details and I
84:40
probably didn't say before but when
84:42
you're using a test account this is a
84:45
well-known test card information so
84:48
424242 Etc you can put in any dates but
84:52
it's a VISA test card that you can use
84:56
it might decline other cards and we'll
84:59
process that there so it's thrown us
85:01
back into the login page let's refresh
85:03
the database same problems so let's go
85:07
back and check what's happened here and
85:10
this time it doesn't seem to have
85:13
received it 439 okay it has received it
85:16
again and in the logs and if we go to
85:19
the overview here I can see that
85:23
something has happened at it's got a 4xx
85:25
error which usually means it can't find
85:28
something so if we go to invocations
85:30
over here go to this which is my most
85:33
recent run and I'm just going to copy
85:35
all of this metadata down here take it
85:40
back to lovable refresh the page tell it
85:43
it's not working again just refresh so
85:46
got a 400 era in super base copy that
85:49
error code in and we'll see if it can
85:51
tackle that so we seem to be having the
85:53
same issues here so I've come into the
85:55
stripe dashboard and all of the payments
85:58
that we've tried have succeeded in
85:59
stripe so it must be as a result a
86:03
connection issue between the stripe
86:05
dashboard and our superbase database in
86:09
the logs that we were looking at before
86:13
it seems to show that things were
86:14
executed but they're always not found so
86:17
with some persistance I've gone back and
86:19
I've just refreshed all of those things
86:21
we did before not sure why it wasn't
86:23
working I think we might have got it
86:25
working now so there's six credits in
86:29
the account we're about to top up we're
86:31
going to add again some credits and
86:35
sometimes you just need to refresh and
86:38
let's see if that updates and tops
86:41
hopefully tops up our credits here so
86:44
it's thrown us back but we can see now
86:48
hooray 106 credits so we'll go to the
86:51
tools and we're now able to use it and
86:54
and if we go back to the database we can
86:56
see that it's 106 and we can see it's
86:59
put our stripe customer ID in there as
87:01
well so that is a success we know that
87:04
it stops US purchasing when we've not
87:06
got sufficient credits and now it's also
87:09
connected to our stripe customer ID so
87:11
hopefully now you can see that it's
87:15
actually extremely easy orbe it takes a
87:18
bit of time with prompting and
87:19
reiterating and testing to set up a full
87:24
AI SAS Marketplace and hopefully you've
87:26
got some idea of the products that you
87:29
could host on this Marketplace so today
87:31
we just set up a sales lead
87:33
qualification flow as well as an extract
87:36
from PDF flow but looking at a
87:38
Marketplace like agent. a you can see
87:41
they have thousands 98 pages of
87:45
different flows we've got things like
87:48
pulling recent LinkedIn posts a meme
87:51
maker fit to purpose image generator
87:54
industry analysis so all of these things
87:56
could be replicated with an N backend in
88:00
a similar interface to this it works
88:02
with n in the back end and your users
88:06
could pay and come to one platform to
88:08
access all of these tools so the
88:10
possibilities really are endless if
88:13
you're considering implementing this for
88:15
yourself obviously you followed the
88:17
video through but we've got all of the
88:19
different prompts implementation plans
88:22
the setup guide for stripe payments the
88:26
credit management system so we just did
88:28
some basic stuff with credits that
88:31
wouldn't stand up in practice so we've
88:35
got a full guide here on the different
88:37
things that you might need to implement
88:38
with loveable and test to make sure that
88:41
you could actually run this in
88:43
production thank you so much for
88:45
watching give this a like And subscribe
88:47
below if you enjoyed the content and
88:49
want to see more like this