Build an AI Quote Request Form for Electrical Contractors: video walkthrough
Updated
Build a quote request form in Lovable and connect it to an n8n workflow — webhook trigger, an AI Agent that drafts an initial estimate note, Google Sheets, Gmail, and a Respond node that ties it all together. The whole lesson in 9:16, narrated step by step.
Simulated practice environment. Recorded in Stepthrough’s simulated practice environment, not the live tool. Practice it yourself free at learn.ynteractive.com.
Chapters
Click a chapter to jump the video there.
- 0:00 Intro: what you'll build
- 0:11 Sign up
- 0:26 Build the form
- 1:01 New workflow
- 1:12 Webhook trigger
- 1:58 AI Agent
- 3:22 Chat model
- 4:02 Sheets tool
- 4:16 Create the spreadsheet
- 5:00 Sheets tool
- 6:08 Gmail tool
- 7:01 Respond node
- 7:24 Publish
- 7:36 Add the secret
- 8:37 Test the form
Now do it yourself, free
Watching is the warm-up. The interactive lesson puts you in a practice copy of Lovable and n8n: you do every step yourself, it checks your work, and “Do it for me” finishes any step you get stuck on. Nothing touches your real accounts.
Practice “Build an AI Quote Request Form for Electrical Contractors” step by stepFull transcript
Intro: what you'll build
0:00 It all comes together. A quote request form in Lovable for oak and wire electric. Then an AI agent saves each request to Google Sheets and emails an initial estimate. Let's build it.
Sign up
0:11 In the first module you built a Custom GPT. In the second, you built an AI agent inside n8n. Now you are going to combine a real web app with an AI-powered backend. Lovable is a tool that builds web apps from a text description. Click get started for free.
Build the form
0:25 This is your Lovable dashboard. Every project you build shows up here. Click start with a prompt to create a new one.
0:32 This is the prompt that tells Lovable what to build. It describes a clean quote request form with Name, Email, Project Details, and Home Details fields, and tells it to send each request to an n8n webhook URL pulled from a secret config — not hardcoded. Click paste prompt.
0:48 Click build. Lovable reads your prompt, generates the code, and deploys a live web app. In a few seconds you have a working quote request form. Now we need to build the AI workflow that handles what happens when a customer submits it.
New workflow
1:00 Now you are in n8n. This is the workflow automation tool you used in the last module. This time, instead of a chat trigger, we are going to use a webhook — so the form can send data directly to n8n. Click create workflow.
Webhook trigger
1:12 Every workflow starts with a trigger. Last time we used a chat trigger. This time we want a webhook — an HTTP endpoint the form can POST to. Click add first step.
1:22 On webhook call. A webhook is just a URL that waits for incoming data. When a customer submits the Lovable form, it sends the name, email, project details, and home details as JSON to this webhook.
1:33 One important setting. By default, the webhook responds immediately, before the AI agent even runs. We need it to wait until the agent is done, so the form knows the submission succeeded. Click the respond dropdown.
1:43 Using respond to webhook node. This tells n8n: do not send a response yet. Wait until you hit a dedicated respond node further down the chain. That way the form gets a real confirmation after the AI agent has processed everything.
1:55 That is the webhook set up. Close the node.
AI Agent
1:57 Now we decide what happens when the form data arrives. Click the plus on the right edge of the webhook.
2:03 AI Agent. Same node as last time, but now it handles form submissions instead of chat messages. It will read the form data, save it to Google Sheets, and send a personalized reply via Gmail.
2:14 This time the prompt does not come from a chat trigger — it comes from the webhook. We need to change the source so we can write our own prompt template. Click the source dropdown.
2:23 Define below. This lets us write a prompt that pulls the form fields directly from the webhook data.
2:29 Here is the prompt template. It uses n8n expressions — those double curly braces — to pull the name, email, project details, and home details from the webhook body. Each time the form is submitted, the agent gets a prompt with the real data. Click paste prompt template.
2:45 Now we need a system message — the standing instruction that tells the agent what to do with every submission. Click add option.
2:52 System message. This is where we tell the agent to save the lead to Google Sheets and send a reply email via Gmail.
2:59 Here is the system message. It tells the agent who it works for, to save the quote request with the Google Sheets tool, and to email the customer an initial estimate note with the Gmail tool — with typical price ranges, and a reminder that the final price is confirmed after a site visit. Click paste system message.
3:17 The agent is configured. It knows to save to Sheets and reply via Gmail. Close the node.
Chat model
3:22 The agent needs a model to think with. Click the plus under chat model.
3:25 OpenAI Chat Model. If you did the last module, this part will feel familiar.
3:30 Click the credential dropdown to connect your OpenAI API key.
3:33 Create new credential. If you already made one in the last module, you could pick it from the list. We will create a fresh one here.
3:39 Paste your OpenAI API key. If you followed the previous module, you already have one. If not, go to platform dot openai dot com, add credit, and create a key.
3:49 Hit save. n8n tests the connection and stores the key.
3:53 Now the model dropdown.
3:54 GPT five mini. Fast, cheap, and plenty smart for processing form submissions.
3:59 Model is wired up. Close it.
Sheets tool
4:01 Now the tools. The system message told the agent to use Google Sheets and Gmail — but it cannot do either until we give it the actual tools. Click the plus under tool.
4:11 Google Sheets Tool. This lets the agent save form submissions as rows in a spreadsheet.
Create the spreadsheet
4:16 Before we configure this node, we need to create the actual spreadsheet. Close this for now — we will come right back.
4:22 Switch to the Google Sheets tab. You need to create the spreadsheet that the Sheets node will write to.
4:27 Name it Quote Requests — this is where every quote request from the form will go.
4:32 Now set up the column headers. These need to match the form fields. In A1, type Name.
4:37 B1 — Email.
4:38 C1 — Project Details.
4:40 And D1 — Home Details. Four columns, matching exactly what the Lovable form sends: name, email, project details, and home details.
4:49 The spreadsheet is ready. Switch back to n8n and connect the Google Sheets node to it.
4:54 Double click the Google Sheets node to open it up again. Now we can connect it to the Quote Requests spreadsheet.
Sheets tool
5:00 Click the credential dropdown to connect your Google account.
5:03 Create new credential. This one uses Google OAuth, so it opens a credential window.
5:07 Click sign in with Google. This opens the Google account chooser.
5:11 Pick the Google account that owns the Quote Requests spreadsheet.
5:14 Google is asking for permissions. Check the first box — this lets n8n read and write your spreadsheets.
5:20 Second box — Drive access so n8n can find your spreadsheets by name.
5:24 Last one — this lets Google connect to n8n as an external service.
5:29 All three checked. Click continue and Google hands the credential back to n8n.
5:34 Now pick the spreadsheet. Click the document dropdown.
5:37 Quote Requests — this is the spreadsheet where every quote request gets saved as a row.
5:41 Click the sheet dropdown.
5:43 Sheet one. That is the only tab.
5:45 Now the column mapping. Each column in the spreadsheet has a purple button. Click it and the AI agent figures out what data goes there. Click the purple button next to Name.
5:55 Email.
5:56 Project Details.
5:57 And Home Details. All four columns are now set to defined automatically by the model.
6:02 Sheets tool is fully configured — credential, spreadsheet, sheet, and column mapping. Close it.
Gmail tool
6:07 The agent can save to Sheets now, but it also needs to send a reply email. Click the plus sign to add another tool.
6:13 Gmail Tool. This lets the agent send a personalized reply back to whoever submitted the form.
6:18 Click the credential dropdown. Gmail uses the same Google OAuth as Sheets.
6:23 Create new credential. Gmail needs its own Google OAuth credential.
6:26 Click sign in with Google. Same flow as before — Google account chooser then permissions.
6:32 Pick the Google account you want to send emails from.
6:35 Google is asking for permissions. Check the first box — this gives n8n full email access.
6:40 Second box — manage drafts and send emails.
6:43 Read, compose, and send.
6:45 View email message metadata.
6:47 View and modify but not delete.
6:49 Last one — view your email messages and settings.
6:52 All six checked. Click continue and Google hands the Gmail credential back to n8n.
6:56 Gmail is connected. The agent can now send emails. Close the node.
Respond node
7:00 One last piece. Remember we told the webhook to wait for a respond node before sending back a reply? We need to add that node now. Click the plus on the right edge of the agent.
7:09 Respond to Webhook. When the agent finishes processing — saving to Sheets and sending the email — this node sends a success response back to the form, so the user sees a confirmation message instead of an error.
7:20 Nothing to configure. This node just sends back the response. Close it.
Publish
7:24 The workflow is complete. Webhook trigger, AI agent with a model, Google Sheets, Gmail, and a respond node. Click publish to make it live. Once published, the webhook URL is active and ready to receive form submissions.
Add the secret
7:36 The workflow is published, but Lovable still needs the webhook URL. Open the webhook node to copy it.
7:41 Switch to the production URL tab. The test URL only works during testing. The production URL is the one your published workflow uses.
7:49 Click the URL to copy it to your clipboard. You will paste this into Lovable so the form knows where to send data.
7:56 Got the URL. Close the node.
7:57 Switch back to Lovable. We need to paste the webhook URL into a secret so the form can reach the workflow.
8:03 To add a secret in Lovable, click More in the toolbar. This opens the Cloud settings where you can manage secrets.
8:10 This is the secrets page. The prompt told Lovable to reference a secret config value called N8N WEBHOOK URL instead of hardcoding it. Click paste secret name.
8:20 Now paste the production URL you copied from the webhook node. This is the live endpoint your form will POST to. Click paste webhook URL.
8:28 Click save. The Lovable app now knows where to send form submissions. The webhook URL is stored as a secret, not in the source code — exactly how it should be.
Test the form
8:36 Time to test. Click Preview in the toolbar to see the form you built.
8:40 Fill out the form with sample data. Click the fill button to populate all the fields at once.
8:45 Click request quote. The form posts the data to the n8n webhook. The AI agent processes it — saves a row to Google Sheets with the name, email, project details, and home details, then emails the customer an initial estimate note via Gmail. The respond node sends back a success message, and the form shows the confirmation.
9:03 The form submitted successfully. Now check the spreadsheet — click the Google Sheets tab to see the row the agent just wrote.
9:10 Simple as that. We show you and you do it. Sign up below to learn AI automation for free.
Read the step-by-step guide with screenshots · Build an AI Quote Request Form for Electrical Contractors: lesson overview · All free videos